Changes

From Genome Analysis Wiki
Jump to: navigation, search

LibStatGen: BAM

1,708 bytes added, 15:53, 16 March 2010
no edit summary
== Retrieving fields from a SAM/BAM Record ==
The SamRecord class contains accessors to access the fields of a SAM/BAM record. They assume that the class has already been populated, either by using the set commands or by calling SamFile::ReadRecord. Not all of the values that can be retrieved using these get accessors have set methods. That is because they are internally calculated values if they were not read from a file. The methods found in the SamRecord class for setting fields are:{| class="wikitable" style="width:100%" border="1"|+ style="font-size:150%"|'''SamRecord Class Get Methods'''! width=""|Method Name! width=""|Description|-| int getBlockSize() | Returns the BAM block size of the record.|-| int getReferenceID()| Returns the reference sequence id (BAM format).|-| int get1BasedPosition()| Returns the 1-based (SAM formatted) leftmost position.|-| int get0BasedPosition()| Returns the 0-based (BAM formatted) leftmost position.|-| int getReadNameLength()| Returns the length of the ReadName (QNAME).|-| int getMapQuality()| Returns the map quality.|-| int getBin()| Returns the BAM bin for the record.|-| int getCigarLength()| Returns the length of the CIGAR in BAM format.|-| int getFlag()| Returns the flag.|-| int getReadLength()| Returns the length of the read.|-| int getMateReferenceID()| Returns the mate reference sequence id (BAM format).|-| int get1BasedMatePosition()| Returns the 1-based (SAM formatted) mate leftmost position.|-| int get0BasedMatePosition()| Returns the 0-based (BAM formatted) mate leftmost position.|-| int getInsertSize()| Returns the insert size.|-| const char* getReadName()| Returns the SAM formatted Read Name (QNAME).|-| const char* getCigar()| Returns the SAM formatted CIGAR string.|-| const char* getSequence()| Returns the SAM formatted Sequence string.|-| const char* getQuality()| Returns the SAM formatted Quality string.|-|}

Navigation menu