For the complete documentation index, see llms.txt. This page is also available as Markdown.

Population Genotyping

DRAGEN provides a population-based analysis option to jointly analyze samples from unrelated individuals.

The tool for population-based analysis is the iterative gVCF Genotyper (iGG). Its input is a set of single or multisample gVCFs. The output is a multisample VCF that contains one entry for any variant seen in any of the input gVCFs. The variants are genotyped across all input samples using information from the hom-ref blocks as necessary. The iterative gVCF Genotyper does not adjust genotypes based on population information but it provides the means to filter variant sites based on information leveraged from the population. See Iterative gVCF Genotyper analysis for information on the available command line options.

For practical command-line templates, see the iterative gVCF Genotyper recipes:

  • Large Cohort Recipe - Default multi-step workflow for most customers; writes cohort and census files and supports iterative analysis

  • Small Cohort Recipe - End-to-end mode for small trials only; does not write cohort or census files and does not support iterative analysis

Extended workflow examples (custom metric import, hard filtering, machine learning filtering, spVCF output, and multi-batch shell scripts) are in the sections End-to-end workflow examples and Multi-batch workflow examples below.

A population-based analysis requires a gVCF file for each sample. To create a gVCF file, run the germline small variant caller with the --vc-emit-ref-confidence gVCF option. There is also the option to write a germline gVCF with reduced size using the option --vc-compact-gvcf. This results in a significant speed up for a downstream analysis using the iterative gVCF Genotyper but with a small loss of accuracy at homozygous reference genotypes. Please note that this compact format is not compatible with a pedigree analysis. See additional description in Pedigree analysis section.

DRAGEN version compatibility for input gVCFs

We recommend that all input gVCF files used in a single gVCF Genotyper analysis be generated with the same major version of DRAGEN. Mixing gVCF files from different major DRAGEN versions (e.g., DRAGEN 3.x with DRAGEN 4.x) in the same cohort analysis is not supported and may lead to inconsistent results or analysis failures.

This recommendation applies to all deployment modes:

  • OnPrem HPC deployments

  • Platform Core cloud deployments using the PopGen CLI

  • OnPrem DRAGEN Server deployments

Minor version differences within the same major version (e.g., DRAGEN 4.2 with DRAGEN 4.3) are generally acceptable, but for best results using the same minor version across all samples is preferred.

The iterative gVCF Genotyper can accept input gVCF files generated using DRAGEN version 3.2.6 or later.

We also recommend using the same version of gVCF Genotyper for a project, if feasible.

Comparing multiple pedigrees

To compare multiple pedigrees, you can use gVCF Genotyper to merge the outputs of separate pedigree analyses into a single multisample VCF. First, run each pedigree analysis with the --enable-multi-sample-gvcf=true option to generate a multisample gVCF for each pedigree. Then, use gVCF Genotyper with these multisample gVCF files as input to produce a combined multisample VCF containing all pedigrees. Be sure to import the de novo call fields (FORMAT/DQ and FORMAT/DN) if you want to output the values to the combined msVCF (see gVCF metric import customization).

Iterative gVCF Genotyper Licensing

Iterative gVCF Genotyper is a licensed feature which is metered by the number of gigabases consumed from the input. Licensing applies to Step 1 (gVCF aggregation) and end-to-end mode, which read input gVCF files. Steps 2 (census aggregation) and Step 3 (msVCF generation) are not metered. The licensing experience depends on which of the three platforms below are used to run.

BioInsight Platform Core

When running the Iterative gVCF Genotyper (iGG) pipeline within Platform Core, there are two applicable charges;

  1. An informatics licensing cost in BioInsight Credits (BICs), metered by the gigabases of input consumed.

  2. The associated compute cost, dictated by the compute instance chosen. See the compute section of the Platform Core pricing reference.

To review your usage, more information on the usage explorer for Platform Core can be found in the Illumina BioInsight Platform Usage Explorer guide.

For how Platform Core runs are licensed and billed in general, see BioInsight Platform Licensing.

OnPrem HPC (High-Performance Computing)

When running the Iterative gVCF Genotyper (iGG) pipeline in your own compute environment using your own Illumina BioInsight Platform API key, there is an applicable licensing charge;

  • An informatics licensing cost in BICs, metered by the gigabases of input consumed.

To review your usage, more information on the usage explorer for Platform Core can be found in the Illumina BioInsight Platform Usage Explorer guide.

iGG is a cohort-level tool with no per-sample unit, so it is metered by gigabases of input rather than by the DRAGEN Pricing analysis tiers that apply to other DRAGEN 4.6 pipelines. See DRAGEN Pricing and Licensing.

Getting Started with iGG on an OnPrem HPC

An OnPrem HPC run of iGG is a DRAGEN Software Mode run, and is licensed with an Illumina BioInsight Platform API key. For the full setup - obtaining a domain, generating a DRAGEN API key, and each of the ways to provide the key to DRAGEN - see BioInsight Platform Licensing.

OnPrem DRAGEN Server

The Iterative gVCF Genotyper pipeline is designed to run on non-FPGA compute instances, either in Platform Core or in a scalable OnPrem environment like a High Performance Cluster (HPC). The DRAGEN server is best suited to accelerate single sample DRAGEN analysis that requires a FPGA - so we don't recommend using it to run iGG.

However, an OnPrem DRAGEN Server could be used as a non-FPGA compute instance. To go this route, you will need to refer to the OnPrem HPC section above so that you can run iGG on your OnPrem DRAGEN Server using an Illumina BioInsight Platform API key.

HPC deployments

You can run the iterative gVCF Genotyper on commodity hardware, without an FPGA card, using DRAGEN Software Mode. That page covers the supported operating systems, the AVX2 requirement, the self-extracting installer and its options, licensing, and general performance tuning such as thread counts and ulimit settings.

The remainder of this section covers the requirements and tuning that are specific to the iterative gVCF Genotyper.

Hardware requirements in HPC mode

