<code>VcfFileReader</code> is declared in <code>VcfFileReader.h</code>, so be sure to include that file.
Subsetting Samples ====
To select only a subset of samples to keep, when opening the file also specify the name of the file containing the names of the samples to keep and the delimiter separating the sample names (default is a new line, '\n').
// Subset 1 is delimited by new lines, '\n'.
reader.open("vcfFileName.vcf", header, "subsetFile1.txt");
// Subset 2 is delimited by ';'
reader.open("vcfFileName.vcf", header, "subsetFile2.txt", ';' );
==== Specifying Discard Rules ====
When specifying the discard rules, you should use the constants found at the top of VcfFileReader.h
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.
==== Read only Certain Sections of the File / Using a VCF Index (TABIX) File ====
bool setReadSection(const char* chromName);
bool set1BasedReadSection(const char* chromName,
int32_t start, int32_t end);
Both methods currently always return true, since in the current implementation this can't fail. It currently allows the VcfIndex file to be read after this call.
<code>set1BasedReadSection</code> will set the code to read the specified chromosome starting at the specified 1-based position up to, but not including, the specified 1-based end position. On the first <code>readRecord</code> call it will jump the file to the beginning of this section. It will continue to read the section for each <code>readRecord</code> call made until it has read the entire section. Once the entire section has been read, <code>readRecord</code> will return false until a new read section is specified.
Implementation NOTE: internally it may read extra records prior to the section, but <code>readRecord</code> will keep reading and will not return until it finds a record in the section or until the section has been passed (no records in the section).
** <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.
=== VcfRecordFilter ===
<code>VcfRecords</code> contain the data from the <code>INFO</code> field in a <code>VcfRecordFilter</code> object.