pangenome_germline
pangenome_germline
Run a GPU-accelerated end-to-end germline pipeline from FASTQ to VCF using pangenome alignment (Giraffe) and Pangenome-aware DeepVariant.
Refer to the pangenome_germline Reference section for a detailed listing of all available options.
What is the Pangenome Germline Pipeline?
The pangenome germline pipeline combines two tools into a single end-to-end workflow:
-
Giraffe (giraffe (vg giraffe + GATK)) — aligns short reads to a pangenome graph, producing a coordinate-sorted, duplicate-marked BAM file.
-
Pangenome-aware DeepVariant (pangenome_aware_deepvariant) — calls variants from the aligned BAM using a pangenome-aware model, producing a VCF file.
This pipeline is inspired by the vgteam Giraffe-DeepVariant WDL workflow, but uses Pangenome-aware DeepVariant instead of standard DeepVariant for improved variant calling accuracy in complex and highly variable genomic regions.
Generating Required Files
The pangenome germline pipeline requires the following input files:
For Giraffe (alignment):
.gbz— pangenome graph.dist— distance index.min— minimizer index.zipcodes— zipcodes index.paths.sub— filtered reference paths
For Pangenome-aware DeepVariant (variant calling):
.fa— reference FASTA extracted from the graph.fa.fai— FASTA index
The reference FASTA (--ref) must be derived from the same pangenome graph
used for alignment (--gbz-name) and must match the contigs listed in the
reference paths file (--ref-paths).
The index files can be generated from a GBZ graph using vg autoindex, and
the reference FASTA can be extracted from the graph using vg paths. The
following example uses the HPRC v1.1 Minigraph-Cactus pangenome graph aligned to
GRCh38.
Note that only GBZ version 1 graphs are supported. The HPRC download used below is
version 1 already, but a graph written by vg 1.72.0 or later is version 2 and has to be
converted first; refer to
Supported GBZ version in the
Giraffe documentation.
This produces the following files:
hprc-v1.1-mc-grch38.d9.gbz— GBZ graphhprc-v1.1-mc-grch38.d9.autoindex.1.75.1.dist— distance indexhprc-v1.1-mc-grch38.d9.autoindex.1.75.1.shortread.withzip.min— minimizer indexhprc-v1.1-mc-grch38.d9.autoindex.1.75.1.shortread.zipcodes— zipcodeshprc-v1.1-mc-grch38.d9.paths.sub— filtered reference paths
The reference FASTA for variant calling is then extracted from the same graph:
These commands generate a FASTA file (hprc-v1.1-mc-grch38.d9.fa) and the
corresponding index (hprc-v1.1-mc-grch38.d9.fa.fai).
Reference Verification
The pipeline provides an optional pre-flight verification step enabled by the
--run-ref-verification flag. When enabled, the pipeline checks the
consistency of the reference FASTA against the GBZ graph before alignment begins.
The verification checks that:
- Every contig listed in
--ref-pathsis present in the reference FASTA. - Every contig listed in
--ref-pathsis present in the GBZ graph. - The sequences and lengths of those contigs match between the FASTA and the graph.
If the verification fails, the pipeline exits with a descriptive error message
indicating which contigs are missing or mismatched, and how to fix the issue.
Users can remove the --run-ref-verification flag to bypass this check,
but the resulting variants may be incorrect if the reference files are inconsistent.
When --run-ref-verification is not set, the pipeline will still suggest
using the flag if an error occurs during alignment or variant calling, as the error
may be caused by inconsistent reference files.
Quick Start
Before running the pangenome germline pipeline, ensure you have generated the required files. Refer to the file generation section above for instructions.
Instead of FASTQ input, the pipeline can align or re-align a single-end CRAM file with
--in-se-cram, together with --in-cram-ref when that input contains aligned reads.
Refer to Aligning Ultima CRAM Input
in the Giraffe documentation for details. The Ultima per-base tag options --ultima-tags
and --tp-output-order are not available here, because this pipeline passes its
alignments to a variant caller that has no use for the per-base tags.
System Requirements and Performance
The pangenome germline pipeline has the same host requirements as Giraffe:
-
A 2 GPU system should have at least 100GB CPU RAM and at least 32 CPU threads.
-
A 4 GPU system should have at least 200GB CPU RAM and at least 64 CPU threads.
-
An 8 GPU system should have at least 400GB CPU RAM and at least 128 CPU threads.
Running on a single GPU is supported but not recommended. If using a single GPU, ensure that your system meets the 2-GPU requirement mentioned above.
The pangenome germline pipeline inherits performance options from both Giraffe and Pangenome-aware DeepVariant. The key tuning parameters are:
Giraffe (alignment step):
--nstreams: Number of CUDA streams per GPU (default:auto).--num-cpu-threads-per-gpu: Number of CPU worker threads per GPU (default: 16).--minimizers-gpu: Enable GPU-accelerated minimizer computation (SE only).--low-memory: For GPUs with less than 22 GB of device memory.
Pangenome-aware DeepVariant (variant calling step):
--num-streams-per-gpu: Number of streams per GPU for variant calling (default:auto).--run-partition: More efficiently splits work across multiple GPUs.
For detailed performance guidance on the alignment step, refer to System Requirements and Useful Options for Performance. For the variant calling step, refer to Best Performance for Deepvariant.
Compatible CPU-based Commands
The commands below are the CPU counterpart of the Parabricks pangenome germline pipeline. The output from these commands will be equivalent to the output from the above command. Refer to the Output Comparison page for comparing the results.
The index files used below are generated in the file generation section.
Source of Mismatches
The pangenome germline pipeline combines Giraffe and Pangenome-aware DeepVariant. Sources of mismatches between Parabricks and CPU-based tools can arise from either stage. For detailed information, refer to:
-
Giraffe Source of Mismatches — differences in the alignment stage (baseline container requirements, unmapped read sorting).
-
Pangenome-aware DeepVariant Source of Mismatches — differences in the variant calling stage (CNN inference, read sorting, GBZ reader caching).
Options
The --run-partition option splits the run into partitions, each using
--gpu-num-per-partition GPUs (default 2). --num-gpus must be a multiple of
--gpu-num-per-partition, so at least 2 GPUs are required; running with --num-gpus 1
will cause the tool to exit with an error.