Showing tool doc from version 4.6.2.0 | The latest version is
4.6.2.0

SelectVariants

Select a subset of variants from a VCF file

Category Variant Manipulation


Overview

Select a subset of variants from a VCF file

This tool makes it possible to select a subset of variants based on various criteria in order to facilitate certain analyses. Examples of such analyses include comparing and contrasting cases vs. controls, extracting variant or non-variant loci that meet certain requirements, or troubleshooting some unexpected results, to name a few.

There are many different options for selecting subsets of variants from a larger callset:

There are also several options for recording the original values of certain annotations which are recalculated when one subsets the new callset, trims alleles, etc.

Input

A variant call set in VCF format from which a subset can be selected.

Output

A new VCF file containing the selected subset of variants.

*

Usage examples

Select SNPs

     gatk SelectVariants \
     -R Homo_sapiens_assembly38.fasta \
     -V input.vcf \
     --select-type-to-include SNP \
     -O output.vcf
 

Query Chromosome 20 Variants from a GenomicsDB

     gatk SelectVariants \
     -R Homo_sapiens_assembly38.fasta \
     -V gendb://genomicsDB \
     -L 20 \
     -O output.chr20.vcf
 

Use JEXL Expressions to filter variants by INFO fields

     gatk SelectVariants \
     -R Homo_sapiens_assembly38.fasta \
     -V input.vcf \
     -select "AF > 0.001" \
     -O output.vcf
 

Use JEXL Expressions to filter variants by genotype fields. The variant will be kept in the output vcf if at least one sample meets the criterion.

     gatk SelectVariants \
     -R Homo_sapiens_assembly38.fasta \
     -V input.vcf \
     -select-genotype "GQ > 50" \
     -O output.vcf
 

Filter by a genotype field in a specific sample (e.g. NA12878) by directly accessing the VariantContext object with -select. Contrast this to -select-genotype (see above), which looks at the genotype field for all samples.

     gatk SelectVariants \
     -R Homo_sapiens_assembly38.fasta \
     -V input.vcf \
     -select "vc.getGenotype('NA12878').getGQ() > 35" \
     -O output.vcf
 

We recommend that a -select expression that contains the logical-or be split into two separate -select arguments, as in the first example. This approach is robust to the case where one of the arguments to the logical-or evaluates to null. For example, the filtering expression of the following command is equivalent to "AF > 0.01 || MQ > 55".

     gatk SelectVariants \
     -R Homo_sapiens_assembly38.fasta \
     -V input.vcf \
     -select "AF > 0.01" \
     -select "MQ > 55" \
     -O output.vcf
 

On the other hand, the logical-and expression must be a single -select expression.

     gatk SelectVariants \
     -R Homo_sapiens_assembly38.fasta \
     -V input.vcf \
     -select "AF > 0.01 && MQ > 55" \
     -O output.vcf
 

Additional Information

Read filters

This Read Filter is automatically applied to the data by the Engine before processing by SelectVariants.

SelectVariants 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 Arguments
--output
 -O
Path to which variants should be written
--variant
 -V
A VCF file containing variants
Optional Tool Arguments
--apply-jexl-filters-first
 -jexl-first
false Apply JEXL-based filtering before subsetting samples
--arguments_file
read one or more arguments files and add them to the command line
--call-genotypes
false Output called genotypes in final VCF (otherwise no-call)
--cloud-index-prefetch-buffer
 -CIPB
-1 Size of the cloud-only prefetch buffer (in MB; 0 to disable). Defaults to cloudPrefetchBuffer if unset.
--cloud-prefetch-buffer
 -CPB
40 Size of the cloud-only prefetch buffer (in MB; 0 to disable).
--concordance
 -conc
Output variants also called in this comparison track
--disable-bam-index-caching
 -DBIC
false If true, don't cache bam indexes, this will reduce memory requirements but may harm performance if many intervals are specified. Caching is automatically disabled if there are no intervals specified.
--disable-sequence-dictionary-validation
false If specified, do not check the sequence dictionaries from our inputs for compatibility. Use at your own risk!
--discordance
 -disc
