Changes

From Genome Analysis Wiki
Jump to navigationJump to search
818 bytes added ,  10:42, 24 July 2012
Line 124: Line 124:  
and discards reads that do not have <code>PASS</code> in the <code>FILTER</code> field and reads that have a genotype that is not phased or have no <code>GT</code> in the <code>FORMAT</code> fields.
 
and discards reads that do not have <code>PASS</code> in the <code>FILTER</code> field and reads that have a genotype that is not phased or have no <code>GT</code> in the <code>FORMAT</code> fields.
   −
===== Additional Rules =====
+
===== Minimum Alternate Allele Count =====
 
There are additional discard rules that can be specified by calling methods on VcfFileReader.
 
There are additional discard rules that can be specified by calling methods on VcfFileReader.
   Line 132: Line 132:  
</source>
 
</source>
   −
The <code>VcfSubsetSamples* subset</code> parameter is a pointer to the subset of samples that you want to include when counting the number of alternate alleles.  If all samples that are read/kept are to be included, NULL should be passed in.
+
The <code>minAltAlleleCount</code> parameter is the minimum number of alternate alleles found in the specified subset (if specified) in order for the record to be kept.
   −
The <code>minAltAlleleCount</code> parameter is the minimum number of alternate alleles found in the subset 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 alternate 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 DiscardMinAltAlleleCount rule:
 
Use the following method to remove the DiscardMinAltAlleleCount rule:

Navigation menu