These estimates are based on 1000 30x WGS samples per batch, 100 genome shards and 56-core Linux HPC node:

  • Step 1 (gVCF Aggregation): 10-15 minutes per shard

  • Step 2 (Census Aggregation): <2 minutes per shard (scales with number of batches but typically minimal)

  • Step 3 (Single batch msVCF Generation): 3-5 minutes per shard

  • Memory consumption: 10-15 GB RAM per job

Example total runtime for 3 batches (3000 samples), 100 shards:

  • Step 1: 300 jobs × 10-15 min = 50-75 hours of compute time (can run in parallel)

  • Step 2: 100 jobs × <2 min = <4 hours of compute time

  • Step 3: 300 jobs × 3-5 min = 15-25 hours of compute time

Further Performance considerations:

  • Disk I/O is critical: The iterative gVCF Genotyper is I/O intensive. Fast storage for both input gVCF files and output directories is essential for optimal performance. Network-attached storage (NFS) with high throughput and low latency is recommended, or ideally, use local SSD storage on each HPC node.

  • Exclusive node access: When using a job scheduling system (Slurm, SGE, PBS), we recommend submitting jobs in exclusive mode to ensure each iGG job has sole access to an HPC node. Sharing nodes can potentially degrade performance due to I/O and CPU contention.

We recommend storing the gVCF input files and any temporary files on fast storage, ideally storage local to node, to minimize latency from I/O.

For detailed storage requirements, see Disk Footprint Estimates at the end of this document.

By default, the iterative gVCF Genotyper will run in multi-threaded mode and use all available CPU threads, up to a maximum of 48. In multi-threaded mode, each thread processes several genomic regions, one by one. To run iGG using using a different number of threads, users can set the parameter --num-threads on the command line.

The iterative gVCF Genotyper opens a number of file handles that scales with the thread count and the number of input files. For the formula and the recommended ulimit settings, see File handles and user processes.

Running iGG on Platform Core with PopGen CLI

For users running the iterative gVCF Genotyper on Platform Core, Illumina provides the PopGen CLI, a command-line tool that simplifies the orchestration of large-scale iGG workflows in the cloud.

PopGen CLI Overview

The PopGen CLI is available in multiple Platform Core regions (US, CA, UK, EU, JP, KR, SG, AU, ID, IN, IL, AE) and can be downloaded from the popgen-cli-release-<region> bundle in your Platform Core domain. It requires Python 3.8 or later and is distributed as a Python wheel package.

Workflow Steps

The PopGen CLI orchestrates the iGG workflow on Platform Core through five steps:

Step
Description
Output

step 1

Aggregate gVCFs into cohort and census files per batch

Cohort and census files per shard

step 2

Aggregate batch census files into a global census

Global census and sites VCF

step 3

Generate msVCF with ML filtering and PGEN output

msVCF, reduced msVCF, PGEN files per subshard

step 4

Concatenate msVCF and PGEN files per chromosome

Chromosome-level msVCF and PGEN

step 5

Annotate site VCF at cohort level

Annotation JSON and VCF per chromosome

When adding new batches to an existing project (N+1 scenario), only step 1 needs to be run for the new batch. Steps 2-5 are then run for the new version, automatically incorporating results from previous batches.

Demo

A demo is included with the PopGen CLI release that demonstrates iterative aggregation using GIAB samples:

  • Version 1: 4 samples from batch-1 (HG001, HG002, HG003, HG004)

  • Version 2: 7 samples from batch-1 + batch-2 (adds HG005, HG006, HG007)

The demo processes chromosome 20 (shards 88-89) and includes scripts for configuration, upload, and job submission.

For complete documentation on the PopGen CLI installation and usage, download the user guide (user-docs-igg.md) from the PopGen CLI release bundle in your Platform Core project.

Combined phased variants in the gVCF input

The DRAGEN germline variant caller has an option --vc-combine-phased-variants-distance to combine phased variants in the gVCF output.

The option to combine phased variants is disabled by default, for details please refer to the section on germline small variant calling in this user guide.

Force-genotyped and targeted variants in the gVCF input

If force genotyping was enabled for any input file, any ForceGT calls that are not also called by the variant caller will be ignored.

Similarly, targeted variant calls (option --targeted-merge-vc) in any gVCF file that are not also called by the variant caller will be ignored as well.

Iterative gVCF Genotyper analysis

gVCF Genotyper offers an iterative workflow to aggregate new samples into an existing cohort. The iterative workflow allows users to incrementally aggregate new batches of samples with existing batches, without having to redo the analysis from scratch across all samples, every time new samples are available. The workflow takes single sample gVCF files as input, and can be performed in a "step-by-step mode" if multiple batches of samples are available, or "end-to-end mode", if only a single batch of samples is available. Multi-sample gVCF files output from the Pedigree Caller (described above) are also accepted as input.

Step 1 (gVCF aggregation): the user can use iterative gVCF Genotyper to aggregate a batch of gVCF files into a cohort file and a census file. The cohort file is a condensed data format to store gVCF data in multiple samples, similar to a multi-sample gVCF. The census file stores summary statistics of all the variants and hom-ref blocks among samples in the cohort. As part of this step, adjacent hom-ref blocks with matching FILTER columns are further merged to reduce the disk footprint of the intermediate files, FORMAT field values being base-pair weight averaged in the process.

When a large number of samples are available, the user can divide samples into multiple batches each with similar sample size (e.g., 1000 samples), and repeat Step 1 for every batch.

Step 2 (census aggregation): after all per batch census files are generated, the user can aggregate them into a single global census file. This step scales to aggregate thousands of batches, in a much more efficient way than aggregating gVCFs from all batches. When a new batch of samples becomes available, the user only needs to perform Step 1 on that batch, then aggregate the census file from the new batch with the global census file from all previous batches in order to generate an updated global census file.