Output variants not called in this comparison track
--drop-genotype-annotation
 -DGA
Genotype annotations to drop from output vcf. Annotations to be dropped are specified by their key.
--drop-info-annotation
 -DA
Info annotations to drop from output vcf. Annotations to be dropped are specified by their key.
--exclude-filtered
false Don't include filtered sites
--exclude-ids
 -xl-ids
List of variant rsIDs to exclude
--exclude-non-variants
false Don't include non-variant sites
--exclude-sample-expressions
 -xl-se
List of sample expressions to exclude
--exclude-sample-name
 -xl-sn
Exclude genotypes from this sample
--gcs-max-retries
 -gcs-retries
20 If the GCS bucket channel errors out, how many times it will attempt to re-initiate the connection
--gcs-project-for-requester-pays
Project to bill when accessing "requester pays" buckets. If unset, these buckets cannot be accessed. User must have storage.buckets.get permission on the bucket being accessed.
--genomicsdb-max-alternate-alleles
50 Maximum number of alternate alleles that will be combined on reading from GenomicsDB
--genomicsdb-shared-posixfs-optimizations
false Allow for optimizations to improve the usability and performance for shared Posix Filesystems(e.g. NFS, Lustre). If set, file level locking is disabled and file system writes are minimized.
--genomicsdb-use-gcs-hdfs-connector
false Use the GCS HDFS Connector instead of the native GCS SDK client with gs:// URLs.
--help
 -h
false display the help message
--ignore-non-ref-in-types
false If set, NON_REF alleles will be ignored for variant type determination, which is required for filtering GVCF files by type
--interval-merging-rule
 -imr
ALL Interval merging rule for abutting intervals
--intervals
 -L
One or more genomic intervals over which to operate
--invert-mendelian-violation
false Output non-mendelian violation sites only
--invertSelect
 -invert-select
false Invert the selection criteria for -select
--keep-ids
 -ids
List of variant rsIDs to select
--keep-original-ac
false Store the original AC, AF, and AN values after subsetting
--keep-original-dp
false Store the original DP value after subsetting
--max-filtered-genotypes
2147483647 Maximum number of samples filtered at the genotype level
--max-fraction-filtered-genotypes
1.0 Maximum fraction of samples filtered at the genotype level
--max-indel-size
2147483647 Maximum size of indels to include
--max-nocall-fraction
1.0 Maximum fraction of samples with no-call genotypes
--max-nocall-number
2147483647 Maximum number of samples with no-call genotypes
--mendelian-violation
false Output mendelian violation sites only
--mendelian-violation-qual-threshold
0.0 Minimum GQ score for each trio member to accept a site as a violation
--min-filtered-genotypes
0 Minimum number of samples filtered at the genotype level
--min-fraction-filtered-genotypes
0.0 Maximum fraction of samples filtered at the genotype level
--min-indel-size
0 Minimum size of indels to include
--pedigree
 -ped
Pedigree file
--preserve-alleles
false Preserve original alleles, do not trim
--reference
 -R
Reference sequence
--remove-fraction-genotypes
0.0 Select a fraction of genotypes at random from the input and sets them to no-call
--remove-unused-alternates
false Remove alternate alleles not present in any genotypes
--restrict-alleles-to
ALL Select only variants of a particular allelicity
--sample-expressions
 -se
Regular expression to select multiple samples
--sample-name
 -sn
Include genotypes from this sample
--select
A filtering expression in terms of either INFO fields or the VariantContext object). If the expression evaluates to true for a variant, it will be kept in the output vcf.
--select-genotype-expressions
 -select-genotype
A filtering expression in terms of FORMAT fields. If the expression evaluates to true for a variant, it will be kept in the output vcf.
--select-random-fraction
 -fraction
1.0 Select a fraction of variants at random from the input
--select-type-to-exclude
 -xl-select-type
