Changes

From Genome Analysis Wiki
Jump to navigationJump to search
1,476 bytes added ,  16:34, 25 July 2012
Line 125: Line 125:     
===== Minimum Alternate Allele Count =====
 
===== Minimum Alternate Allele Count =====
There are additional discard rules that can be specified by calling methods on VcfFileReader.
  −
   
To Discard any records without a minimum number of alternate alleles, use:
 
To Discard any records without a minimum number of alternate alleles, use:
 
<source lang="cpp">
 
<source lang="cpp">
Line 154: Line 152:  
<source lang="cpp">
 
<source lang="cpp">
 
VcfFileReader::rmDiscardMinAltAlleleCount()
 
VcfFileReader::rmDiscardMinAltAlleleCount()
 +
</source>
 +
 +
===== Minimum Minor Allele Count =====
 +
To Discard any records without a minimum number of minor alleles, use:
 +
<source lang="cpp">
 +
VcfFileReader::addDiscardMinMinorAlleleCount(int32_t minMinorAlleleCount, VcfSubsetSamples* subset)
 +
</source>
 +
 +
The <code>minMinorAlleleCount</code> parameter is the minimum number of minor alleles found in the specified subset (if specified) in order for the record to be kept.
 +
 +
The <code>VcfSubsetSamples* subset</code> parameter is a pointer to the subset of samples that you want to include when counting the number of alleles.  If all samples that are read/kept are to be included, NULL should be passed in. 
 +
 +
To specify a <code>VcfSubsetSamples</code> use the constructor:
 +
<source lang="cpp">
 +
void VcfSubsetSamples::init(const VcfHeader& header, bool include)
 +
</source>
 +
Pass in the header that was read from the VCF file.  Set <code>include</code> to true if all samples should be included except any that are specified as excluded.  Set <code>include</code> to false if all samples should be excluded except any that are specified as included.  NOTE: the header is not modified to add/remove any samples.
 +
 +
To mark a specific sample as excluded use:
 +
<source lang ="cpp">
 +
bool VcfSubsetSamples::addExcludeSample(const char* sampleName);
 +
</source>
 +
To mark a specific sample as included use:
 +
<source lang ="cpp">
 +
bool VcfSubsetSamples::addIncludeSample(const char* sampleName);
 +
</source>
 +
 +
Use the following method to remove the DiscardMinMinorAlleleCount rule:
 +
<source lang="cpp">
 +
VcfFileReader::rmDiscardMinMinorAlleleCount()
 
</source>
 
</source>
  

Navigation menu