Step 3 (msVCF generation): every time a global census file is updated, with new variant sites discovered and/or variant statistics updated at existing variant sites, the user can generate a multi-sample VCF using cohort and census files as inputs. The output multi-sample VCF contains the variants and alleles discovered in all samples from all batches, and also includes global statistics such as allele frequencies, the number of samples with or without genotypes, and the number of samples without coverage. An output multi-sample VCF can be generated for all batches, a single batch or a subset of batches.

In end-to-end mode (--gvcfs-to-msvcf, the default when no step flag is set), Steps 1 and 3 are combined in a single run. Cohort and census data are processed in memory and are not written to disk as intermediate files.

Sharding

To facilitate parallel processing on distributed compute nodes, for each step above the genome can be split into multiple shards and processed in parallel by running one instance of iterative gVCF Genotyper per shard (see --shard below).

Two different sharding methods are provided:

  1. Chromosome-based sharding (default): Enabled by --gg-v1-sharding=true (the default). This assumes human-like chromosome naming of the contigs i.e., chr1, chr2, chr3 or 1, 2, 3 etc. for the autosomes, chrX, ChrY, X or Y for the allosomes and chrM or MT for mitochondria (all case insensitive). Contigs that are not chromosomal or mitochondrial are placed in the last shard. No other contigs will be assigned to the last shard. The mitochondrial contig will always be on its own in the second to last shard. Each chromosomal contig can be split across multiple shards but will not share shards with regions from any other chromosomes, allowing the recombination of the final output into individual chromosomes. The minimum number of shards is the number of chromosomes + 2 and maximum allowed value is 1000. This is the default and recommended sharding method for human genomes.

    With legacy sharding (--gg-v1-sharding=true), mitochondrial and alt contigs are always included in dedicated shards. To use non-legacy chromosome sharding, set --gg-v1-sharding=false and optionally enable --gg-include-mito and --gg-include-alt-contigs (both default to false in non-legacy mode).

  2. Universal sharding: This method splits the genome into shards of equal length (to within 1bp). Contigs may be split across shards and may share a shard with other contigs. The order of the contigs is preserved. The minimum number of shards is 1 and maximum allowed value is the number of base pairs in the reference. This method is chosen by setting the --gg-universal-sharding option to true. It can be used with non-human genomes. Universal sharding cannot be combined with non-legacy chromosome sharding (--gg-v1-sharding=false) and cannot be used within the PopGen CLI.

Command-line arguments common to all steps:

  • --enable-gvcf-genotyper-iterative: set to true to run the iterative gVCF Genotyper (always required).

  • --ht-reference: The file containing the reference sequence in FASTA format (always required).

  • --output-directory: The output directory (always required).

  • --output-file-prefix: The prefix used to label all output files (optional, default value dragen).

  • --num-threads: Specifies the number of threads to use for parallel processing. By default, all available CPU threads are used up to a maximum of 48. This is because more than 48 threads usually do not offer any benefits.

  • --shard: Use this option to process only a portion ('shard') of the genome, when distributing the work across multiple compute nodes in a production workflow. Provide the index (1-based) of the shard to process and the total number of shards, in the format of n/N (e.g., 1/50 means shard 1 of total 50 shards). To facilitate concurrent processing within each job, the shard is by default split into approximately 500 concurrency regions.

  • --gg-universal-sharding: Use universal sharding method where the reference genome is split into shards of equal length (to within 1 bp). This can be used on non-human genomes. It always includes all contigs in the reference genome. (default=false)

  • --gg-regions: Use this option to run iterative gVCF Genotyper only for a subset of regions in the genome. The value is a list of regions (chr:start-end) delimited by comma. Contig names must match those in the reference and no region may overlap another. If a single region larger than 1Mb is selected, multiple threads are enabled. Otherwise, one thread is launched per region. If both --gg-regions and --shard are set, --gg-regions takes priority. It is important that the same regions are chosen for each step 1, 2, and 3.

  • --gg-regions-bed: If a path to a BED file is provided as value, this option, like the one above, will limit the iterative gVCF Genotyper processing to the genome regions specified therein, which must be non-overlapping. This option applies to all workflow steps. It is intended for exome input data and results in faster processing times. It is compatible with sharding. If the BED file defines more than 500 regions, iGG raises an error.

  • --gg-enable-ml-filtering: Enables ML filtering for the output msVCF. Enable this option on Step 1 (so required FORMAT fields are imported into cohort files) and Step 3 or end-to-end mode (where ML scoring runs). Step 2 does not use this flag. See Machine Learning Filtering for details.

  • --gg-ml-ped-path: Path to PED file with gender information to customize the ML filtering behavior on chrY. Only applicable when --gg-enable-ml-filtering is true.

  • --gg-allow-dupe-samples: if true, any duplicate sample names found in the input will be automatically renamed by appending ":{N+1}". Otherwise, the execution of the analysis will be aborted. Default is false.

  • --gg-sample-rename-mapfile [Optional] Path to a file providing a tab-separated mapping of sample names that should be renamed on the merged output. Format: Original Target[ Filename] OR /regex pattern/ substitution. If a filename is provided, both the sample name and filename need to match for the rename to be applicable. Target sample names must be unique, unless --gg-allow-dupe-samples is true, in which case an automatic suffix will be applied on top of any duplicates. For regex substitutions, any capturing groups have to be referred to using a $1, $2, etc. syntax.

  • --gg-discard-ac-zero If set to true, the gVCF Genotyper does not print variant alleles that are not called (hom-ref genotype) in any sample. The default value is true. Please note that this does not apply to variants that have been set to hom-ref via the option --gg-vc-filter=true described below.

  • --gg-remove-nonref If set to true, the <NON_REF> symbolic allele is removed in the process of reading in input gVCF files. The default value is true.

  • --gg-vc-filter Discard input variants that failed filters in the upstream caller. The default is false. Affected records will have their genotype set to hom-ref and the filter string "ggf" added to FORMAT/FT. The exception are calls with TargetedConflict filter status which are not affected by this setting.

  • --gg-info-to-import Optional list of gVCF INFO fields to import. See gVCF metric import customization below.

  • --gg-format-to-import Set to override or extend the default set of genotype fields imported from the input gVCF files. See gVCF metric import customization below.

  • --gg-hard-filter Specifies a filtering expression to be applied to the output msVCF records. See msVCF hard filtering below. The default is to apply no filters.

  • --gg-skip-filtered-sites Omits msVCF records that fail the given hard filter from the output. Does not apply to ML filtering; ML-filtered sites remain in the full msVCF. The default is false.

  • --gg-msvcf-format-fields Can be used to override the default set of sample genotype fields in the output msVCF. See msVCF metric customization below.

  • --gg-msvcf-info-fields Can be used to override the default set of site-wise INFO fields in the output msVCF. See msVCF metric customization below.

  • --gg-squeeze-msvcf Set to omit genotype fields other than GT from the output msVCF for confidently called hom-ref sample records.

  • --gg-gq-squeezing-threshold Use in conjunction with the previous option to adjust the threshold on GQ (default 30) that signifies a confident hom-ref call.

  • --gg-enable-indexing: set to true (the default) to generate a tabix index for an output msVCF.

  • --gg-output-type Set to spvcf to write the output in spVCF format rather then the default msVCF. See File size optimizations below for details.

  • --gg-diploidify In the output msVCF file, convert haploid calls to diploid. The diploidified genotype is homozygous in the haploid call e.g., 1 becomes 1/1. The LPL field is also diploidified for these samples. Site metrics, such as allele counts, are calculated before diploidification. Diploidifying genotypes may ease the ingestion of msVCF files into downstream analysis tool, such as Hail and Plink. When this option is enabled, the DF FORMAT field can be included to signify whether or not a genotype has been diploidified; it is not included by default. See msVCF metric customization below.

  • --gg-min-qual: minimum QUAL for variants to be included into aggregation (Default is 0.0).

  • --gg-skip-vcf-concat: skip concatenation of concurrency region msVCF files. This will result in many small msVCF output files for each job as opposed to a single large one.

  • --gg-drop-genotypes: Compute only the allele list and skip genotypes, producing a sites-only msVCF (default=false). Alternative to using --gg-msvcf-format-fields=None. Sites-only msVCF files can be used as input for variant annotation tools such as Nirvana.

  • --gg-both-sites-and-full-vcf: When generating an msVCF, write both a full msVCF with genotypes and a sites-only msVCF (default=false). This allows users to produce both outputs in a single run. The sites-only msVCF can be used as input for variant annotation tools such as Nirvana.