Do not select certain type of variants from the input file
--select-type-to-include
 -select-type
Select only a certain type of variants from the input file
--set-filtered-gt-to-nocall
false Set filtered genotypes to no-call
--sites-only-vcf-output
false If true, don't emit genotype fields when writing vcf file output.
--version
false display the version number for this tool
Optional Common Arguments
--add-output-sam-program-record
true If true, adds a PG tag to created SAM/BAM/CRAM files.
--add-output-vcf-command-line
true If true, adds a command line header line to created VCF files.
--create-output-bam-index
 -OBI
true If true, create a BAM/CRAM index when writing a coordinate-sorted BAM/CRAM file.
--create-output-bam-md5
 -OBM
false If true, create a MD5 digest for any BAM/SAM/CRAM file created
--create-output-variant-index
 -OVI
true If true, create a VCF index when writing a coordinate-sorted VCF file.
--create-output-variant-md5
 -OVM
false If true, create a a MD5 digest any VCF file created.
--disable-read-filter
 -DF
Read filters to be disabled before analysis
--disable-tool-default-read-filters
false Disable all tool default read filters (WARNING: many tools will not function correctly without their default read filters on)
--exclude-intervals
 -XL
One or more genomic intervals to exclude from processing
--gatk-config-file
A configuration file to use with the GATK.
--input
 -I
BAM/SAM/CRAM file containing reads
--interval-exclusion-padding
 -ixp
0 Amount of padding (in bp) to add to each interval you are excluding.
--interval-padding
 -ip
0 Amount of padding (in bp) to add to each interval you are including.
--interval-set-rule
 -isr
UNION Set merging approach to use for combining interval inputs
--inverted-read-filter
 -XRF
Inverted (with flipped acceptance/failure conditions) read filters applied before analysis (after regular read filters).
--lenient
 -LE
false Lenient processing of VCF files
--max-variants-per-shard
0 If non-zero, partitions VCF output into shards, each containing up to the given number of records.
--QUIET
false Whether to suppress job-summary info on System.err.
--read-filter
 -RF
Read filters to be applied before analysis
--read-index
Indices to use for the read inputs. If specified, an index must be provided for every read input and in the same order as the read inputs. If this argument is not specified, the path to the index for each input will be inferred automatically.
--read-validation-stringency
 -VS
SILENT Validation stringency for all SAM/BAM/CRAM/SRA files read by this program. The default stringency value SILENT can improve performance when processing a BAM file in which variable-length data (read, qualities, tags) do not otherwise need to be decoded.
--seconds-between-progress-updates
10.0 Output traversal statistics every time this many seconds elapse
--sequence-dictionary
Use the given sequence dictionary as the master/canonical sequence dictionary. Must be a .dict file.
--tmp-dir
Temp directory to use.
--use-jdk-deflater
 -jdk-deflater
false Whether to use the JdkDeflater (as opposed to IntelDeflater)
--use-jdk-inflater
 -jdk-inflater
false Whether to use the JdkInflater (as opposed to IntelInflater)
--verbosity
INFO Control verbosity of logging.
Advanced Arguments
--genomicsdb-use-bcf-codec
false Use BCF Codec Streaming for data from GenomicsDB instead of the default VCFCodec. BCFCodec performs slightly better but currently does not support 64-bit width positions and INFO fields and for computed annotation sizes to exceed 32-bit integer space.
--showHidden
false display hidden arguments
--variant-output-filtering
Restrict the output variants to ones that match the specified intervals according to the specified matching mode.

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.


--add-output-sam-program-record / -add-output-sam-program-record

If true, adds a PG tag to created SAM/BAM/CRAM files.

boolean  true


--add-output-vcf-command-line / -add-output-vcf-command-line

If true, adds a command line header line to created VCF files.

boolean  true


--apply-jexl-filters-first / -jexl-first

Apply JEXL-based filtering before subsetting samples

boolean  false


--arguments_file

read one or more arguments files and add them to the command line

