package biotk

  1. Overview
  2. Docs

ibed format

ibed files are produced by CHiCAGO software for detecting statistically significant interaction events in Capture HiC data. Each row represents a chromosomal interaction. You can check what such a file looks like here. This module offers a representation of this kind of file (essentially a list of records) and some functions to handle this type.

example:

open Biotk

let () =
  Ibed.of_file "data/pchic/mouse.ibed"
    |> List.filter (fun i -> i.bait.chr = "chr13")
    |> Ibed.to_file "data/pchic/mouse_chr13.ibed" ~header:true
type item = {
  1. bait_names : string list;
  2. bait : GLoc.t;
  3. other_names : string list;
  4. other : GLoc.t;
  5. n_reads : int;
  6. score : float;
}
type t = item list
val sort : ?desc:bool -> t -> t

Sort contacts by the genomic locaction of bait part, ascending by default.

val group_by_bait : t -> (item * t) list

Produce a list of contacts list, each sublist contains all contact that share the same bait.

val group_by_chr : t -> (item * t) list

Produce a list of tuple, first element of the couple is the chromosome, the second is all contacts that belong to this chromosome.

val of_file_exn : string -> t
val to_file : t -> path:string -> header:bool -> unit
OCaml

Innovation. Community. Security.