Skip to main content
. 2012 May 28;7:6. doi: 10.1186/1751-0473-7-6

Table 1.

Attributes and methods of the Bio::DB::Sam object

binary denotes whether this is a binary file
compressed
denotes whether this file is compressed
fasta_path
path to the reference FASTA file
sam
path to the associated BAM file
chromosome_coverage
return Ruby Array of coverage over a region
fetch
fetch alignment in a region from a bam file, returning a Ruby Array object
fetch_reference
fetch regions of the reference file returning a String object of the relevant sequence
fetch_with_function
fetch all alignments in a region passing in a Ruby Proc object as a callback, returning an iterator
index_stats
get information about reference and number of mapped reads
merge
merge two or more bam files
mpileup
an iterator that returns Pileup objects representing the reads over a single position
sort sort the BAM file