List[File]  []


--call-genotypes

Output called genotypes in final VCF (otherwise no-call)
Output called genotypes in the final VCF (otherwise no-call)

boolean  false


--cloud-index-prefetch-buffer / -CIPB

Size of the cloud-only prefetch buffer (in MB; 0 to disable). Defaults to cloudPrefetchBuffer if unset.

int  -1  [ [ -∞  ∞ ] ]


--cloud-prefetch-buffer / -CPB

Size of the cloud-only prefetch buffer (in MB; 0 to disable).

int  40  [ [ -∞  ∞ ] ]


--concordance / -conc

Output variants also called in this comparison track
A site is considered concordant if (1) we are not looking for specific samples and there is a variant called in both the variant and concordance tracks or (2) every sample present in the variant track is present in the concordance track and they have the sample genotype call.

FeatureInput[VariantContext]  null


--create-output-bam-index / -OBI

If true, create a BAM/CRAM index when writing a coordinate-sorted BAM/CRAM file.

boolean  true


--create-output-bam-md5 / -OBM

If true, create a MD5 digest for any BAM/SAM/CRAM file created

boolean  false


--create-output-variant-index / -OVI

If true, create a VCF index when writing a coordinate-sorted VCF file.

boolean  true


--create-output-variant-md5 / -OVM

If true, create a a MD5 digest any VCF file created.

boolean  false


--disable-bam-index-caching / -DBIC

If true, don't cache bam indexes, this will reduce memory requirements but may harm performance if many intervals are specified. Caching is automatically disabled if there are no intervals specified.

boolean  false


--disable-read-filter / -DF

Read filters to be disabled before analysis

List[String]  []


--disable-sequence-dictionary-validation / -disable-sequence-dictionary-validation

If specified, do not check the sequence dictionaries from our inputs for compatibility. Use at your own risk!

boolean  false


--disable-tool-default-read-filters / -disable-tool-default-read-filters

Disable all tool default read filters (WARNING: many tools will not function correctly without their default read filters on)

boolean  false


--discordance / -disc

Output variants not called in this comparison track
A site is considered discordant if there exists some sample in the variant track that has a non-reference genotype and either the site isn't present in this track, the sample isn't present in this track, or the sample is called reference in this track.

FeatureInput[VariantContext]  null


--drop-genotype-annotation / -DGA

Genotype annotations to drop from output vcf. Annotations to be dropped are specified by their key.
Genotype annotation fields to be dropped (specified by key)

List[String]  []


--drop-info-annotation / -DA

Info annotations to drop from output vcf. Annotations to be dropped are specified by their key.
Info annotation fields to be dropped (specified by key)

List[String]  []


--exclude-filtered

Don't include filtered sites
If this flag is enabled, sites that have been marked as filtered (i.e. have anything other than `.` or `PASS` in the FILTER field) will be excluded from the output.

boolean  false


--exclude-ids / -xl-ids

List of variant rsIDs to exclude
List of IDs (or a .list file containing ids) to exclude. The tool will exclude variants whose ID field is present in this list of IDs. The matching is done by exact string matching. If a file, the file name must end in ".list", and the expected file format is simply plain text with one ID per line.

Set[String]  []


--exclude-intervals / -XL

One or more genomic intervals to exclude from processing
Use this argument to exclude certain parts of the genome from the analysis (like -L, but the opposite). This argument can be specified multiple times. You can use samtools-style intervals either explicitly on the command line (e.g. -XL 1 or -XL 1:100-200) or by loading in a file containing a list of intervals (e.g. -XL myFile.intervals). strings gathered from the command line -XL argument to be parsed into intervals to exclude

List[String]  []


--exclude-non-variants

Don't include non-variant sites

boolean  false


--exclude-sample-expressions / -xl-se

List of sample expressions to exclude
Using a regular expression allows you to match multiple sample names that have that pattern in common. Note that sample exclusion takes precedence over inclusion, so that if a sample is in both lists it will be excluded. This argument can be specified multiple times in order to use multiple different matching patterns.

