Skip to main content

GLIMPSE2 Low-Pass Imputation Overview

Pipeline VersionDate UpdatedDocumentation AuthorQuestions or Feedback
See changelog for version information.See changelogTerra Scientific Pipeline ServicesPlease file an issue in WARP.

Introduction to the GLIMPSE2 Low-Pass Imputation pipeline​

The GLIMPSE2 Low-Pass Imputation pipeline imputes missing genotypes from a manifest of input low-pass CRAM/CRAI paths (or from CRAM/CRAI arrays that are converted to a manifest) using a large genomic reference panel. It uses bcftools-based variant calling, GLIMPSE2-based phasing and ligation, and cohort-aware hierarchical merge/re-annotation to produce final per-contig imputed VCF outputs along with sample-level QC metrics.

GLIMPSE2 Low-Pass Imputation Summary​

The Glimpse2LowPassImputation workflow is a WDL-based pipeline for low-pass whole genome imputation using GLIMPSE2. This top-level workflow acts as a gateway that scales to large cohorts by splitting samples into batches, running a per-batch imputation subworkflow, then merging per-batch results back into cohort-level per-contig VCFs.

The workflow processes requested contigs independently, calls candidate variants from CRAMs at reference panel sites, phases and ligates imputed chunks, dynamically splits contigs into sub-regions using the FASTA index, hierarchically merges batch sample columns per region, recomputes AF/INFO across all samples, optionally filters by INFO threshold, optionally censors values of RAF below threshold, concatenates regions, and indexes final outputs along with computing sample QC metrics.

Pipeline Features​

Pipeline featuresDescriptionSource
Assay typeLow-pass whole genome imputation using GLIMPSE2GLIMPSE2
Overall workflowManifest normalization, CRAM calling, chunked phase/ligate, header updates, hierarchical merge, and AF/INFO re-annotationDefined in Glimpse2LowPassImputation.wdl + imported subworkflows/tasks
Workflow languageWDL 1.0openWDL
Sub-workflowsGateway workflow + Glimpse2LowPassImputationBatch + MultilevelHierarchicallyMergeVcfsImported from sibling WDLs in low_pass_imputation/
Genomic processingContig-by-contig processing with nested reference-chunk and postprocessing-region scattersWorkflow scatter logic
Cohort scalabilityInput manifest splitting via sample_batch_size, then hierarchical per-contig batch mergeGateway orchestration in Glimpse2LowPassImputation.wdl
Algorithmsbcftools mpileup/call/norm/merge + GLIMPSE2 phase/ligate + custom paste/concat + cohort AF/INFO recomputationTask commands in batch and task WDLs
Quality controlSample QC metricsCollectQCMetrics
Data input file formatCRAM/CRAI manifest or CRAM/CRAI arraysWorkflow input block
Data output file formatPer-contig imputed VCFs, index files, MD5 checksums, and QC metricsWorkflow outputs
ContainersGATK, GLIMPSE2, bcftools/samtools, Python, custom imputation Rust tooling containersRuntime blocks
Resource optimizationParallelization by sample batch, contig, reference chunk, and postprocessing shard regionWorkflow architecture

Inputs​

This gateway workflow expects manifest- or array-based CRAM inputs and a GLIMPSE2-compatible reference panel layout.

InputDescription
cramsOptional array of input CRAM paths. If both arrays and a manifest are supplied, arrays take precedence.
cram_indicesOptional array of matching CRAI paths for crams.
cram_manifestOptional manifest TSV used when input arrays are not provided. The workflow expects the manifest to contain cram_path and cram_index_path columns.
output_basenameBasename used for intermediate and final outputs.
raf_censoring_thresholdRemove RAF annotations for sites with RAF <= this value; default 0.0 (disabled).
info_filter_for_inclusionOptional INFO threshold for variant inclusion; variants with INFO below this value are excluded from the final output VCFs; default 0.0 (disabled).
contigsContigs/chromosomes to process.
reference_panel_prefixPrefix for the reference panel files, ending in /; expected files include sites.<contig>.vcf.gz, sites_table.<contig>.gz, and reference_chunks.<contig>.txt.
fastaReference FASTA used for CRAM splitting and variant calling.
fasta_indexFASTA index for fasta used for dynamic postprocessing region splitting.
ref_dictReference dictionary used in VCF header updates.
pipeline_header_lineOptional additional header line added to output VCF headers.
impute_reference_only_variantsWhether to impute reference-only variants; default false.
call_indelsWhether to include indels during calling/imputation; default false.
calling_batch_sizeInternal calling batch size within each Glimpse2LowPassImputationBatch run; default 100.
sample_batch_sizeNumber of samples per batch for gateway-level scaling (default: 500).
postprocessing_shard_size_bpSize of genomic shards (in base pairs) for parallelizing postprocessing steps; default 25000000 (25 Mb).
glimpse_phase_cpu_overrideOptional CPU override for GLIMPSE2 chunk phasing. If unset, the batch workflow defaults to 4 threads.
merge_batch_sizesParameterizable batch sizes per hierarchical merge level (default: [100]).
merge_do_localizationBooleans indicating whether to localize input files at each corresponding hierarchical merge level (default: [true]).
merge_timeouts_minPer-file download timeouts in minutes when streaming at each hierarchical merge level; 0 disables timeout (default: [0]).
gatk_dockerDocker image used for GATK-based tasks.
glimpse_dockerDocker image used for GLIMPSE2 phasing and ligation tasks.
docker_mergeDocker image used for annotation extraction and AF/INFO re-annotation tasks.

