package biocaml

  1. Overview
  2. Docs
The OCaml Bioinformatics Library

Install

Dune Dependency

Authors

Maintainers

Sources

v0.11.1.tar.gz
md5=e292efa2f61fec33dad63ec897106f59
sha512=35519bf3b1e67a9191ef9bb74eba0dae941e0d05bad89076a36f507dc5c2d105a03c1c917d5a3f7ed9d1da4acbf3199582f78c308aa2a5a22c21f743945c852b

doc/biocaml.ez/Biocaml_ez/Bam/index.html

Module Biocaml_ez.BamSource

include module type of struct include Biocaml_unix.Bam end

A BAM file is composed of a header and a list of alignment records. The datatypes used in this module are based on those defined in the Sam module.

BAM header files contain a plain text SAM header, plus additional information related to the encoding of the file.

Representation of partially parsed alignments. When traversing a BAM file for a specific calculation, it may be that only some fields of the alignment records are actually used. In that case, it can be significantly faster to use this representation. As a downside, some encoding errors in the BAM file can go unnoticed.

Sourceval read0 : Core_kernel.In_channel.t -> (Header.t * Alignment0.t Core_kernel.Or_error.t Stream.t) Core_kernel.Or_error.t

read0 ic returns an error if a valid header cannot be read from ic or a pair containing a header and a stream of possibly errored (partially parsed) alignments. The stream stops after the first error.

Sourceval write0 : Header.t -> Alignment0.t Stream.t -> Core_kernel.Out_channel.t -> unit

write0 h xs oc writes the header h and (partially parsed) alignments xs to oc.

Sourceval read : Core_kernel.In_channel.t -> (Header.t * alignment Core_kernel.Or_error.t Stream.t) Core_kernel.Or_error.t

read ic returns an error if a valid header cannot be read from ic or a pair containing a header and a stream of possibly errored alignments. The stream stops after the first error.

Sourceval write : Header.t -> alignment Stream.t -> Core_kernel.Out_channel.t -> unit Core_kernel.Or_error.t

write h xs oc writes the header h and the alignments xs to oc.

Low-level access

Sourceval with_file : string -> f:(Header.t -> alignment CFStream.Stream.t -> 'a) -> 'a
Sourceval with_file0 : string -> f:(Header.t -> Alignment0.t CFStream.Stream.t -> 'a) -> 'a
OCaml

Innovation. Community. Security.