Set[String]  []


--exclude-sample-name / -xl-sn

Exclude genotypes from this sample
Note that sample exclusion takes precedence over inclusion, so that if a sample is in both lists it will be excluded. This argument can be specified multiple times in order to provide multiple sample names, or to specify the name of one or more files containing sample names. File names must use the extension ".args", and the expected file format is simply plain text with one sample name per line.

Set[String]  []


--gatk-config-file

A configuration file to use with the GATK.

String  null


--gcs-max-retries / -gcs-retries

If the GCS bucket channel errors out, how many times it will attempt to re-initiate the connection

int  20  [ [ -∞  ∞ ] ]


--gcs-project-for-requester-pays

Project to bill when accessing "requester pays" buckets. If unset, these buckets cannot be accessed. User must have storage.buckets.get permission on the bucket being accessed.

String  ""


--genomicsdb-max-alternate-alleles

Maximum number of alternate alleles that will be combined on reading from GenomicsDB
Maximum number of alternate alleles that will report likelihoods after being combined on reading from GenomicsDB (including ) Must be at least one greater than the maximum number of alternate alleles for genotyping. A typical value is 3 more than the --max-alternate-alleles value that's used by GenotypeGVCFs and larger differences result in more robustness to PCR-related indel errors. NOTE: GenotypeGVCFs will drop multi-allelic sites with more than this many alternate alleles since they are missing likelihoods. See also

int  50  [ [ -∞  ∞ ] ]


--genomicsdb-shared-posixfs-optimizations

Allow for optimizations to improve the usability and performance for shared Posix Filesystems(e.g. NFS, Lustre). If set, file level locking is disabled and file system writes are minimized.

boolean  false


--genomicsdb-use-bcf-codec

Use BCF Codec Streaming for data from GenomicsDB instead of the default VCFCodec. BCFCodec performs slightly better but currently does not support 64-bit width positions and INFO fields and for computed annotation sizes to exceed 32-bit integer space.
Currently there is no support for 64-bit fields in BCF2Codec. The VCFCodec allows for 64-bit width positions and INFO fields and for computed annotation sizes to exceed the 32-bit integer space while encoding/decoding with GenomicsDB. Use the BCF2Codec option if and only if performance is an issue.

boolean  false


--genomicsdb-use-gcs-hdfs-connector

Use the GCS HDFS Connector instead of the native GCS SDK client with gs:// URLs.

boolean  false


--help / -h

display the help message

boolean  false


--ignore-non-ref-in-types

If set, NON_REF alleles will be ignored for variant type determination, which is required for filtering GVCF files by type
When this argument is set, NON_REF alleles will not be considered for the variant type determination. This is necessary because every variant in a GVCF file would otherwise be assigned the type MIXED, which makes it impossible to filter for e.g. SNPs. If only NON_REF alleles are present at a given site it will still be considered SYMBOLIC.

boolean  false


--input / -I

BAM/SAM/CRAM file containing reads

List[GATKPath]  []


--interval-exclusion-padding / -ixp

Amount of padding (in bp) to add to each interval you are excluding.
Use this to add padding to the intervals specified using -XL. For example, '-XL 1:100' with a padding value of 20 would turn into '-XL 1:80-120'. This is typically used to add padding around targets when analyzing exomes.

int  0  [ [ -∞  ∞ ] ]


--interval-merging-rule / -imr

Interval merging rule for abutting intervals
By default, the program merges abutting intervals (i.e. intervals that are directly side-by-side but do not actually overlap) into a single continuous interval. However you can change this behavior if you want them to be treated as separate intervals instead.

The --interval-merging-rule argument is an enumerated type (IntervalMergingRule), which can have one of the following values:

ALL
OVERLAPPING_ONLY

IntervalMergingRule  ALL


--interval-padding / -ip