Command-line arguments for Step 1 (step-by-step mode)

  • --gvcfs-to-cohort-census: set to true to aggregate gVCF files from one batch of samples into a cohort file and a census file.

  • --variant-list: the path to a file containing a list of input gVCF files, with the path to each file on a separate line.

  • --variant: if --variant-list is not given, use this option for each input gVCF file.

Command-line arguments for Step 2 (step-by-step mode)

  • --aggregate-censuses: set to true to aggregate a list of per batch census files into a global census file.

  • --input-census-list: the path to a file containing a list of input per batch census files (from Step 1), with the path to each file on a separate line.

  • --variant-list or --variant: alternate way to specify input census files (one path per line or per option), equivalent to --input-census-list.

Command-line arguments for Step 3 (step-by-step mode)

  • --generate-msvcf: set to true to generate a multi-sample VCF.

  • --input-global-census-file: the path to the global census file (from Step 2).

  • --input-cohort-list: the path to a file containing a list of batch cohort files (from Step 1), with the path to each file on a separate line. Use this option to generate an msVCF for multiple batches.

  • --input-cohort-file: the path to the per batch cohort file (from Step 1). Use this option to generate an msVCF for a single batch.

  • --input-census-file: the path to the per batch census file (from Step 1). This option is required when generating an msVCF for a single batch.

  • --gg-merge-subset: set to override the restriction that all batches must be included in the merge, when providing a subset of batches via --input-cohort-list.

For the recommended multi-step command template (default for most customers; supports iterative analysis), see the Large Cohort Recipe. For shell loop examples and a complete multi-batch workflow, see Multi-batch workflow examples.

Multi-batch workflow examples

The following examples assume 3 batches and 100 shards. Adjust batch lists, paths, and shard counts for your environment.

Each iGG step uses --shard X/N so that one DRAGEN job processes only genomic shard X of N. The intended production pattern is to run many independent jobs in parallel on separate servers or cluster nodes (for example, one Slurm job per batch-and-shard combination in Step 1, or one job per shard in Steps 2 and 3). Jobs do not need to share a host; they only need access to the same input lists and a shared output filesystem (or equivalent staging).

The shell snippets below use nested for loops with & and wait to show which command to run for each batch and shard. That pattern can be used on a single large machine, but it is mainly a compact illustration. In practice, submit each iteration as its own scheduled job so shards scale out across your cluster.

Step 1: Parallel gVCF aggregation

Submit one job per (batch, shard) pair. Each job runs DRAGEN with --shard ${SHARD}/100 (and the corresponding batch variant-list). All Step 1 jobs for a given shard index can run in parallel with each other, and with jobs for other shards, on different nodes.

Step 2: Census aggregation per shard

Submit one job per shard index. Each job aggregates census files from all batches for that shard only (same shard number across batches). These jobs are independent and can run in parallel on different servers.

Step 3: msVCF generation per shard

Submit one job per shard index. Each job generates an msVCF for that genomic shard using the matching global census and cohort list. Like Steps 1 and 2, shard jobs are run in parallel across nodes.

Complete workflow (3000 samples, 3 batches, 100 shards)

Run Step 1, Step 2, and Step 3 as in the examples above—typically as 300 + 100 + 100 = 500 separate parallel jobs across your cluster, not as one multi-hour shell script on a single server. After all Step 3 shard outputs exist, concatenate them on one node (or a dedicated merge job):

