SelectHeaders

Selects headers from a VCF source

Category Variant Manipulation Tools

Traversal LocusWalker

PartitionBy LOCUS


Overview

Often, a VCF containing many headers will need to be subset in order to facilitate certain formatting guidelines. SelectHeaders can be used for this purpose. Given a single VCF file, one or more headers can be extracted from the file (based on a complete header name or a pattern match).

Input

A set of VCFs.

Output

A VCF with the selected headers.

Usage examples

Select only the FILTER, FORMAT, and INFO headers

 java -jar GenomeAnalysisTK.jar \
   -T SelectHeaders \
   -R reference.fasta \
   -V input.vcf \
   -o output.vcf \
   -hn FILTER \
   -hn FORMAT \
   -hn INFO
 

Select only the FILTER, FORMAT, and INFO headers and add in the reference file names

 java -jar GenomeAnalysisTK.jar \
   -T SelectHeaders \
   -R reference.fasta \
   -V input.vcf \
   -o output.vcf \
   -hn FILTER \
   -hn FORMAT \
   -hn INFO \
   -irn \
   -iln
 

Select only the FILTER, FORMAT, and INFO headers, plus any headers with "SnpEff"

 java -jar GenomeAnalysisTK.jar \
   -T SelectHeaders \
   -R reference.fasta \
   -V input.vcf \
   -o output.vcf \
   -hn FILTER \
   -hn FORMAT \
   -hn INFO \
   -he '.*SnpEff.*'
 

Additional Information

Read filters

These Read Filters are automatically applied to the data by the Engine before processing by SelectHeaders.

Parallelism options

This tool can be run in multi-threaded mode using this option.


Command-line Arguments

Engine arguments

All tools inherit arguments from the GATK Engine' "CommandLineGATK" argument collection, which can be used to modify various aspects of the tool's function. For example, the -L argument directs the GATK engine to restrict processing to specific genomic intervals; or the -rf argument allows you to apply certain read filters to exclude some of the data from the analysis.

SelectHeaders specific arguments

This table summarizes the command-line arguments that are specific to this tool. For more details on each argument, see the list further down below the table or click on an argument name to jump directly to that entry in the list.

Argument name(s) Default value Summary
Required Inputs
--variant
 -V
NA Input VCF file
Optional Outputs
--out
 -o
stdout File to which variants should be written
Optional Parameters
--exclude_header_name
 -xl_hn
NA Exclude header. Can be specified multiple times
--header_expression
 -he
NA Regular expression to select many headers from the tracks provided. Can be specified multiple times
--header_name
 -hn
NA Include header. Can be specified multiple times
Optional Flags
--include_interval_names
 -iln
false If set the interval file name minus the file extension, or the command line intervals, will be added to the headers

Argument details

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.


--exclude_header_name / -xl_hn

Exclude header. Can be specified multiple times
Note that header exclusion takes precedence over inclusion, so that if a header is in both lists it will be excluded.

Set[String]  NA


--header_expression / -he

Regular expression to select many headers from the tracks provided. Can be specified multiple times

Set[String]  NA


--header_name / -hn

Include header. Can be specified multiple times

Set[String]  NA


--include_interval_names / -iln

If set the interval file name minus the file extension, or the command line intervals, will be added to the headers
Note that interval name inclusion takes precedence over other header matching. If set other interval lines may be excluded but the intervals will still be added.

boolean  false


--out / -o

File to which variants should be written

VariantContextWriter  stdout


--variant / -V

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).

This argument supports reference-ordered data (ROD) files in the following formats: BCF2, VCF, VCF3

R RodBinding[VariantContext]  NA


Return to top


See also GATK Documentation Index | Tool Docs Index | Support Forum

GATK version 3.8-0-ge9d806836 built at 2017/07/29 01:40:22.