Workflow Tasks​

The top-level workflow orchestrates batching, per-batch imputation, and contig-level hierarchical merge/finalization.

Task / CallPurposeInput DependenciesKey Function
ConvertInputArraysToManifestConvert input CRAM/CRAI arrays into a manifestcrams, cram_indicesSupports large submissions via manifest abstraction
SplitIntoSampleBatches (SplitCramManifestIntoBatches)Split the manifest into sample-level batchescram_manifest_to_use, sample_batch_sizeEnables gateway-level cohort scaling
RunBatch (Glimpse2LowPassImputationBatch)Run per-batch low-pass calling, chunked phase/ligate, and header generationBatch manifest + reference inputs + calling_batch_size + ref_dictProduces per-batch per-contig ligated BCFs, indexes, and headers
CreateContigRegionsGenerate region shards for scalable parallel mergingfasta_index, contig, postprocessing_shard_size_bpParses FASTA index to generate balanced genomic shards
ExtractAnnotationsExtract AF/INFO annotations from each batch contig BCF in shard regionsPer-batch-and-contig ligated BCF + index + regionCaptures per-batch-and-shard annotations for cohort recomputation
MergeRegion (MultilevelHierarchicallyMergeVcfs)Hierarchically merge sample columns across batches for each shardArrays of per-batch-and-shard BCFs/indexes + merge configurationCreates the full-cohort shard BCF
RecomputeAfInfoAndFilterInfoAndCensorRaf (RecomputeAndAnnotate)Recompute AF/INFO across the merged cohort and re-annotate for each shard and optionally filter by INFO and censor RAFMerged per-shard BCF + annotations + sample counts + INFO and RAF thresholdsRestores cohort-correct AF/INFO values
ConcatAndFinalizeMultiBatch (ConcatAndFinalizeVcfs)Concat shards, apply updated header, and finalize VCF/index/md5 outputsPer-shard re-annotated+filtered+censored VCFs + updated_headerEmits concatenated_vcf, index, and md5sum per contig
FilterInfoAndCensorRafAndFinalizeVcfOptionally filter by INFO and censor RAF, apply updated header, and finalize VCF/index/md5 outputs for single batchesLigated contig BCF + index + thresholds + updated_headerEmits filtered_vcf, index, and md5sum per contig
GatherContigVcfsForQcMetrics (GatherVcfsNoIndex)Combine all finalized contig VCFs into one all-chromosome VCFfinalized_contig_vcf arrayProvides a single VCF to calculate QC metrics
CollectQCMetricsCompute cohort-level QC metrics tableGatherContigVcfsForQcMetrics.output_vcfProduces the final qc_metrics output

Outputs​

Upon successful completion, the workflow emits final per-contig imputed outputs, matching indexes and MD5 checksums, and a QC metrics table.

OutputDescription
imputed_vcfsFinal per-contig imputed multi-sample VCF files
imputed_vcf_indexesIndex files for final per-contig imputed VCF files
imputed_vcf_md5sumsMD5 checksums for final per-contig imputed VCF files
qc_metricsSample-level QC metrics table computed across all contigs

Glimpse2LowPassImputationBatch summary​

The Glimpse2LowPassImputationBatch workflow is the per-batch subworkflow used by Glimpse2LowPassImputation. It is designed for cohorts up to roughly 1000 samples per batch, running variant calling from CRAMs and contig-level chunked phasing, ligation, and header generation for upstream cohort merge.

Batch inputs​

When run through Glimpse2LowPassImputation, most of these inputs are passed through from the gateway workflow. ref_dict and pipeline_header_line are new to the batch workflow because header generation (UpdateHeader) now runs per batch rather than in the top-level workflow.