Amount of padding (in bp) to add to each interval you are including.
Use this to add padding to the intervals specified using -L. For example, '-L 1:100' with a padding value of 20 would turn into '-L 1:80-120'. This is typically used to add padding around targets when analyzing exomes.

int  0  [ [ -∞  ∞ ] ]


--interval-set-rule / -isr

Set merging approach to use for combining interval inputs
By default, the program will take the UNION of all intervals specified using -L and/or -XL. However, you can change this setting for -L, for example if you want to take the INTERSECTION of the sets instead. E.g. to perform the analysis only on chromosome 1 exomes, you could specify -L exomes.intervals -L 1 --interval-set-rule INTERSECTION. However, it is not possible to modify the merging approach for intervals passed using -XL (they will always be merged using UNION). Note that if you specify both -L and -XL, the -XL interval set will be subtracted from the -L interval set.

The --interval-set-rule argument is an enumerated type (IntervalSetRule), which can have one of the following values:

UNION
Take the union of all intervals
INTERSECTION
Take the intersection of intervals (the subset that overlaps all intervals specified)

IntervalSetRule  UNION


--intervals / -L

One or more genomic intervals over which to operate

List[String]  []


--invert-mendelian-violation

Output non-mendelian violation sites only
If this flag is enabled, this tool will select only variants that do not correspond to a mendelian violation as determined on the basis of family structure. Requires passing a pedigree file using the engine-level `-ped` argument.

Boolean  false


--inverted-read-filter / -XRF

Inverted (with flipped acceptance/failure conditions) read filters applied before analysis (after regular read filters).

List[String]  []


--invertSelect / -invert-select

Invert the selection criteria for -select
Invert the selection criteria for -select.

boolean  false


--keep-ids / -ids

List of variant rsIDs to select
List of IDs (or a .list file containing ids) to select. The tool will only select variants whose ID field is present in this list of IDs. The matching is done by exact string matching. If a file, the file name must end in ".list", and the expected file format is simply plain text with one ID per line.

Set[String]  []


--keep-original-ac

Store the original AC, AF, and AN values after subsetting
When subsetting a callset, this tool recalculates the AC, AF, and AN values corresponding to the contents of the subset. If this flag is enabled, the original values of those annotations will be stored in new annotations called AC_Orig, AF_Orig, and AN_Orig.

boolean  false


--keep-original-dp

Store the original DP value after subsetting
When subsetting a callset, this tool recalculates the site-level (INFO field) DP value corresponding to the contents of the subset. If this flag is enabled, the original value of the DP annotation will be stored in a new annotation called DP_Orig.

boolean  false


--lenient / -LE

Lenient processing of VCF files

boolean  false


--max-filtered-genotypes

Maximum number of samples filtered at the genotype level
If this argument is provided, select sites where at most a maximum number of samples are filtered at the genotype level.

int  2147483647  [ [ -∞  ∞ ] ]


--max-fraction-filtered-genotypes

Maximum fraction of samples filtered at the genotype level
If this argument is provided, select sites where a fraction or less of the samples are filtered at the genotype level.

double  1.0  [ [ -∞  ∞ ] ]


--max-indel-size

Maximum size of indels to include
If this argument is provided, indels that are larger than the specified size will be excluded.

int  2147483647  [ [ -∞  ∞ ] ]


--max-nocall-fraction

Maximum fraction of samples with no-call genotypes
If this argument is provided, select sites where at most the given fraction of samples have no-call genotypes.

double  1.0  [ [ -∞  ∞ ] ]


--max-nocall-number

Maximum number of samples with no-call genotypes
If this argument is provided, select sites where at most the given number of samples have no-call genotypes.

int  2147483647  [ [ -∞  ∞ ] ]


--max-variants-per-shard

If non-zero, partitions VCF output into shards, each containing up to the given number of records.

int  0  [ [ 0  ∞ ] ]


--mendelian-violation

Output mendelian violation sites only
If this flag is enabled, this tool will select only variants that correspond to a mendelian violation as determined on the basis of family structure. Requires passing a pedigree file using the engine-level `-ped` argument.

