gatk4/gatk4_selectvariants
variant selection
GATK
GATK4
VCF
filtering
Description
Selects a subset of variants from a VCF file based on various criteria.
This tool makes it possible to select a subset of variants based on
various criteria in order to facilitate certain analyses. Examples 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.
GATK Engine Options
Name | Type & Properties | Description |
|---|---|---|
--interval_padding -ip | integer | Amount of padding (in bp) to add to each interval specified via `--intervals`, to capture flanking context (e.g. near capture/exome-bait edges). Default: 0. A commonly-used value in GATK's own exome workflows is `100`. |
--sites_only_vcf_output | boolean_true | Only emit site-level information in the output VCF/GVCF, dropping the FORMAT/genotype columns. Useful for producing a compact, privacy-preserving sites-only VCF (e.g. for public release or QC). |
--create_output_variant_index -OVI | boolean | Create a VCF index (`.tbi`) when writing a coordinate-sorted VCF output. Default: true. |
--create_output_bam_index -OBI | boolean | Create a BAM/CRAM index when writing a coordinate-sorted BAM/CRAM output. Default: true. |
--output_cram_version | string | CRAM version to write for CRAM output ('3.0' or '3.1'). Ignored for BAM/SAM output. Note that CRAM 3.1 cannot be read by tools that only support CRAM 3.0. Default: '3.1'. |
--read_filter -RF | string multiple | Read filter(s) to apply before analysis, given by their GATK Java class name (e.g. `MappingQualityReadFilter`). Can be specified multiple times. |
--disable_read_filter -DF | string multiple | Read filter(s) to disable before analysis, given by their GATK Java class name. Can be specified multiple times. |
--disable_tool_default_read_filters | boolean_true | Disable all tool-default read filters. Many tools will not function correctly without their default read filters enabled, so use with caution. |
--disable_sequence_dictionary_validation | boolean_true | Do not check the input sequence dictionaries for compatibility. Useful when combining files from different sources with mismatched (but compatible) dictionaries. Use at your own risk. |
Input
Name | Type & Properties | Description |
|---|---|---|
--variant -V | file required | Input VCF file containing variants to select from. |
--reference -R | file | Reference genome FASTA file. Optional for `SelectVariants` itself, but if provided, `--reference_fai` and `--reference_dict` must be provided too. |
--reference_fai | file | FASTA index (`.fai`) file for the reference genome. |
--reference_dict | file | Sequence dictionary (`.dict`) file for the reference genome. |
Output
Name | Type & Properties | Description |
|---|---|---|
--output -O | file required output | Output VCF file containing the selected variants. |
Options
Name | Type & Properties | Description |
|---|---|---|
--apply_jexl_filters_first -jexl-first | boolean_true | Apply JEXL-based filtering (`--select_expressions`) before subsetting samples. |
--call_genotypes | boolean_true | Output called genotypes in the final VCF (otherwise no-call). |
--concordance -conc | file | Output variants that are also called in this comparison VCF track. |
--discordance -disc | file | Output variants that are not called in this comparison VCF track. |
--drop_genotype_annotation -DGA | string multiple | Genotype (`FORMAT`) annotations to drop from the output VCF, specified by their key. Can be specified multiple times. |
--drop_info_annotation -DA | string multiple | `INFO` annotations to drop from the output VCF, specified by their key. Can be specified multiple times. |
--exclude_filtered | boolean_true | Don't include filtered sites in the output VCF. |
--exclude_ids -xl-ids | string multiple | List of variant rsIDs to exclude. Can be specified multiple times. |
--exclude_intervals -XL | file | One or more genomic intervals to exclude from processing, provided as a file (e.g. BED, interval_list). |
--exclude_non_variants | boolean_true | Don't include non-variant sites in the output VCF. |
--exclude_sample_expressions -xl-se | string multiple | Regular expression(s) matching sample names to exclude. Can be specified multiple times. |
--exclude_sample_name -xl-sn | string multiple | Exclude genotypes from this sample. Can be specified multiple times. |
--ignore_non_ref_in_types | boolean_true | Ignore `NON_REF` alleles when determining variant type. Required for filtering GVCF files by type. |
--intervals -L | file | One or more genomic intervals over which to operate, provided as a file (e.g. BED, interval_list). |
--invert_mendelian_violation | boolean_true | Output non-Mendelian-violation sites only. |
--invert_select -invert-select | boolean_true | Invert the selection criteria specified by `--select_expressions`. |
--keep_ids -ids | string multiple | List of variant rsIDs to select. Can be specified multiple times. |
--keep_original_ac | boolean_true | Store the original `AC`, `AF`, and `AN` values after subsetting. |
--keep_original_dp | boolean_true | Store the original `DP` value after subsetting. |
--max_filtered_genotypes | integer | Maximum number of samples filtered at the genotype level. |
--max_fraction_filtered_genotypes | double | Maximum fraction of samples filtered at the genotype level. |
--max_indel_size | integer | Maximum size of indels to include. |
--max_nocall_fraction | double | Maximum fraction of samples with no-call genotypes. |
--max_nocall_number | integer | Maximum number of samples with no-call genotypes. |
--mendelian_violation | boolean_true | Output Mendelian violation sites only. |
--mendelian_violation_qual_threshold | double | Minimum GQ score for each trio member to accept a site as a Mendelian violation. |
--min_filtered_genotypes | integer | Minimum number of samples filtered at the genotype level. |
--min_fraction_filtered_genotypes | double | Minimum fraction of samples filtered at the genotype level. |
--min_indel_size | integer | Minimum size of indels to include. |
--pedigree -ped | file | Pedigree file, used for pedigree-based analyses such as Mendelian violation detection (`--mendelian_violation`, `--invert_mendelian_violation`). |
--preserve_alleles | boolean_true | Preserve original alleles, do not trim. |
--remove_fraction_genotypes | double | Select a fraction of genotypes at random from the input and set them to no-call. |
--remove_unused_alternates | boolean_true | Remove alternate alleles not present in any genotypes. |
--restrict_alleles_to | string | Select only variants of a particular allelicity. |
--sample_expressions -se | string multiple | Regular expression to select multiple samples. Can be specified multiple times. |
--sample_name -sn | string multiple | Include genotypes from this sample. Can be specified multiple times. |
--select_expressions --select | string multiple | A filtering expression in terms of either `INFO` fields or the `VariantContext` object (JEXL syntax). If the expression evaluates to `true` for a variant, it will be kept in the output VCF. Can be specified multiple times. |
--select_genotype_expressions -select-genotype | string multiple | 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. Can be specified multiple times. |
--select_random_fraction -fraction | double | Select a fraction of variants at random from the input. |
--select_type_to_exclude -xl-select-type | string multiple | Do not select certain type of variants from the input file. Can be specified multiple times. |
--select_type_to_include -select-type | string multiple | Select only a certain type of variants from the input file. Can be specified multiple times. |
--set_filtered_gt_to_nocall | boolean_true | Set filtered genotypes to no-call. |
Run this component
Run the following command to execute this component with Nextflow:
cat > params.yaml <<'EOM'
output: "$id.$key.output.gz"
id: "run"
publish_dir: "output/"
EOM
nextflow run https://packages.viash-hub.com/vsh/biobox.git \
-revision v0.5.0 \
-main-script target/nextflow/gatk4/gatk4_selectvariants/main.nf \
-params-file params.yaml Relationships
Used by
0 relationships
No components use this component.
Current component
gatk4/gatk4_selectvariantsbiobox v0.5.0
Uses
0 relationships
No component dependencies found.