package biotk

  1. Overview
  2. Docs

BAI format: index for BAM file

@see https://samtools.github.io/hts-specs/SAMv1.pdf @see https://academic.oup.com/bioinformatics/article/32/14/2202/1742831

type chunk = {
  1. chunk_beg : Int64.t;
  2. chunk_end : Int64.t;
}

chunk_beg should be less than chunk_end, except for chunks in the infamous metadata bin (bin id 37450)

type bin = {
  1. bin : int;
  2. n_chunk : int;
  3. chunks : chunk array;
}
type interval =
  1. | Ioffset of Int64.t
type reference_sequence = {
  1. n_bin : int;
  2. bins : bin array;
  3. n_intv : int;
  4. intervals : interval array;
}
type t = {
  1. n_ref : int;
  2. reference_sequences : reference_sequence array;
  3. n_no_coor : Int64.t option;
}
val read : Stdio.In_channel.t -> (t, [> `Msg of string ]) result
val reg2bin : int -> int -> int
val reg2bins : int -> int -> init:'a -> f:('a -> int -> 'a) -> 'a