Command-line arguments for running all steps (end-to-end mode for a single batch)

  • --gvcfs-to-msvcf: end-to-end mode is the default when no step flag (--gvcfs-to-cohort-census, --aggregate-censuses, or --generate-msvcf) is set. Setting --gvcfs-to-msvcf=true explicitly selects end-to-end mode.

  • --variant-list: the path to a file containing a list of input gVCF files, with the path to each file on a separate line.

  • --variant: if --variant-list is not given, use this option for each input gVCF file.

For an end-to-end command template suitable only for small trials (no cohort or census files on disk; no iterative analysis), see the Small Cohort Recipe. Additional end-to-end examples are below.

End-to-end workflow examples

Custom metric import

Hard filtering

Apply hard filters to remove low-quality variants and sites with Hardy-Weinberg equilibrium deviations:

Filter expression summary:

  • QUAL < 30 removes low-quality variants

  • GNS_GT < 10 removes variants with fewer than 10 samples genotyped

  • GIC < -0.3 || GIC > 0.3 removes variants deviating from Hardy-Weinberg equilibrium

Machine learning filtering

Enable ML filtering with an optional pedigree file:

Output files:

  • ${PREFIX}_ml.vcf.gz - Standard msVCF with all metrics

  • ${PREFIX}_ml.reduced.vcf.gz - Reduced msVCF with split multi-allelic variants and GT-only FORMAT fields (for ML filtering)

File size optimization and spVCF (end-to-end mode)

Decode spVCF files for downstream analysis:

Machine Learning Filtering

The iterative gVCF Genotyper includes a machine learning (ML) filter that uses trained models to identify potentially problematic variant sites in the multi-sample VCF. This filtering provides an additional quality control beyond the standard hard filtering options.

The primary goal of this filter is to improve the consistency of genotype calls in the cohort. As a result, when applied to a family trio consisting of mother, father and child, the filter reduces the number of genotypes that are not consistent with Mendelian inheritance. In addition, the filter will reduce the percentage of missing genotypes in the reduced msVCF (see below).

ML Filter Model

The ML filtering system uses a pre-trained model to score variants based on multiple features extracted from the gVCF data. The model outputs a probability score indicating the likelihood that a variant is of high quality. Lower scores indicate a higher probability that the variant may be false positive or of poor quality. This score is written to the QUAL column of the msVCF.

Users can supply the chromosomal sex information for each sample using a pedigree file in plink's PED format. Using this information, the ML filter will ignore female samples or samples with unknown sex on chrY.

The current model was trained on Human genomes and has not been tested on other species.

ML Filter Options

  • --gg-enable-ml-filtering: Enables ML filtering for the output msVCF. Enable on Step 1 (to import required FORMAT fields into cohort files) and Step 3 or end-to-end mode (where ML scoring runs). Step 2 does not use this flag.

  • --gg-pass-ml-qual-threshold: Threshold for ML filtering on the 0–100 score scale (default: 0.1). The model outputs a probability that is multiplied by 100 before comparison; with the default threshold, nearly all variants pass. Variants with ML scores below this threshold are flagged with the "LowMLSQ" filter.

  • --gg-ml-ped-path: Path to PED file with gender information to customize the filtering behavior on chrY.

  • --gg-genotyping-rate-threshold: Minimum genotyping rate required to run ML filter (default: 0.9). Variant sites in the msVCF with a genotyping rate below this threshold will have their FILTER column set to "LowGTR".

ML Filter Output

When ML filtering is enabled, an additional reduced msVCF file is generated alongside the standard msVCF output. This file has the following characteristics:

  • Multi-allelic variants are split into separate records, one alternative allele per line

  • Contains only unphased genotypes (GT) in the FORMAT columns

  • The QUAL column contains the ML model confidence score multiplied by 100

  • The FILTER column will be either PASS, LowMLSQ, or LowGTR based on the filtering criteria above

When ML filtering is enabled, the ML model score and filter status are also propagated to the full msVCF (in addition to the reduced msVCF) as two new INFO fields:

Field
Description

INFO/MLQUAL

ML model confidence score (multiplied by 100), mirroring the QUAL value in the reduced msVCF. One value for each ALT allele.

INFO/MLFILTER

ML filter decision for the site (PASS, LowMLSQ, or LowGTR), mirroring the FILTER column in the reduced msVCF. One value for each ALT allele

These fields are added automatically to the full msVCF when --gg-enable-ml-filtering=true and the user has not explicitly specified --gg-msvcf-info-fields. If --gg-msvcf-info-fields is provided explicitly, MLQUAL and MLFILTER must be included in the list to appear in the output.

Usage Recommendations

ML filtering is most effective when applied to large cohorts and combined with other quality control measures. Users should:

  • Ensure the cohort contains at least several hundred samples for optimal ML filter performance

  • Evaluate the ML score distribution in their dataset to determine appropriate thresholds for their specific use case

  • Consider the trade-off between sensitivity and specificity when setting filter thresholds

  • Use ML filtering in conjunction with hard filters for comprehensive quality control

  • Review both the standard and reduced msVCF outputs to determine which best suits their downstream analysis needs

Enabling use of mimalloc library for enhanced performance

Mimalloc is a custom memory allocation library that can yield a significant speed-up in the iterative gVCF Genotyper workflow. In some deployments, e.g., cloud, it is automatically and seamlessly used, but in other contexts it requires special user intervention to be activated, as at present it cannot be included in standard DRAGEN by default.

For this purpose, the convenience script mi_dragen.sh is provided, which loads the bundled library and can be transparently used in the same way as the DRAGEN executable. Please note that its use is only intended and supported for use with the iterative gVCF Genotyper component, although it can in principle be applied for any other DRAGEN workflow too. Its use for other purposes is known to possibly lead to undesirable memory overuse and thus should be undertaken at the user's own risk.

The recommended version of mimalloc for gVCF Genotyper is v2.0.7.

gVCF metric import customization

