
Population-scale variant calling is a critical step in building genomic population projects. Single-sample variant calling is well established, but scaling joint genotyping to thousands of WGS samples introduces challenges in performance, storage, and incremental updates. In this post we look at gVCF-based joint variant calling approaches, evaluate scalable options with modern open-source tools, and discuss practical architecture considerations for population-scale genomics projects.
In Parts 1-8 of the variant calling series, we built a complete short-read germline variant calling pipeline — from raw reads through variant annotation using nf-germline-short-read-variant-calling. In Part 6, we showed that modern variant callers such as DeepVariant can produce gVCF files directly — output files that capture both variant AND reference confidence information.
But there is a next step that many tutorials skip: how do you combine hundreds or thousands of these gVCF files to explore and compare variants across multiple samples? And more importantly, how do you use population-level information to improve variant accuracy across your cohort?
This article explores two complementary concepts:
We demonstrate the technical journey from single-sample gVCF files (created by DeepVariant or GATK) to a population-scale multi-sample VCF using DRAGEN gVCF Genotyper, and show how joint genotyping uses population signals to refine accuracy without re-calling variants. Real data from the 1000 Genomes Project is used for practical examples.
:::info Series Context This is Part 11 of the Variant Calling series:
Prerequisites: Familiarity with the gVCF format from Part 6 and a basic understanding of variant calling pipelines. :::
Before diving into population-scale workflows, it is worth clarifying two distinct (but complementary) processes that are often confused:
gVCF Combination:
Joint Variant Calling:
In Part 6, our nf-germline-short-read-variant-calling pipeline produces:
Per-sample outputs:
Example file structure:
sample-1/ ├── sample1.vcf.gz # Hard-filtered variants only ├── sample1.vcf.gz.tbi # Index for VCF ├── sample1.gvcf.gz # gVCF with reference blocks ← KEY FILE └── sample1.gvcf.gz.tbi # Index for gVCF
sample-2/ ├── sample2.vcf.gz ├── sample2.gvcf.gz # ← combine these to explore variants └── ...Why gVCF enables exploration: Unlike standard VCF files, gVCF captures:
<NON_REF> entries) showing where samples are likely non-variantThis richer information allows us to systematically explore variants across samples—comparing not just which variants each sample has, but also the confidence level at every genomic position.
Many workflows combine these stages into one tool (such as GATK Joint Genotyping), but conceptually they are two distinct operations.
This section traces the data transformation pipeline from individual variant calls to population-scale cohorts. Each stage adds value: a variant-only VCF enables basic discovery, a gVCF enables cross-sample exploration, and a joint cohort VCF applies population knowledge for accuracy refinement.
What makes this workflow useful:
What it contains:
Example command (using bcftools on S3):
# View DRAGEN hard-filtered VCF for single samplebcftools view s3://1000genomes-dragen-v4-2-7/data/individuals/hg38_alt_masked_graph_v3/NA21144/NA21144.final.hard-filtered.vcf.gz \ | grep -v "contig" \ | head -n80Output showing VCF header and variant records:
##fileformat=VCFv4.2##FILTER=<ID=PASS,Description="All filters passed">##FORMAT=<ID=AD,Number=R,Type=Integer,Description="Allelic depths for ref and alt alleles in the order listed">##FORMAT=<ID=GQ,Number=1,Type=Integer,Description="Genotype Quality">##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">##FORMAT=<ID=PL,Number=G,Type=Integer,Description="Normalized, Phred-scaled likelihoods for genotypes">...#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT NA21144chr1 10616 . CCGCCGTTGCAAAGGCGCGCCG C 8.83 PASS AC=2;AF=1;AN=2;DP=15;... GT:AD:GQ:PL 1/1:2,13:4:38,6,0chr1 10927 . A G 10.2 PASS AC=2;AF=1;AN=2;DP=2;... GT:AD:GQ:PL 1/1:0,2:3:45,5,0chr1 11022 . G A 10.54 PASS AC=2;AF=1;AN=2;DP=4;... GT:AD:GQ:PL 1/1:1,3:5:47,7,0Key observation: Position chr1:15000 is NOT in this file—there is no way to know if the sample is confidently homozygous reference or just not sequenced.
What it contains:
Example command:
# View gVCF with reference blocks and quality scores from Dragen pipelinebcftools view s3://1000genomes-dragen-v4-2-7/data/individuals/hg38_alt_masked_graph_v3/NA21144/NA21144.final.hard-filtered.gvcf.gz \ | grep -v "contig" \ | head -n100Key difference from VCF: the <NON_REF> entries and END field mark reference blocks:
##fileformat=VCFv4.2##ALT=<ID=NON_REF,Description="Represents any possible alternative allele at this location">##FORMAT=<ID=GQ,Number=1,Type=Integer,Description="Genotype Quality">##FORMAT=<ID=MIN_DP,Number=1,Type=Integer,Description="Minimum DP observed within the GVCF block">##GVCFBlock=minGQ=0(inclusive),maxGQ=1(exclusive)##GVCFBlock=minGQ=1(inclusive),maxGQ=10(exclusive)##GVCFBlock=minGQ=10(inclusive),maxGQ=20(exclusive)...#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT NA21144chr1 9998 . N <NON_REF> . LowGQ END=10003 GT:GQ:MIN_DP ./.:0:1chr1 10004 . C <NON_REF> . PASS END=10025 GT:GQ:MIN_DP 0/0:3:12chr1 10026 . A <NON_REF> . PASS END=10026 GT:GQ:MIN_DP 0/0:15:32chr1 10027 . A <NON_REF> . PASS END=10044 GT:GQ:MIN_DP 0/0:21:35chr1 10045 . A <NON_REF> . PASS END=10048 GT:GQ:MIN_DP 0/0:21:44Key insights:
<NON_REF>: Symbolic ALT meaning "reference confidence"END=10025: This reference block spans chr1:10004-10025GT:GQ:MIN_DP: Genotype (0/0 = homozygous reference), Quality (GQ=3 = low confidence), Min depth in blockNow we know: Sample NA21144 is confidently homozygous reference at chr1:10004-10025 with GQ=3 (low confidence) and chr1:10026 with GQ=15 (higher confidence).
What is GQ?
Genotype Quality (GQ) is a Phred-scaled probability that measures confidence in the genotype call. It is defined as:
GQ = -10 × log10(P(genotype is wrong))
Interpretation:
Real-world example from the gVCF above:
chr1 10004 . C <NON_REF> . PASS END=10025 GT:GQ:MIN_DP 0/0:3:12 ↑ GQ=3 (LOW confidence)chr1 10026 . A <NON_REF> . PASS END=10026 GT:GQ:MIN_DP 0/0:15:32 ↑ GQ=15 (HIGHER confidence)Why the difference?
The problem with low GQ calls:
When GQ is low (≤3), it is not possible to distinguish between:
This ambiguity cascades when building cohort call sets—if 1,000 samples have GQ=3 at the same position, should their consensus that it is a non-variant be trusted? Or should the region be flagged as suspicious?
The Single-Sample Problem: Decisions in Isolation
When calling variants on a single sample, low-confidence calls must be decided with only that sample's data:
Single Sample 1 at position chr22:10514143:- Reads support: 95% for genotype 0/0 (ref/ref), 5% for genotype 0/1 (ref/alt)- Confidence: GQ=10 (1 in 10 chance this call is wrong)- Decision: Call 0/0, but confidence is LOW
Without population context:- Is this truly a homozygous reference call?- Or is this a real but very rare variant being missed?- I cannot know without additional informationThe Joint Genotyping Solution: Borrowing Strength from the Population
When a cohort is available, population patterns can improve accuracy. Joint genotyping uses cohort-wide signals to reassess individual sample genotypes:
Cohort of 1,000 samples at chr22:10514143:┌─────────────────────────────────────────────────────┐│ Sample 1: 0/0 (GQ=10) ← questionable call ││ Sample 2: 0/0 (GQ=50) ← very confident ││ Sample 3: 0/0 (GQ=48) ← very confident ││ Sample 4: 0/0 (GQ=52) ← very confident ││ Samples 5-1000: All 0/0 (GQ>40) ← strong consensus │└─────────────────────────────────────────────────────┘
Population signal:- 999 samples independently call 0/0 with high confidence- Only 1 sample has uncertain confidence- Statistical analysis: Probability this position is truly 0/0 = 99%+ (allele frequency ≈ 0)- Conclusion: Sample 1's uncertain call is REINFORCED by population consensus
Result: Sample 1's GQ improved from 10 → 35 (borrowing confidence from the cohort)Real-world impact - Concrete examples of accuracy improvement:
Example 1: Low-coverage region
Position chr1:45000000 (low sequencing depth in Sample 1):
Before joint genotyping:Sample_1 0/0:8 (uncertain due to only 3 reads, noisy region)Sample_2 0/0:60 (30 reads, clear reference)...Sample_1000 0/0:58
After joint genotyping:Sample_1 0/0:38 ← GQ improved 8→38 using 999 samples' consensus (Population evidence: 1,000/1,000 samples call 0/0, so position is likely not variant)Example 2: Rare variant validation
Position chr5:12000000:
Before joint genotyping:Sample_1 0/1:20 (one read supports alt, one ref—uncertain heterozygous call)Sample_2 0/0:55 (confidently reference)...Sample_1000 0/0:52
After joint genotyping:Sample_1 0/1:32 ← GQ improved 20→32 (population consensus confirms this is a real rare variant) (Calculation: "This heterozygous call in one sample + homozygous refs in 999 others = likely a real rare variant worth believing")Example 3: Correcting false positives
Position chr19:88000000:
Before joint genotyping:Sample_1 0/1:9 (weak evidence for alt, GQ very low)Sample_2 0/0:51 (reference)...Sample_1000 0/0:49
After joint genotyping:Sample_1 0/0:28 ← Corrected from 0/1→0/0 (population consensus suggests this was artifact) (Rationale: "Only 1 sample heterozygous out of 1,000 with weak signal + 999 homozygous refs = likely sequencing artifact")How the Math Works - The Probabilistic Framework
Joint genotyping combines three pieces of information:
Simplified equation:
Refined GQ = single_sample_confidence + population_evidence - conflict_penaltyWhen population-level information is most valuable:
| Scenario | Individual GQ | Population GQ | Improvement | Why |
|---|---|---|---|---|
| Low-coverage region | 6 | 35 | +29 | Cohort consensus compensates for low depth |
| Rare variant (1/1000 samples) | 15 | 28 | +13 | Population signals confirm it's real |
| Artifact in one sample | 8 | 2 (filtered) | -6 | 999 samples say it's wrong |
| Common variant | 45 | 48 | +3 | Minimal improvement (already confident) |
Critical insight: Why this matters for your cohort
The key realization is that population-level information specifically helps uncertain calls:
This is why joint genotyping can simultaneously:
What it contains:
Example command:
# View the cohort VCF from 3,202 samples on chromosome 22# Note: showing only the first 12 columns (CHROM to first few samples)bcftools view s3://1000genomes-dragen-v4-2-7/data/cohorts/gvcf-genotyper-dragen-4.2.7/hg38/3202-samples-cohort/3202_samples_cohort_gg_chr22.vcf.gz \ | grep -v "contig" \ | head -n60 \ | cut -f1-12Key metrics added by DRAGEN gVCF Genotyper:
##INFO=<ID=AC,Number=A,Type=Integer,Description="Allele count in genotypes">##INFO=<ID=AN,Number=1,Type=Integer,Description="Total number of alleles in called genotypes">##INFO=<ID=NS,Number=1,Type=Integer,Description="Total number of samples">##INFO=<ID=NS_GT,Number=1,Type=Integer,Description="Total number of samples with called genotypes">##INFO=<ID=NS_NOGT,Number=1,Type=Integer,Description="Samples with unknown genotypes ./.">##INFO=<ID=NS_NODATA,Number=1,Type=Integer,Description="Samples with no coverage">##INFO=<ID=IC,Number=1,Type=Float,Description="The inbreeding coefficient">##INFO=<ID=HWE,Number=A,Type=Float,Description="Hardy-Weinberg Equilibrium P-value">##FORMAT=<ID=LPL,Number=.,Type=Integer,Description="Local Phred-scaled likelihoods (memory efficient)">##FORMAT=<ID=LAA,Number=.,Type=String,Description="Local alternate allele indices">Example variant in the cohort:
chr22 10514143 . G A 17.92 PASS AC=16;AN=1452;NS=3202;NS_GT=726;NS_NOGT=33;NS_NODATA=2443;IC=0.75;HWE=2.1e-12GT:GQ:AD:LPL:LAA .:.:.:.:. .:.:.:.:. ...What this tells us:
For implementing joint genotyping with practical results, the ideal tool would have:
Once gVCF files have been combined into a multi-sample VCF, the next step is applying joint genotyping to improve accuracy using population signals. Different tools offer different trade-offs between accuracy improvement, computational cost, scalability, and operational flexibility.
| Tool | Performance | Scalability | Open-Source | Key Pros | Key Cons |
|---|---|---|---|---|---|
| GATK Joint Genotyping | Slow (single thread) | Poor (reprocess entire cohort on new samples) | Yes | Mature, well-documented; Robust VQSR recalibration | Must re-run full pipeline; Complex parameter tuning; Tightly coupled to GATK |
| GLnexus | Fast (specialized C++ backend) | Medium (splitted by regions) | Yes | Faster than GATK; Incremental updates possible | Tightly coupled to DeepVariant; scale by regions splitting |
| Genomic Variant Store (Terra) | Very Fast (BigQuery-based) | Excellent (cloud-native) | No | Scalable to millions; Managed service | Terra platform lock-in; Licensing; No local control |
| DRAGEN IGG | Very Fast (specialized hardware) | Excellent (splitted by regions + sample batches) | No | Incremental processing; High performance; Enterprise support | Licensing; Hardware dependency; Vendor lock-in |
| DPGT | Very Fast (Apache Spark distributed) | Excellent (splitted by regions + sample batches) | Yes | Open-source; Incremental processing; High performance | Less mature; Limited documentation; setup |
| Your Situation | Recommended Tool | Why |
|---|---|---|
| Academic/research, small cohort (<1K samples), rare variant discovery and variants are called by GATK HaplotypeCaller | GATK Joint Genotyping | Mature, well-documented, best accuracy for non-DRAGEN callers |
| Growing biobank, need incremental updates, variant is called by DRAGEN | DRAGEN IGG (if already using DRAGEN) or DPGT (open-source) | Incremental processing critical for operational efficiency |
| Large consortium (100K+ samples) | Genomic Variant Store or DRAGEN IGG | Massive scalability; cost acceptable at this scale |
| Open-source, scale up to million samples | DPGT | Best open-source option; excellent scaling; no vendor lock-in |
| Academic/research, small cohort (<1K samples), variant is called by DeepVariant | GLnexus | Good speed/accuracy trade-off; cloud-friendly |
This section demonstrates how to implement joint variant calling using open-source tools integrated in the GKit repository (github.com/gianglabs/gkit). Both the GLnexus and DPGT implementations are shown with real workflows.
Note: GATK GenomicsDBImport/GenotypeGVCFs is already implemented in the production pipeline at nf-germline-short-read-variant-calling. The pipeline includes the GATK_GENOTYPEGVCFS process that:
For academic research projects with small cohorts calling variants with GATK HaplotypeCaller, this integrated approach is the recommended starting point.
What GLnexus does:
Quick Start with GKit:
cd <repo>/gkit/glnexus
# Install dependencies with Pixipixi install
# Run joint genotyping on test data (GIAB + 1KGP samples)make testOutput:
cohort_vcf/GIAB/data/GIAB_ALDH2_5kb.vcf.gzcohort_vcf/1KGP/data/1KGP_ALDH2_5kb.vcf.gzConfiguration Details:
The pipeline downloads gVCF files from public cloud storage and runs GLnexus:
glnexus_cli \ --config DeepVariant \ # Config optimized for DeepVariant output --threads 4 \ # Parallel processing --bed ALDH2_5kb.bed \ # Limit to region of interest *.g.vcf.gz > cohort.bcf # Input gVCF filesKey parameters:
Customization:
Pipeline features:
What DPGT does:
Quick Start with GKit:
cd <repo>/gkit/dpgt
# Install and build DPGT locallypixi installbash scripts/clone_DPGT.shbash scripts/build_cpp.sh
# Run joint genotypingbash run_dpgt.shDefault output:
results_verify_1kgp_run_dpgt/result.chr12_111760000_111765000.0.vcf.gzConfiguration with Environment Variables:
INPUT_LIST=inputs/1kgp_3samples.list \REFERENCE_FASTA=reference/Homo_sapiens_assembly38.fasta \OUTPUT_DIR=results/my_run \TARGET_REGION=chr12:111760000-111765000 \JOBS=4 \bash run_dpgt.shKey parameters:
chr:start-endPipeline workflow:
Scalability Notes:
spark-on-slurm/ in GKit)Known limitations:
<NON_REF> compatibility; 1KGP samples are validatedFor biobank-scale analysis (1K-100K+ samples), DPGT can run on a Spark cluster deployed within SLURM jobs using the spark-on-slurm configuration in GKit:
cd <repo>/gkit/spark-on-slurm
# Setup environmentmake setup
# Test Spark cluster on SLURMmake exampleWhat this enables:
Architecture:
srun across allocated nodesThis approach enables horizontal scalability for population-scale joint genotyping without vendor lock-in.
Based on the investigations above and the previous posts, building a population genomics project with fewer than 10,000 WGS samples appears achievable with existing technologies.
GATK (Genome Analysis Toolkit) tends to have slower performance for both single-sample variant calling and joint genotyping at large cohort scale. In contrast, DPGT is a promising open-source option that supports scaling through sample batching and genomic region splitting using BED files, while maintaining accuracy comparable to GLnexus.
GLnexus performs well for joint genotyping, but one limitation is that when new samples are added, the cohort may need to be recomputed. This could potentially be improved by introducing features or plugins that split samples into batches, preserve intermediate cohort metrics, and incrementally aggregate results as new data arrives. Such an approach would improve scalability and reduce recomputation costs. GLnexus can be integrated into common workflow systems such as Nextflow, WDL, or Snakemake. In addition, individual gVCF files can be accessed using HTSlib to enable random access to specific genomic regions, avoiding the need to download whole files and improving efficiency when working with BED-defined regions.
Overall, with approximately two full-time engineers, adequate computing infrastructure, and high-quality raw sequencing data, a population-scale WGS variant calling pipeline for fewer than 10,000 samples could realistically be implemented in under one month.
Caetano-Anolles, D. (2022). "Calling variants on cohorts of samples using the HaplotypeCaller in GVCF mode." GATK Documentation. https://gatk.broadinstitute.org/hc/en-us/articles/360035531812-GVCF-Genomic-Variant-Call-Format
Lin, M. F. et al. (2018). "GLnexus: joint variant calling for large cohort sequencing." bioRxiv. https://www.biorxiv.org/content/10.1101/343970v1
GLnexus repository. https://github.com/dnanexus-rnd/GLnexus
Kousathanas, A. et al. (2022). "Whole-genome sequencing reveals host factors underlying critical COVID-19." Nature, 607, 97–103. https://doi.org/10.1038/s41586-022-04576-6
Byrska-Bishop, M. et al. (2022). "High-coverage whole-genome sequencing of the expanded 1000 Genomes Project cohort including 602 trios." Cell, 185. https://doi.org/10.1016/j.cell.2022.08.004
Illumina. "DRAGEN Bio-IT Platform: gVCF Genotyper." https://www.illumina.com/science/genomics-research/articles/gVCF-Genotyper.html
"Scaling variant discovery to a million genomes with the Genomic Variant Store." Terra. https://terra.bio/scaling-variant-discovery-to-a-million-genomes-with-the-genomic-variant-store/
DPGT (Distributed Population Genetics Tool). https://github.com/BGI-flexlab/DPGT
