Class | Pileup |
In: |
lib/bio/db/sam/pileup.rb
|
Parent: | Object |
A class representing information in SAMTools pileup format
Author: | Dan MacLean (dan.maclean@tsl.ac.uk) |
Pileup is described at sourceforge.net/apps/mediawiki/samtools/index.php?title=SAM_FAQ#I_do_not_understand_the_columns_in_the_pileup_output. Briefly (when you invoke pileup with the -c option):
If pileup is invoked without `-c’, indel lines and columns between 3 and 7 inclusive will not be outputted.
NB mpileup uses the 6 column output format eg "seq2\t151\tG\tG\t36\t0\t99\t12\t...........A\t:9<;;7=<<<<<" Pileup provides accessors for all columns (6 or 10 column format) and a few other useful methods
ar1 | [RW] | |
ar2 | [RW] | |
ar3 | [RW] | |
consensus | [RW] | |
consensus_quality | [RW] | |
coverage | [RW] | |
pos | [RW] | |
read_bases | [RW] | |
read_quals | [RW] | |
ref_base | [RW] | |
ref_name | [RW] | |
rms_mapq | [RW] | |
snp_quality | [RW] |
creates the Pileup object
pile_up_line = "seq2\t151\tG\tG\t36\t0\t99\t12\t...........A\t:9<;;7=<<<<<" pile = Pileup.new(pile_up_line)
returns the consensus (most frequent) base from the pileup, if there are equally represented bases returns a string containing all equally represented bases in alphabetical order