The set of INFO and FORMAT metrics imported into gVCF Genotyper from the input gVCF files can be customized via the --gg-info-to-import and --gg-format-to-import options respectively. This allows metrics beyond the default set to be ingested and subsequently output in the final msVCF. The cost of this is in an increased size of the intermediate cohort file, which can be significant. Conversely, reducing the metrics imported to the minimum desired set could lead to space savings on intermediate file storage.

The sample genotype (GT) is unconditionally imported, as are the values in the QUAL and FILTER columns (FORMAT/FT for multisample gVCF input). The values of the AD, GQ, PL and, on chrM only, AF gVCF FORMAT fields are imported by default. These defaults can be overwritten in the argument to --gg-format-to-import, as well as the following additional fields: DP, F1R2, F2R1, GP, MB, PRI, SB, SQ (chrM only), e.g., --gg-format-to-import=AD,GQ,PL,DP,GP,SB. When importing multisample gVCF files from the pedigree caller, the DN and DQ fields can be specified for import.

No gVCF INFO fields are ingested by default; the following are available for optional import via a comma-separated list to --gg-info-to-import: MQ, MQRankSum, ReadPosRankSum, FractionInformativeReads, LOD, R2_5P_bias, MOSAIC. Imported values are then available for output as per-sample FORMAT values when generating the final msVCF.

For details on how to write any of these metrics to the output msVCF file, see msVCF metric customization below. It should be noted that any metric not selected for import will show as missing if requested in the output msVCF and in particular that no Allelic Balance calculations will be available if AD has not been imported at the outset.

The multi-sample VCF output of the iterative gVCF Genotyper

The output of gVCF Genotyper is a multi-sample VCF (msVCF) that contains metrics computed for all samples in the cohort.

Output files use the --output-file-prefix (default dragen) and are written to --output-directory. The following suffixes are used:

Suffix
Description

.vcf.gz

Full msVCF with genotypes

.ml-filtered.vcf.gz

Reduced msVCF from ML filtering (when --gg-enable-ml-filtering is set)

.sites.vcf.gz

Sites-only msVCF (when --gg-both-sites-and-full-vcf or --gg-drop-genotypes is set)

.ml-features.json.gz

ML feature data (when ML filtering is enabled)

cohort_*.cht.gz

Per-batch cohort file (Step 1)

census_*.cns.gz

Per-batch or global census file (Steps 1 and 2)

Local Alleles

The msVCF can become large with increasing cohort size, with some sites having many alternative alleles. Some genotype fields, such as FORMAT/PL, scale quadratically with the number of alleles at the site. This can result in the file requiring more storage than can be allocated by VCF parsers. However, only entries pertaining to alleles seen in a sample are pertinent to them, the rest are redundant. By retaining only the pertinent information, the file size can be significantly reduced. This approach is also referred to as local alleles, and is described in the VCF v4.5 specification.

The alternative alleles that are pertinent to a sample are listed in the FORMAT/LAA field, a 1-based map of indices to the global alleles at the site. The allele order of other local fields is the same as that of LAA. If any local fields are present, then LAA will also be present and precedes all fields other than GT. In the meta-information, the 'L' prefix indicates the local-allele equivalent of a Number=A, R or G field.

Iterative gVCF Genotyper with Mitochondrial Variant Calls

When processing mitochondrial variant calls, which may contain separate records for each allele, iterative gVCF Genotyper processing differs in the following ways:

  • Only the record with the highest FORMAT/AF sum is kept.

  • The FORMAT/AF field will be additionally collected, and used to generate the FORMAT/LAF field in the output msVCF

QUAL column in msVCF

The value displayed in the QUAL column of the msVCF is the maximum of the input QUAL values for the site across the global cohort. The QUAL value will be missing if the Step 1 census files used to create the global census did not store QUAL data, for example when generated by an older version of the DRAGEN iterative gVCF Genotyper.

Measures of Hardy-Weinberg Equilibrium in the msVCF output

The Hardy-Weinberg Equilibrium (HWE) states that, given certain conditions, genotype and allele frequencies should remain constant between generations. Deviations from HWE can results from violations of the underlying HWE assumptions in the population, non-random sampling or may be artifacts of variant calling. Adherence to HWE can be assessed by comparing the observed frequencies of genotypes to those expected under HWE given the observed allele counts.

Iterative gVCF Genotyper offers several metrics for assessing adherence to HWE. It calculates both allele-wise and site-wise HWE P-values1, an allele-wise excess heterozygosity (ExcHet) P-value1 and the site-wise inbreeding coefficient (IC). These metrics are calculated only for diploid sites and missing values are excluded from the calculations. These values are included as fields in the INFO column of the output msVCF file. Both batch-wise and global values are included, where the field names for the global values are prefixed with G.

Metric
Description
Scope
Number of values

HWE

Hardy-Weinberg Equilibrium P-value

Allele-wise

One for each alt allele

ExcHet

Excess Heterozygosity P-value

Allele-wise

One for each alt allele

HWEc2

Hardy-Weinberg Equilibrium P-value

Site-wise

1

IC

Inbreeding Coefficient

Site-wise

1

Care should be taken when interpreting these metrics for small cohorts and/or low frequency alleles, as small changes in inputs can lead to large changes in their values. Further, violations of the underlying HWE assumptions (such as inbreeding), and non-random sampling (such as the presence of consanguineous samples), can adversely affect results, making identification of poorly called variants more difficult.

Where it is not possible to calculate the metric, they are represented as missing (i.e., ".") in the msVCF file. This can vary between the metrics, but may occur if non-diploid genotypes are encountered, if there is only one allele present at a site, or if no samples are genotyped at a site.

Allele-wise vs site-wise Hardy-Weinberg metrics

Iterative gVCF Genotyper offers both allele-wise and site-wise HWE P-values. The allele-wise P-values are based on the exact-conditional method Am J Hum Genet. 2005 May; 76(5): 887–893 the site-wise P-values are based on Pearson's chi-squared method. For bi-allelic sites, although both are measuring the same property, their values may differ. The differences between the methods are explored in Am J Hum Genet. 2005 May; 76(5): 887–893. Care should be taken when deciding which to use.