Boolean  false


--mendelian-violation-qual-threshold

Minimum GQ score for each trio member to accept a site as a violation
This argument specifies the genotype quality (GQ) threshold that all members of a trio must have in order for a site to be accepted as a mendelian violation. Note that the `-mv` flag must be set for this argument to have an effect.

double  0.0  [ [ -∞  ∞ ] ]


--min-filtered-genotypes

Minimum number of samples filtered at the genotype level
If this argument is provided, select sites where at least a minimum number of samples are filtered at the genotype level.

int  0  [ [ -∞  ∞ ] ]


--min-fraction-filtered-genotypes

Maximum fraction of samples filtered at the genotype level
If this argument is provided, select sites where a fraction or more of the samples are filtered at the genotype level.

double  0.0  [ [ -∞  ∞ ] ]


--min-indel-size

Minimum size of indels to include
If this argument is provided, indels that are smaller than the specified size will be excluded.

int  0  [ [ -∞  ∞ ] ]


--output / -O

Path to which variants should be written

R GATKPath  null


--pedigree / -ped

Pedigree file

GATKPath  null


--preserve-alleles

Preserve original alleles, do not trim
The default behavior of this tool is to remove bases common to all remaining alleles after subsetting operations have been completed, leaving only their minimal representation. If this flag is enabled, the original alleles will be preserved as recorded in the input VCF.

boolean  false


--QUIET

Whether to suppress job-summary info on System.err.

Boolean  false


--read-filter / -RF

Read filters to be applied before analysis

List[String]  []


--read-index / -read-index

Indices to use for the read inputs. If specified, an index must be provided for every read input and in the same order as the read inputs. If this argument is not specified, the path to the index for each input will be inferred automatically.

List[GATKPath]  []


--read-validation-stringency / -VS

Validation stringency for all SAM/BAM/CRAM/SRA files read by this program. The default stringency value SILENT can improve performance when processing a BAM file in which variable-length data (read, qualities, tags) do not otherwise need to be decoded.

The --read-validation-stringency argument is an enumerated type (ValidationStringency), which can have one of the following values:

STRICT
LENIENT
SILENT

ValidationStringency  SILENT


--reference / -R

Reference sequence

GATKPath  null


--remove-fraction-genotypes

Select a fraction of genotypes at random from the input and sets them to no-call
The value of this argument should be a number between 0 and 1 specifying the fraction of total variants to be randomly selected from the input callset and set to no-call (./). Note that this is done using a probabilistic function, so the final result is not guaranteed to carry the exact fraction requested. Can be used for large fractions.

double  0.0  [ [ -∞  ∞ ] ]


--remove-unused-alternates

Remove alternate alleles not present in any genotypes
When this flag is enabled, all alternate alleles that are not present in the (output) samples will be removed. Note that this even extends to biallelic SNPs - if the alternate allele is not present in any sample, it will be removed and the record will contain a '.' in the ALT column. Note also that sites-only VCFs, by definition, do not include the alternate allele in any genotype calls. Further note that PLs will be trimmed appropriately, removing likelihood information (even for homozygous reference calls).

boolean  false


--restrict-alleles-to

Select only variants of a particular allelicity
When this argument is used, we can choose to include only multiallelic or biallelic sites, depending on how many alleles are listed in the ALT column of a VCF. For example, a multiallelic record such as: 1 100 . A AAA,AAAAA will be excluded if `-restrict-alleles-to BIALLELIC` is used, because there are two alternate alleles, whereas a record such as: 1 100 . A T will be included in that case, but would be excluded if `-restrict-alleles-to MULTIALLELIC` is used. Valid options are ALL (default), MULTIALLELIC or BIALLELIC.

The --restrict-alleles-to argument is an enumerated type (NumberAlleleRestriction), which can have one of the following values:

ALL
BIALLELIC
MULTIALLELIC

NumberAlleleRestriction  ALL


--sample-expressions / -se

