Version: 1
Author: GenePattern Team, Broad Institute
Contact: gp-help@broadinstitute.org
Algorithm Version: GATK 4.1.4.1
gatk.SelectVariants selects a subset of variants from a VCF file based on one or more filtering criteria. The output is a new VCF containing only the variants that meet the specified criteria, with AN, AC, and AF annotations automatically recalculated for the selected subset.
Typical workflow position:
Mutect2 / HaplotypeCaller
|
v
[raw variants VCF]
|
v
gatk.SelectVariants <-- this module
|
v
[filtered subset VCF]
|
v
Downstream analysis (annotation, filtering, etc.)
Common use cases include:
- Extracting only SNPs or only INDELs for separate VQSR/filtering pipelines
- Subsetting to a single sample from a multi-sample VCF
- Selecting high-confidence variants using JEXL expressions (e.g.,
AF > 0.01) - Removing filtered sites or reference-only calls from a VCF
- GATK SelectVariants documentation
- Van der Auwera GA & O'Connor BD. (2020). Genomics in the Cloud: Using Docker, GATK, and WDL in Terra. O'Reilly Media.
| Name | Description | Default |
|---|---|---|
| input.vcf | Input VCF file containing variants to be subsetted (.vcf or .vcf.gz) | -- |
| input.vcf.tbi | Tabix index (.tbi) for bgzip-compressed input VCF; required when input is .vcf.gz | -- |
| reference | Reference genome FASTA file (same reference used for alignment and variant calling) | -- |
| reference.fai | FASTA index (.fai) for the reference; generated by samtools faidx | -- |
| reference.dict | Sequence dictionary (.dict) for the reference; generated by GATK/Picard CreateSequenceDictionary | -- |
| output.vcf.name | Name for the output VCF file | selected.vcf |
| select.type.to.include | Select only variants of a specific type: SNP, INDEL, MIXED, MNP, SYMBOLIC, or NO_VARIATION | -- |
| select.expressions | JEXL expression for variant filtering (e.g., AF > 0.001, DP > 100) |
-- |
| exclude.filtered | When Yes, exclude variants with any FILTER value other than PASS | -- |
| exclude.non.variants | When Yes, exclude sites where no sample carries an alternate allele | -- |
| remove.unused.alternates | When Yes, remove alternate alleles absent from all output genotypes | -- |
| keep.original.chr.counts | When Yes, store original AC/AF/AN values in AC_Orig/AF_Orig/AN_Orig fields | -- |
| sample.name | Include only genotypes from this sample; AC/AF/AN are recalculated for the subset | -- |
| arguments.file | GATK arguments file for advanced options not exposed as parameters | -- |
| gatk.config.file | GATK configuration file for customizing runtime behavior | -- |
-
input.vcf (required) -- VCF file of variants to subset. Accepted formats:
.vcf(uncompressed) or.vcf.gz(bgzip-compressed). If providing.vcf.gz, also supply the companion.tbitabix index. -
input.vcf.tbi (optional) -- Tabix index for the compressed input VCF. Must have the same base name as the input VCF with
.tbiappended (e.g.,variants.vcf.gz.tbi). -
reference (required) -- Reference genome FASTA. Must be the same reference used for alignment and variant calling. Companion
.faiand.dictfiles are required. -
reference.fai (required) -- FASTA index generated by
samtools faidx reference.fasta. Must correspond to the reference FASTA. -
reference.dict (required) -- Sequence dictionary generated by
gatk CreateSequenceDictionary -R reference.fasta. Must correspond to the reference FASTA. -
arguments.file (optional) -- Plain text file containing additional GATK SelectVariants arguments, one per line. Useful for advanced options or for specifying multiple
--sample-nameor--select-type-to-includevalues. Passed to GATK as--arguments_file. -
gatk.config.file (optional) -- GATK properties configuration file. Passed to GATK as
--gatk-config-file.
- <output.vcf.name> -- VCF file containing only the variants that met the selection criteria. AN, AC, and AF annotations are automatically recalculated for the selected subset. If
keep.original.chr.countsis enabled, original values are preserved inAC_Orig,AF_Orig, andAN_OrigINFO fields.
- Docker image:
broadinstitute/gatk:4.1.4.1 - Memory: 8 GB
- CPUs: 2
| Version | Comment |
|---|---|
| 1 | Initial release wrapping GATK 4.1.4.1 SelectVariants |