Allele-Wise Hardy-Weinberg Equilibrium and Excess Heterozygosity.

Iterative gVCF Genotyper calculates allele-wise HWE and the ExcHet P-values. The values are calculated using the exact-conditional method described in Am J Hum Genet. 2005 May; 76(5): 887–893. The implementation does not use a mid P-value correction.

For HWE a P-value of ≈ 1 suggests that the distribution of heterozygotes and homozygotes is close to that expected under HWE, while a P-value of ≈ 0 suggests a deviation from it. For ExcHet a P-value of ≈ 0.5 suggests that the number of heterozygotes is close to the number expected under HWE, while a value ≈ 1 suggests that there are more heterozygotes than expected and a value ≈ 0 suggests that there are fewer heterozygotes than expected.

For a bi-allelic site the HWE P-values is based on the numbers of homozygotes and heterozygotes comparing the observed to expected. For a multi-allelic site, P-values are calculated per ALT allele as if it were bi-allelic. Genotypes composed of only the ALT allele being considered are counted as alternative homozygous, any other genotype containing a copy of the ALT allele being considered are counted as a heterozygous, and any genotype with no copies of the ALT allele being considered are counted as reference homozygous (this may include genotypes containing other ALT alleles).

Site-Wise Hardy-Weinberg Equilibrium.

Iterative gVCF Genotyper calculates a site-wise HWE P-value. The value is calculated using the Pearson's chi-squared method, comparing the genotype counts expected under HWE to those observed. The chi-squared test statistic is calculated as

𝜒2 = ∑gt (Egt - Ogt)2 / Egt

where the summation is over gt is over all genotypes possible at the site given the alleles present, and Egt and Ogt are the expected and observed counts for genotype gt, respectively. From the chi-squared test statistic the P-value is then calculated from a chi-squared distribution where the number of degrees of freedom is the number of possible genotypes minus the number of alleles, which is

where n is the number of alleles.

The batch-wise value uses only the alleles present in the batch. Alleles with AC=0 are not included in the calculation.

A P-value of ≈ 1 suggests that the distribution of heterozygotes and homozygotes is close to that expected under HWE, while a P-value of ≈ 0 suggests a deviation from it.

The Inbreeding Coefficient

Iterative gVCF Genotyper calculates the inbreeding coefficient (IC) (sometimes called the Fixation index and denoted by F). It is defined as the proportion of the population that is inbred. The value of IC can be estimated by looking at the observed number of heterozygotes in comparison to the number expected under HWE:

where O(het) and E(het) are the observed and expected number of heterozygotes in the cohort, respectively. Although initially conceived for studying inbreeding and defined as a non-negative value, it is also commonly used to look for deviations from HWE and can take values in the range [-1, 1].

Values of IC ≈ 0 suggest that the cohort is in HWE. Negative values suggest an excess of heterozygosity and a deviation from HWE, which can be symptomatic of poor variant calling. Positive values suggest a deficit of heterozygotes and the possible presence of inbreeding.

Using the above definition, IC should be a property of the population, and so would be expected to be drawn from the same distribution for all sites and for all variants at a site. Deviations from this distribution can suggest issues in calling a site correctly. Violations of HWE assumptions and/or non-random sampling may adversely affect the distribution of IC, causing it to be shifted. However, outliers can still be identified, although thresholds may need to be adjusted accordingly.

Allelic Balance

Allelic balance (AB) describes the proportion of reads that support each allele within a called genotype and can be calculated from the allelic depth (FORMAT/AD or FORMAT/LAD).

For homozygotes this is taken as

AB = ADi / ∑j ADj

where i is the index of the called allele and j runs over all alleles.

For heterozygotes this is taken as

ABi = ADi / (ADa + ADb)

where a and b are the indices of the called alleles and i can have values a or b.

For homozygous genotypes AB is expected to be ≈ 1 and for heterozygous genotypes it is expected to be ≈ 0.5 for each allele. Deviations from the expected values can be indicative of an error.

DRAGEN's iterative gVCF Genotyper calculates site-wise AB values for each allele based on the read depths among all samples. Only diploid genotypes are included in the calculations. Values are calculated separately among homozygous (ABHom) and heterozygous (ABHet) genotypes. ABHet is calculated using the counts among all heterozygous calls that contains the allele under consideration. P-values1 for ABHet are also calculated (ABHetP) based on a binomial test with an expected probability of 0.5. A P-value of ≈ 1 signifies that results are in line with expectation while ≈ 0 signifies a deviation from expectation. Values are written to the INFO fields ABHom, ABHet and ABHetP, with one value for each allele (including the reference allele). Values should be in the range [0, 1]. Missing values are coded by -1 for individual alleles, for example where there are no homozygous calls for an allele. If AD is not present in any input gVCF file, or if AD is not selected for import, the values are not calculated and the fields will be omitted from the output msVCF file.

It is also possible to filter based on the maximum ABHetP value, see msVCF hard filtering.

msVCF hard filtering

Sites in the output msVCF can be filtered on the following global metrics:

  • QUAL

  • Number of samples with called genotypes (GNS_GT)

  • Inbreeding coefficient (GIC)

  • 𝜒2 Hardy-Weinberg Equilibrium P-value (GHWEc2)

  • The maximum P-value for heterozygous allelic balance (GABHetP)

The syntax of a filtering expression is the same as that used by the small variant caller (see Germline Small Variant Hard Filtering). Filters are always applied to the globally-computed metrics, not the values for the current batch. Records failing a hard filter will have the specified filter ID(s) written to the FILTER column of the msVCF, or will be omitted entirely if the --gg-skip-filtered-sites option is specified. --gg-skip-filtered-sites applies to hard filters only; ML-filtered sites (LowMLSQ, LowGTR) remain in the full msVCF. Since filtering is on a per-site basis, filters cannot be applied separately to SNPs or indels as they can in the variant caller.