Regular expression to select multiple samples
Using a regular expression allows you to match multiple sample names that have that pattern in common. This argument can be specified multiple times in order to use multiple different matching patterns.

Set[String]  []


--sample-name / -sn

Include genotypes from this sample
This argument can be specified multiple times in order to provide multiple sample names, or to specify the name of one or more files containing sample names. File names must use the extension ".args", and the expected file format is simply plain text with one sample name per line. Note that sample exclusion takes precedence over inclusion, so that if a sample is in both lists it will be excluded.

Set[String]  []


--seconds-between-progress-updates / -seconds-between-progress-updates

Output traversal statistics every time this many seconds elapse

double  10.0  [ [ -∞  ∞ ] ]


--select

A filtering expression in terms of either INFO fields or the VariantContext object). If the expression evaluates to true for a variant, it will be kept in the output vcf.

ArrayList[String]  []


--select-genotype-expressions / -select-genotype

A filtering expression in terms of FORMAT fields. If the expression evaluates to true for a variant, it will be kept in the output vcf.

ArrayList[String]  []


--select-random-fraction / -fraction

Select a fraction of variants at random from the input

double  1.0  [ [ -∞  ∞ ] ]


--select-type-to-exclude / -xl-select-type

Do not select certain type of variants from the input file
This argument excludes particular kinds of variants out of a list. If left empty, there is no type selection and all variant types are considered for other selection criteria. Valid types are INDEL, SNP, MIXED, MNP, SYMBOLIC, NO_VARIATION. Can be specified multiple times.

The --select-type-to-exclude argument is an enumerated type (List[Type]), which can have one of the following values:

NO_VARIATION
SNP
MNP
INDEL
SYMBOLIC
MIXED

List[Type]  []


--select-type-to-include / -select-type

Select only a certain type of variants from the input file
This argument selects particular kinds of variants out of a list. If left empty, there is no type selection and all variant types are considered for other selection criteria. Valid types are INDEL, SNP, MIXED, MNP, SYMBOLIC, NO_VARIATION. Can be specified multiple times.

The --select-type-to-include argument is an enumerated type (List[Type]), which can have one of the following values:

NO_VARIATION
SNP
MNP
INDEL
SYMBOLIC
MIXED

List[Type]  []


--sequence-dictionary / -sequence-dictionary

Use the given sequence dictionary as the master/canonical sequence dictionary. Must be a .dict file.

GATKPath  null


--set-filtered-gt-to-nocall

Set filtered genotypes to no-call
If this argument is provided, set filtered genotypes to no-call (./.).

boolean  false


--showHidden / -showHidden

display hidden arguments

boolean  false


--sites-only-vcf-output

If true, don't emit genotype fields when writing vcf file output.

boolean  false


--tmp-dir

Temp directory to use.

GATKPath  null


--use-jdk-deflater / -jdk-deflater

Whether to use the JdkDeflater (as opposed to IntelDeflater)

boolean  false


--use-jdk-inflater / -jdk-inflater

Whether to use the JdkInflater (as opposed to IntelInflater)

boolean  false


--variant / -V

A VCF file containing variants

R GATKPath  null


--variant-output-filtering

Restrict the output variants to ones that match the specified intervals according to the specified matching mode.

The --variant-output-filtering argument is an enumerated type (Mode), which can have one of the following values:

STARTS_IN
starts within any of the given intervals
ENDS_IN
ends within any of the given intervals
OVERLAPS
overlaps any of the given intervals
CONTAINED
contained completely within a contiguous block of intervals without overlap
ANYWHERE
no filtering

Mode  null


--verbosity / -verbosity

Control verbosity of logging.

The --verbosity argument is an enumerated type (LogLevel), which can have one of the following values:

ERROR
WARNING
INFO
DEBUG

LogLevel  INFO


--version

display the version number for this tool

boolean  false


Return to top


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

GATK version 4.6.2.0 built at Sun, 13 Apr 2025 13:21:43 -0400.