From Genome Analysis Wiki
Jump to navigationJump to search
2,002 bytes added
, 09:55, 29 March 2012
Line 126: |
Line 126: |
| | | |
| Once you have the record, use methods from the <code>VcfRecord</code> to extract the desired information. | | Once you have the record, use methods from the <code>VcfRecord</code> to extract the desired information. |
| + | |
| + | ==== Extracting Data from the Record ==== |
| + | Do not delete any of the returned pointers. They are references to strings within the record and will not be valid when the record changes or is deleted. |
| + | |
| + | * Position Information |
| + | ** <code>getChromStr()</code> returns const char* to this record's chromosome string |
| + | ** <code>get1BasedPosition()</code> returns an integer containing the 1-based position of the record |
| + | * Identifiers |
| + | ** <code>getIDStr()</code> returns const char* to this record's ID. It includes the entire list of unique identifiers delimited by ';' |
| + | * Information on Bases |
| + | ** <code>getRefStr()</code> returns const char* to the entire reference string |
| + | ** <code>getAltStr()</code> returns const char* to the entire alternate string (alternates seperated by ',') |
| + | ** <code>getNumAlts()</code> returns an integer containing the number of alternates in the alt string. |
| + | * Quality Information |
| + | ** <code>getQual()</code> returns a float containing the phred quality score |
| + | ** <code>getQualStr()</code> returns a string containing the phred quality score |
| + | * Filter Information |
| + | ** <code>getFilter()</code> returns a reference to the Info field information, a VcfRecordInfo object reference |
| + | ** <code>passedAllFilters()</code> returns true if the FILTER field indicates <code>PASS</code>, false if not. |
| + | * Aditional Information |
| + | ** <code>getInfo()</code> returns a reference to the filter information, a VcfRecordFilter object reference |
| + | * Genotype Information |
| + | ** <code>getGenotypeInfo()</code> returns a reference to the information from the genotype fields, a VcfRecordGenotype object reference |
| + | ** <code>allPhased()</code> returns true if all the samples are phased and none unphased and false if any are not phased |
| + | ** <code>allUnphased()</code> returns true if all the samples are unphased and none phased and false if any are not unphased |
| + | ** <code>hasAllGenotypeAlleles()</code> returns true if all the samples have all the genotype alleles specified and false if any are missing or the GT field is missing. |