msVCF metric customization

The per-sample genotype metrics in the output msVCF can be customized by providing a colon-separated list of metrics, analogous to that of the VCF FORMAT column, to the --gg-msvcf-format-fields option, e.g., --gg-msvcf-format-fields=GT:LAD:LPL:LAA:QL. The following metrics form the default set: GT, GQ, LAD, FT (original gVCF FILTER), LPL, LAA and LAF (N.B. LAF will only appear on the MT contig). The DF field appears only when the --gg-diploidify option is enabled. The following additional localized metrics are available (if imported): LF1R2, LF2R1, LGP, LPRI, LSQ (MT contig only), LGT and LA. Also potentially available for output are AD (non-localized), QL (original gVCF QUAL), DP, MB, SB, MQ, MQR (gVCF MQRankSum), RPRS (gVCF ReadPosRankSum), FIR (gVCF FractionInformativeReads), LOD, R25PB (gVCF R2_5P_bias), MSC (gVCF MOSAIC flag), DN, DQ (pedigree caller de novo fields). Sample genotype (GT) is always present and always shown first, regardless of whether it is included in the option string or not. Alternatively, an msVCF containing only site statistics and no per-sample genotype fields can be generated using the option --gg-msvcf-format-fields=None.

The per-site INFO metrics in the output msVCF can be customized by providing a semicolon-separated list of metrics, analogous to that of the VCF INFO column, to the --gg-msvcf-info-fields option, e.g., --gg-msvcf-info-fields=AC;AN;NS;NS_GT;NS_NOGT;NS_NODATA;AF. Supported metrics are AC, AN, NS, NS_GT, NS_NOGT, NS_NODATA, IC, HWE, ExcHet, HWEc2, AF, ABHom, ABHet, ABHetP. The default set of metrics is AC, AN, NS, NS_GT, NS_NOGT, NS_NODATA, IC, HWE, ExcHet and HWEc2. All INFO fields can be included using the option --gg-msvcf-info-fields=All. All INFO fields can be dropped using the option --gg-msvcf-info-fields=None, in which case the INFO column will contain the missing symbol, .. For single-batch Step 3 (or when --gg-merge-subset is set), both the batch-local value and the global value are written; global values are prepended with G. For multi-batch Step 3 with --input-cohort-list and without --gg-merge-subset, only global statistics are written, without the G prefix. INFO fields that have a missing value, ., at a site are omitted from the msVCF for that site, so sites may contain different sets of fields.

File size optimizations

For sizable cohorts, the file outputs from gVCF Genotyper can become extremely large. However, there are a number of options within the component which can mitigate this. As well as reduced footprint on disk, these options can lead to faster runtimes owing to the diminished I/O demands.

The following options have applicability to this:

  • The small variant caller's --vc-compact-gvcf, described previously. This doesn't reduce output file sizes, but the smaller input gVCFs reduce gVCF Genotyper runtime and could reduce data storage costs.

  • The removal of the NON_REF symbolic allele when ingesting the input gVCF files, which is the default behavior. Doing this reduces the size not only of the final msVCF output, but also the intermediate cohort and census files.

  • Several options exist that reduce the volume of data written to the final msVCF file:

    • Outputting local allele values, as described above.

    • Use of the msVCF metric customization options to output only those metrics required for the downstream analysis.

    • Omitting records that fail hard filters (--gg-skip-filtered-sites option).

    • Dropping trailing genotype fields for hom-ref records (--gg-squeeze-msvcf option). This behavior is explicitly permitted by the VCF specification.

The option that can have the biggest impact on the final output file size is that to write it directly in spVCF format. This is a lossless encoding and the space saving can be dramatic: file size reductions of multiple tens of times have been observed for large cohorts with sparsely distributed variants. spVCF-encoded files are likely to require decoding back to full msVCF for use with downstream tools, and a binary for this is available for download. The decoding will take time, but this is offset by the reduced time required within gVCF Genotyper to initially write the smaller spVCF files. Users are recommended to, if possible, directly pipe the decoded data into the downstream tool rather than first writing the full msVCF file to disk.

Disk Footprint Estimates

When planning storage for large-scale iterative gVCF Genotyper projects, it is important to account for the disk space required for input gVCF files, intermediate cohort and census files, and output msVCF files. The following estimates are based on whole-genome sequencing data at approximately 40x coverage and can serve as a guide for storage planning.

Input gVCF files:

  • Approximately 4 GB per sample

  • Samples with uneven read coverage will result in larger files

Cohort and census files:

  • Approximately 1/3 of input gVCF size per batch (assumes batch size of 1,000 samples and default parameters)

  • File size is influenced by the metrics selected for import (see gVCF metric import customization)

Output msVCF files:

  • Disk footprint scales with cohort size (approximately 0.65 GB per sample for cohorts <10K samples)

  • Larger cohorts may have different scaling characteristics

When planning storage infrastructure for large-scale projects, it is recommended to allocate additional capacity beyond these estimates to account for temporary files, backups, and variability in actual file sizes.

1 P-values in DRAGEN's iterative gVCF Genotyper are calculated as 32-bit floating-point variables so are subject to their limitations. As P-values can be very small, they sometimes fall below the numerical minimum of 32-bit floating-point variables where they may not be correctly represented.

Processing Non-Human Samples

Non-human samples can be processed with DRAGEN's iterative gVCF Genotyper. When processing the whole genome, no modification is necessary.

Subregions of the genome can be processed in several ways:

  • If the reference genome has human-like chromosome naming of the contigs i.e., chr1, chr2, chr3 or 1, 2, 3 etc. for the autosomes, chrX, ChrY, X or Y for the allosomes and chrM or MT for mitochondria (all case insensitive), then any sharding method can be used.

  • Non-human like genomes can be sharded using universal sharding (--gg-universal-sharding).

  • Regions of any genome can be processed using the --gg-regions (or --gg-regions-bed) option.

Last updated

Was this helpful?