Emits specific fields from a VCF file to a tab-deliminated table
This walker accepts a single VCF file and writes out user-selected fields from the VCF as a header-containing, tab-deliminated file. The user specifies one or more fields to print with the -F NAME, each of which appears as a single column in the output file, with a header named NAME, and the value of this field in the VCF one per line. NAME can be any standard VCF column (CHROM, ID, QUAL) or any binding in the INFO field (AC=10). In addition, there are specially supported values like EVENTLENGTH (length of the event), TRANSITION (for SNPs), HET (count of het genotypes), HOM-REF (count of homozygous reference genotypes), HOM-VAR (count of homozygous variant genotypes), NO-CALL (count of no-call genotypes), TYPE (the type of event), VAR (count of non-reference genotypes), NSAMPLES (number of samples), NCALLED (number of called samples), GQ (from the genotype field; works only for a file with a single sample), and MULTI-ALLELIC (is the record from a multi-allelic site). Note that if a VCF record is missing a value, then the tool by default throws an error, but the special value NA can be emitted instead with appropriate tool arguments.
A tab-delimited file containing the values of the requested fields in the VCF file
java -jar GenomeAnalysisTK.jar \ -R reference.fasta -T VariantsToTable \ -V file.vcf \ -F CHROM -F POS -F ID -F QUAL -F AC \ -o results.table would produce a file that looks like: CHROM POS ID QUAL AC 1 10 . 50 1 1 20 rs10 99 10 et cetera...
These Read Filters are automatically applied to the data by the Engine before processing by VariantsToTable.
This tool applies the following downsampling settings by default.
The arguments described in the entries below can be supplied to this tool to modify its behavior. For example, the -L argument directs the GATK engine restricts processing to specific genomic intervals (this is an Engine capability and is therefore available to all GATK walkers).
This table summarizes the command-line arguments that are specific to this tool. For details, see the list further down below the table.
|--variant||List[RodBinding[VariantContext]]||NA||Input VCF file|
|--out||PrintStream||stdout||File to which results should be written|
|--fields||List[String]||||The name of each field to capture for output in the table|
|--genotypeFields||List[String]||||The name of each genotype field to capture for output in the table|
|--maxRecords||int||-1||If provided, we will emit at most maxRecord records to the table|
|--splitMultiAllelic||boolean||false||If provided, we will split multi-allelic records into multiple lines of output|
|--allowMissingData||boolean||false||If provided, we will not require every record to contain every field|
|--moltenize||boolean||false||If provided, we will produce molten output|
|--showFiltered||boolean||false||If provided, field values from filtered records will be included in the output|
Arguments in this list are specific to this tool. Keep in mind that other arguments are available that are shared with other tools (e.g. command-line GATK arguments); see Inherited arguments above.
If provided, we will not require every record to contain every field. By default, this tool throws a UserException when it encounters a field without a value in some record. This is generally useful when you mistype -F CHROM, so that you get a friendly warning about CHROM not being found before the tool runs through 40M 1000G records. However, in some cases you genuinely want to allow such fields (e.g., AC not being calculated for filtered records, if included). When provided, this argument will cause VariantsToTable to write out NA values for missing fields instead of throwing an error.
The name of each field to capture for output in the table. -F NAME can be any standard VCF column (CHROM, ID, QUAL) or any binding in the INFO field (e.g., AC=10). Note that to capture GENOTYPE (FORMAT) field values, see the GF argument. This argument accepts any number of inputs. So -F CHROM -F POS is allowed.
The name of each genotype field to capture for output in the table. -GF NAME can be any binding in the FORMAT field (e.g., GQ, PL). Note this argument accepts any number of inputs. So -GF GQ -GF PL is allowed.
If provided, we will emit at most maxRecord records to the table. If provided, then this tool will exit with success after this number of VCF records have been emitted to the file.
If provided, we will produce molten output. By default, this tool emits one line per usable VCF record (or per allele if the -SMA flag is provided). Using the -moltenize flag will cause records to be split into multiple lines of output: one for each field provided with -F or one for each combination of sample and field provided with -GF. Note that the "Sample" column for -F fields will always be "site".
File to which results should be written.
If provided, field values from filtered records will be included in the output. By default this tool only emits values for fields where the FILTER field is either PASS or . (unfiltered). Throwing this flag will cause VariantsToTable to emit values regardless of the FILTER field value.
If provided, we will split multi-allelic records into multiple lines of output. By default, records with multiple ALT alleles will comprise just one line of output; note that in general this can make your resulting file unreadable/malformed for certain tools like R, as the representation of multi-allelic INFO field values are often comma-separated lists of values. Using the flag will cause multi-allelic records to be split into multiple lines of output (one for each allele in the ALT field); INFO field values that are not lists are copied for each of the output records while only the appropriate entry is used for lists.
Input VCF file. Variants from this VCF file are used by this tool as input. The file must at least contain the standard VCF header lines, but can be empty (i.e., no variants are contained in the file). --variant binds reference ordered data. This argument supports ROD files of the following types: BCF2, VCF, VCF3
GATK version 2.8-1-g2a26ec9 built at 2013/12/06 16:54:02.