gatk4/gatk4_variantfiltration
variant filtering
GATK
GATK4
hard filtering
VCF
Description
Filter variant calls based on INFO and/or FORMAT annotations.
This tool is designed for hard-filtering variant calls based on certain
criteria. Records are hard-filtered by changing the value in the FILTER field
to something other than PASS. Filtered records will be preserved in the
output unless their removal is requested. Site-level filters are supplied as
one or more JEXL expressions via --filter_expression with a name via--filter_name.
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 be filtered. |
--reference -R | file | Reference genome FASTA file. Optional for `VariantFiltration` 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 with the `FILTER` column annotated. |
Options
Name | Type & Properties | Description |
|---|---|---|
--apply_allele_specific_filters | boolean_true | Set the mask at the allele level rather than the site level. Not compatible with clustered-SNP filtering (`--cluster_size`/`--cluster_window_size`). |
--cluster_size -cluster | integer | The number of SNPs which make up a cluster. Must be at least 2. Used together with `--cluster_window_size` to enable clustered-SNP filtering. Requires `--variant` to support random access (e.g. bgzipped and tabix-indexed, or a plain VCF with an accompanying `.idx`). Default: 3. |
--cluster_window_size -window | integer | The window size (in bases) in which to evaluate clustered SNPs. A value of 0 disables clustered-SNP filtering. Requires `--variant` to support random access (e.g. bgzipped and tabix-indexed, or a plain VCF with an accompanying `.idx`). Default: 0. |
--filter_expression -filter | string multiple | One or more JEXL expressions used with INFO fields to filter, e.g. `"vc.isSNP() && QD < 2.0"`. Must be paired 1-to-1 with `--filter_name`. |
--filter_name | string multiple | Names for the list of site-level filters in `--filter_expression`. Recorded in the `FILTER` field for records that fail the corresponding expression. |
--filter_not_in_mask | boolean_true | Filter records that are NOT in the regions given by `--mask`. |
--genotype_filter_expression -G-filter | string multiple | One or more expressions used with FORMAT (sample/genotype-level) fields to filter, distinct from the site-level hard filters above. Must be paired 1-to-1 with `--genotype_filter_name`. |
--genotype_filter_name -G-filter-name | string multiple | Names for the list of genotype-level filters (1-to-1 mapping with `--genotype_filter_expression`); recorded in the FORMAT `FT` field for genotypes that fail the corresponding expression. |
--invalidate_previous_filters | boolean_true | Remove previous filters applied to the VCF before applying the filters requested here. |
--invert_filter_expression -invfilter | boolean_true | Invert the selection criteria for `--filter_expression`. |
--invert_genotype_filter_expression -invG-filter | boolean_true | Invert the selection criteria for `--genotype_filter_expression`. |
--mask | file | BED/VCF file of genomic regions used to mask (flag) variants that fall within (or near, see `--mask_extension`) them. |
--mask_description | string | Description to add to the FILTER field header line for the mask filter. |
--mask_extension | integer | How many bases beyond the regions in `--mask` should variants also be filtered. Default: 0. |
--mask_name | string | The text to put in the FILTER field if a variant overlaps (or is within `--mask_extension` of) the regions in `--mask`. Default: 'Mask'. |
--missing_values_evaluate_as_failing | boolean_true | When evaluating the JEXL filter expressions, treat missing INFO/FORMAT values as failing the expression rather than passing it. |
--set_filtered_genotype_to_no_call | boolean_true | Set genotypes that fail `--genotype_filter_expression` to no-call (`./.`) instead of leaving the original genotype call annotated with a FORMAT `FT` filter name. |
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_variantfiltration/main.nf \
-params-file params.yaml Relationships
Used by
0 relationships
No components use this component.
Current component
gatk4/gatk4_variantfiltrationbiobox v0.5.0
Uses
0 relationships
No component dependencies found.