bio.bam

Modules

abstractreader
module bio.bam.abstractreader
Undocumented in source.
bai
module bio.bam.bai
baifile
module bio.bam.baifile
Undocumented in source.
baseinfo
module bio.bam.baseinfo
Undocumented in source.
cigar
module bio.bam.cigar
Undocumented in source.
constants
module bio.bam.constants
Undocumented in source.
iontorrent
module bio.bam.iontorrent
md
module bio.bam.md
multireader
module bio.bam.multireader
Undocumented in source.
pileup
module bio.bam.pileup

This module is used for iterating over columns of alignment.

The function makePileup is called on a range of coordinate-sorted reads mapped to the same reference. It returns an input range of columns.

This returned range can then be iterated with foreach. First column is located at the same position on the reference, as the first base of the first read.
Each popFront operation advances current position on the reference. The default behaviour is to exclude sites with zero coverage from the iteration.

Each column keeps set of reads that overlap corresponding position on the reference. If reads contain MD tags, and makePileup was asked to use them, reference base at the column is also available.


Each read preserves all standard read properties but also keeps column-related information, namely <ul>

  • number of bases consumed from the read sequence so far
  • current CIGAR operation and offset in it
  • all CIGAR operations before and after current one
  • </ul>
    It is clear from the above that current CIGAR operation cannot be an insertion. The following are suggested ways to check for them: <ul>

  • cigar_after.length > 0 && cigar_operation_offset == cigar_operation.length - 1 && cigar_after[0].type == 'I'
  • cigar_before.length > 0 && cigar_operation_offset == 0 && cigar_before[$ - 1].type == 'I'
  • </ul>

    randomaccessmanager
    module bio.bam.randomaccessmanager

    Module for random access operations on BAM file.

    read
    module bio.bam.read

    BamRead type provides convenient interface for working with SAM/BAM records.

    reader
    module bio.bam.reader

    Writing a script/tool for processing BAM data often starts this way:

    readrange
    module bio.bam.readrange
    Undocumented in source.
    reference
    module bio.bam.reference

    Each BAM file contains reads aligned to different reference sequences.

    These sequences have unique identifiers in BAM file, starting from 0. Unmapped reads are associated with id = -1.

    If BAI file is available, fast region queries are available, that is, getting all reads that overlap given region. This is achieved via opSlice method.

    referenceinfo
    module bio.bam.referenceinfo
    Undocumented in source.
    region
    module bio.bam.region
    Undocumented in source.
    snpcallers
    module bio.bam.snpcallers
    splitter
    module bio.bam.splitter
    Undocumented in source.
    tagvalue
    module bio.bam.tagvalue

    BAM records may carry arbitrary information in tags.
    Value type provides convenient way to work with this information.

    thirdparty
    module bio.bam.thirdparty
    utils
    module bio.bam.utils
    validation
    module bio.bam.validation
    writer
    module bio.bam.writer
    Undocumented in source.