Biocaml_ez.BamSourceinclude module type of struct include Biocaml_unix.Bam endA 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.
val read0 :
Core.In_channel.t ->
(Header.t * Alignment0.t Core.Or_error.t Stream.t) Core.Or_error.tread0 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.
write0 h xs oc writes the header h and (partially parsed) alignments xs to oc.
val read :
Core.In_channel.t ->
(Header.t * alignment Core.Or_error.t Stream.t) Core.Or_error.tread 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.
write h xs oc writes the header h and the alignments xs to oc.
val read_alignment_stream :
Biocaml_unix.Bgzf.in_channel ->
Alignment0.t Core.Or_error.t Stream.t