InputDescription
contigsContigs/chromosomes to process.
reference_panel_prefixPrefix for the reference panel files, ending in /; expected files include sites.<contig>.vcf.gz, sites_table.<contig>.gz, and reference_chunks.<contig>.txt.
cram_manifestManifest TSV of CRAM/CRAI paths for the samples in this batch.
fastaReference FASTA used for CRAM splitting and variant calling.
fasta_indexFASTA index for fasta.
output_basenameBasename used for intermediate and output files.
ref_dictReference dictionary used to update the contig lines in each contig's VCF header.
pipeline_header_lineOptional additional header line added to the updated headers; default "" (none).
impute_reference_only_variantsWhether to impute reference-only variants; default false.
call_indelsWhether to include indels during calling/imputation; default false.
calling_batch_sizeNumber of samples per internal calling batch; default 100.
glimpse_phase_cpu_overrideOptional CPU override for GLIMPSE2 chunk phasing. If unset, defaults to 4 threads.
glimpse_dockerDocker image used for GLIMPSE2 phasing, ligation, and header update tasks.

Batch internal processing​

StepPurpose
SplitCramManifestIntoBatchesOfStringsSplits the CRAM manifest into internal calling batches
BcftoolsMpileupComputes pileups at panel sites per internal batch
BcftoolsCallCalls candidate variants from mpileup output
BcftoolsNormNormalizes and indexes called variants
BcftoolsMerge (conditional)Merges per-internal-batch VCFs if multiple were produced
ComputeShardsAndMemoryPerShardReads reference chunks and computes per-shard memory estimates
GlimpsePhaseRuns GLIMPSE2_phase for each reference shard
GlimpseLigateLigates shard outputs to one contig-level imputed BCF
UpdateHeaderApplies the reference dictionary and optional pipeline header line to each ligated contig BCF, emitting the updated BCF, its index, and the updated header text

Batch outputs​

OutputDescription
imputed_contig_ligated_bcfsPer-contig ligated imputed BCFs for this sample batch, with updated headers applied
imputed_contig_ligated_bcf_indicesIndexes (.csi) for contig ligated BCF outputs
updated_headersUpdated VCF header text files per contig, used when finalizing the merged VCFs
total_samplesTotal number of samples represented in the batch

LowPassMultilevelHierarchicallyPasteVcfsStreaming summary​

The MultilevelHierarchicallyMergeVcfs workflow (defined in LowPassMultilevelHierarchicallyPasteVcfsStreaming.wdl) provides scalable multi-level merging for squared-off VCF/BCF inputs across sample batches. It performs region-first hierarchical batching, optional streaming/localization, and final region concatenation.

MultilevelHierarchicallyMergeVcfs internal processing​

StepPurpose
CreateBatches (L0/L1/L2)Split input files into hierarchical batch groups
MergeVcfs (L0/L1/L2)Merge each batch within each region with optional streaming timeouts
FinalRegionMergeCollapse remaining per-region intermediate files when needed
ConcatBcfsConcatenate finalized region outputs into one merged BCF

MultilevelHierarchicallyMergeVcfs outputs​

OutputDescription
merged_bcfFinal merged BCF across all input samples and regions
merged_bcf_idxIndex for merged_bcf

Glimpse2LowPassImputationQuotaConsumed summary​

The QuotaConsumed workflow computes submitted sample count for service quota accounting from cram_manifest.

Glimpse2LowPassImputationQC summary​

The InputQC workflow validates manifest-level and CRAM-level readiness before low-pass imputation.

InputQC checks​

  • required manifest columns are present: cram_path, cram_index_path
  • counts of CRAMs and CRAIs match
  • sample IDs are unique
  • CRAM paths are unique
  • CRAM file names end with .cram and indices end with .crai
  • input paths use gs:// format and are accessible
  • CRAM file sizes do not exceed the configured maximum (default: 10 GB)
  • CRAM files are aligned to the expected reference
  • optional requester-pays validation via billing_project_for_rp

Important notes​

  • Runtime parameters are optimized for Broad's Google Cloud Platform implementation.

Citing the Imputation Pipeline​

If you use the GLIMPSE2 Low-Pass Imputation Pipeline in your research, please consider citing our preprint:

Degatano, K., Awdeh, A., Cox III, R.S., Dingman, W., Grant, G., Khajouei, F., Kiernan, E., Konwar, K., Mathews, K.L., Palis, K., et al. Warp Analysis Research Pipelines: Cloud-optimized workflows for biological data processing and reproducible analysis. Bioinformatics 2025; btaf494. https://doi.org/10.1093/bioinformatics/btaf494

Contact us​

Help us make our tools better by filing an issue in WARP; we welcome pipeline-related suggestions or questions.

Licensing​

Copyright Broad Institute, 2020 | BSD-3

The workflow script is released under the WDL open source code license (BSD-3) (full license text at https://github.com/broadinstitute/warp/blob/master/LICENSE). However, please note that the programs it calls may be subject to different licenses. Users are responsible for checking that they are authorized to run all programs before running this script.