Changes

From Genome Analysis Wiki
Jump to navigationJump to search
no edit summary
Line 73: Line 73:     
The methods found in the SamRecord class for setting fields are:
 
The methods found in the SamRecord class for setting fields are:
{| class="wikitable" style="width:100%" border="1"
+
{| style="margin: 1em 1em 1em 0; background-color: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;" border="1"
|+ style="font-size:150%"|'''SamRecord Class Get Methods'''
+
|-style="background: #f2f2f2; text-align: center;" '''SamRecord Class Methods'''
! width=""|Method Name
+
! Method Name !!  Description
width=""|Description
   
|-
 
|-
| bool isValid(SamFileHeader& header)
+
| <code>bool isValid(SamFileHeader& header)</code>
 
| Returns true if the record is valid.  This performs validation steps.  TODO: the method exists, but it does not yet perform any checks, so just returns true.
 
| Returns true if the record is valid.  This performs validation steps.  TODO: the method exists, but it does not yet perform any checks, so just returns true.
 
|-
 
|-
| int32_t getBlockSize()  
+
| <code>int32_t getBlockSize()</code>
 
| Returns the BAM block size of the record.
 
| Returns the BAM block size of the record.
 
|-
 
|-
| const char* getReferenceName(SamFileHeader& header)
+
| <code>const char* getReferenceName(SamFileHeader& header)</code>
 
| Returns the reference sequence name (SAM format).
 
| Returns the reference sequence name (SAM format).
 
|-
 
|-
| int32_t getReferenceID()
+
| <code>int32_t getReferenceID()</code>
 
| Returns the reference sequence ID (BAM format).
 
| Returns the reference sequence ID (BAM format).
 
|-
 
|-
| int32_t get1BasedPosition()
+
| <code>int32_t get1BasedPosition()</code>
 
| Returns the 1-based (SAM formatted) leftmost position.
 
| Returns the 1-based (SAM formatted) leftmost position.
 
|-
 
|-
| int32_t get0BasedPosition()
+
| <code>int32_t get0BasedPosition()</code>
 
| Returns the 0-based (BAM formatted) leftmost position.
 
| Returns the 0-based (BAM formatted) leftmost position.
 
|-
 
|-
| int8_t getReadNameLength()
+
| <code>int8_t getReadNameLength()</code>
 
| Returns the length of the ReadName (QNAME).
 
| Returns the length of the ReadName (QNAME).
 
|-
 
|-
| int8_t getMapQuality()
+
| <code>int8_t getMapQuality()</code>
 
| Returns the map quality.
 
| Returns the map quality.
 
|-
 
|-
| int16_t getBin()
+
| <code>int16_t getBin()</code>
 
| Returns the BAM bin for the record.
 
| Returns the BAM bin for the record.
 
|-
 
|-
| int16_t getCigarLength()
+
| <code>int16_t getCigarLength()</code>
 
| Returns the length of the CIGAR in BAM format.
 
| Returns the length of the CIGAR in BAM format.
 
|-
 
|-
| int16_t getFlag()
+
| <code>int16_t getFlag()</code>
 
| Returns the flag.
 
| Returns the flag.
 
|-
 
|-
| int32_t getReadLength()
+
| <code>int32_t getReadLength()</code>
 
| Returns the length of the read.
 
| Returns the length of the read.
 
|-
 
|-
| const char* getMateReferenceName(SamFileHeader& header)
+
| <code>const char* getMateReferenceName(SamFileHeader& header)</code>
 
| Returns the mate reference sequence name (SAM format).  Returns the mate reference sequence name even if it is the same as the reference sequence name.
 
| Returns the mate reference sequence name (SAM format).  Returns the mate reference sequence name even if it is the same as the reference sequence name.
 
|-
 
|-
| const char* getMateReferenceNameOrEqual(SamFileHeader& header)
+
| <code>const char* getMateReferenceNameOrEqual(SamFileHeader& header)</code>
 
| Returns the mate reference sequence name (SAM format).  Returns the mate reference sequence name, unless it is the same as the reference sequence name, then an "=" is returned..
 
| Returns the mate reference sequence name (SAM format).  Returns the mate reference sequence name, unless it is the same as the reference sequence name, then an "=" is returned..
 
|-
 
|-
| int32_t getMateReferenceID()
+
| <code>int32_t getMateReferenceID()</code>
 
| Returns the mate reference sequence id (BAM format).
 
| Returns the mate reference sequence id (BAM format).
 
|-
 
|-
| int32_t get1BasedMatePosition()
+
| <code>int32_t get1BasedMatePosition()</code>
 
| Returns the 1-based (SAM formatted) mate leftmost position.
 
| Returns the 1-based (SAM formatted) mate leftmost position.
 
|-
 
|-
| int32_t get0BasedMatePosition()
+
| <code>int32_t get0BasedMatePosition()</code>
 
| Returns the 0-based (BAM formatted) mate leftmost position.
 
| Returns the 0-based (BAM formatted) mate leftmost position.
 
|-
 
|-
| int32_t getInsertSize()
+
| <code>int32_t getInsertSize()</code>
 
| Returns the insert size.
 
| Returns the insert size.
 
|-
 
|-
| int32_t get0BasedAlignmentEnd();
+
| <code>int32_t get0BasedAlignmentEnd()</code>
 
| Returns the 0-based inclusive right-most position of the clipped sequence.
 
| Returns the 0-based inclusive right-most position of the clipped sequence.
 
|-
 
|-
| int32_t get1BasedAlignmentEnd();
+
| <code>int32_t get1BasedAlignmentEnd()</code>
 
| Returns the 1-based inclusive right-most position of the clipped sequence.
 
| Returns the 1-based inclusive right-most position of the clipped sequence.
 
|-
 
|-
| int32_t get0BasedUnclippedStart();
+
| <code>int32_t get0BasedUnclippedStart()</code>
 
| Returns the 0-based inclusive left-most position adjusted for clipped bases.
 
| Returns the 0-based inclusive left-most position adjusted for clipped bases.
 
|-
 
|-
| int32_t get1BasedUnclippedStart();
+
| <code>int32_t get1BasedUnclippedStart()</code>
 
| Returns the 1-based inclusive left-most position adjusted for clipped bases.
 
| Returns the 1-based inclusive left-most position adjusted for clipped bases.
 
|-
 
|-
| int32_t get0BasedUnclippedEnd();
+
| <code>int32_t get0BasedUnclippedEnd()</code>
 
| Returns the 0-based inclusive right-most position adjusted for clipped bases.
 
| Returns the 0-based inclusive right-most position adjusted for clipped bases.
 
|-
 
|-
| int32_t get1BasedUnclippedEnd();
+
| <code>int32_t get1BasedUnclippedEnd()</code>
 
| Returns the 1-based inclusive right-most position adjusted for clipped bases.
 
| Returns the 1-based inclusive right-most position adjusted for clipped bases.
 
|-
 
|-
| const char* getReadName()
+
| <code>const char* getReadName()</code>
 
| Returns the SAM formatted Read Name (QNAME).
 
| Returns the SAM formatted Read Name (QNAME).
 
|-
 
|-
| const char* getCigar()
+
| <code>const char* getCigar()</code>
 
| Returns the SAM formatted CIGAR string.
 
| Returns the SAM formatted CIGAR string.
 
|-
 
|-
| const char* getSequence()
+
| <code>const char* getSequence()</code>
 
| Returns the SAM formatted Sequence string.
 
| Returns the SAM formatted Sequence string.
 
|-
 
|-
| const char* getQuality()
+
| <code>const char* getQuality()</code>
 
| Returns the SAM formatted Quality string.
 
| Returns the SAM formatted Quality string.
 
|-
 
|-
| bool getNextSamTag(char* tag, char& vtype, void** value)
+
| <code>bool getNextSamTag(char* tag, char& vtype, void** value)</code>
 
| Returns true if a tag was read, false if there are no more tags.
 
| Returns true if a tag was read, false if there are no more tags.
 
For a true return value, tag is sent to the tag of the tag, vtype is set to the vtype of the tag, and value is a pointer to the value of the tag.  You will then need to use a switch to cast value to int, double, char, or String.
 
For a true return value, tag is sent to the tag of the tag, vtype is set to the vtype of the tag, and value is a pointer to the value of the tag.  You will then need to use a switch to cast value to int, double, char, or String.
 
|-
 
|-
| bool isIntegerType(char vtype)
+
| <code>bool isIntegerType(char vtype)</code>
 
| Returns true if the passed in vtype is of integer ('c', 'C', 's', 'S', 'i', 'I') type.
 
| Returns true if the passed in vtype is of integer ('c', 'C', 's', 'S', 'i', 'I') type.
 
|-
 
|-
| bool isDoubleType(char vtype)
+
| <code>bool isDoubleType(char vtype)</code>
 
| Returns true if the passed in vtype is of double ('f') type.
 
| Returns true if the passed in vtype is of double ('f') type.
 
|-
 
|-
| bool isCharType(char vtype)
+
| <code>bool isCharType(char vtype)</code>
 
| Returns true if the passed in vtype is of char ('A') type.
 
| Returns true if the passed in vtype is of char ('A') type.
 
|-
 
|-
| bool isStringType(char vtype)
+
| <code>bool isStringType(char vtype)</code>
 
| Returns true if the passed in vtype is of String ('Z') type.
 
| Returns true if the passed in vtype is of String ('Z') type.
|-
   
|-
 
|-
 
|}
 
|}

Navigation menu