Skip to main content

GLIMPSE2 SV 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 SV Imputation pipeline

The GLIMPSE2 SV Imputation pipeline imputes structural variants, SNPs, and INDELs from a manifest of input GVCF paths (or from GVCF/index arrays that are converted to a manifest). It uses GLIMPSE2-based phasing, panel-informed bubble processing, and cohort-aware merge/re-annotation to produce final per-contig imputed VCF outputs.

GLIMPSE2 SV Imputation Summary

The Glimpse2SVImputation workflow is a WDL-based pipeline for structural variant imputation using GLIMPSE2. This top-level workflow acts as a gateway that scales to large cohorts by splitting samples into batches, running preprocess + batch imputation subworkflows per batch, then merging per-batch results back into cohort-level per-contig VCFs.

The workflow processes requested chromosomes independently, extracts/reformats bubble likelihoods, phases and ligates imputed chunks, pops/marginalizes collisions, merges batch sample columns, recomputes AF/INFO across all samples, optionally filters by INFO threshold, and indexes final outputs.

Pipeline Features

Pipeline featuresDescriptionSource
Assay typeStructural variant imputation using GLIMPSE2GLIMPSE2
Overall workflowManifest normalization, preprocessing, chunked phase/ligate, pop/marginalize, merge, and AF/INFO re-annotationDefined in Glimpse2SVImputation.wdl + imported subworkflows/tasks
Workflow languageWDL 1.0openWDL
Sub-workflowsGateway workflow + PreprocessPLsGVCF + Glimpse2SVImputationBatchImported from sibling WDLs in sv_imputation/
Genomic processingContig-by-contig processing with nested shard/region scattersWorkflow scatter logic
Cohort scalabilityInput manifest splitting via sample_batch_size, then batch-level contig mergeGateway orchestration
AlgorithmsGLIMPSE2 phase/ligate + custom paste/concat + cohort AF/INFO recomputationTask commands in batch/task WDLs
Data input file formatGVCF/GVCF index manifest (or input arrays converted to manifest)Workflow input block
Data output file formatPer-contig imputed VCFs with index filesWorkflow outputs
ContainersGLIMPSE2, GATK, bcftools/samtools, Python, custom SV tooling containersRuntime blocks
Resource optimizationParallelization by sample batch, chromosome, chunk, and pop regionWorkflow architecture

Inputs

This gateway workflow expects manifest- or array-based GVCF inputs plus SV panel/chunk resources.

InputDescription
input_gvcfs / input_gvcf_idxsOptional arrays of GVCF and matching index paths. If both arrays and gvcf_manifest are provided, arrays take precedence.
gvcf_manifestOptional two-column manifest (gvcf_path, gvcf_index_path) used when arrays are not provided.
sample_batch_sizeNumber of samples per batch for gateway-level scaling (default: 1000).
output_basenameBasename used for intermediate and final outputs.
preprocess_panel_bubble_split_sites_only_vcf / _idxPanel site resource used during preprocessing.
extract_bubble_likelihoods_extra_argsOptional overrides for preprocessing extraction behavior.
paste_regionsRegions passed to hierarchical merge in preprocessing.
chromosomesChromosomes/contigs to process.
genetic_maps_tsvTSV map from contig name to GLIMPSE2 genetic map file.
ref_dictReference dictionary used in header updates.
chunked_panel_jsonJSON describing chunk bins and regions by chromosome.
extra_phase_argsArguments passed to GLIMPSE2_phase.
glimpse_phase_cpu_overrideOptional CPU override for chunked phase tasks (defaults internally to 4).
pop_glimpse2_panel_resources_jsonJSON with panel resources needed for pop/marginalize processing.
info_filter_for_inclusionOptional INFO threshold for variant inclusion (default: 0.0, meaning no filter).
pipeline_header_lineOptional additional header line to add to output VCF headers.

Workflow Tasks

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

Task / CallPurposeInput DependenciesKey Function
ConvertInputArraysToManifestConvert input GVCF/index arrays into a manifestinput_gvcfs, input_gvcf_idxsSupports large submissions via manifest abstraction
SplitIntoSampleBatchesSplit manifest into sample-level batchesDerived manifest + sample_batch_sizeEnables gateway-level cohort scaling
PreProcessGVCFsBatch (PreprocessPLsGVCF)Preprocess one batch of GVCFs into merged preprocessed BCFBatch manifest + preprocessing resourcesProduces one preprocessed BCF/index per batch
RunBatch (Glimpse2SVImputationBatch)Run per-batch chunked SV phase/ligate/pop processingPreprocessed BCF + chromosome/map/chunk/panel resourcesProduces per-batch per-contig popped posterior BCFs
ExtractPoppedAnnotationsExtract AF/INFO annotations from each batch contig VCFBatch popped VCFs + indexesCaptures per-batch annotations for cohort recomputation
MergePoppedContigVcfs (MergeSampleChunksVcfsWithPaste)Merge sample columns across batches for each contigArrays of per-batch contig VCFsCreates full-cohort contig VCF
RecomputePoppedAfInfoRecompute AF/INFO across merged cohort and re-annotateMerged contig VCF + annotations + sample countsRestores cohort-correct AF/INFO values
FilterPoppedContigByInfoOptionally filter low-confidence variants by INFORe-annotated contig VCF + thresholdRemoves variants below threshold
IndexFinalPoppedContigFinalize VCF/index outputsFiltered or unfiltered contig VCFEmits imputed_vcf and imputed_vcf_index per contig

Outputs

Upon successful completion, the workflow emits final per-contig imputed outputs and matching indexes.

OutputDescription
imputed_vcfsFinal per-contig imputed VCF files
imputed_vcf_indexesIndex files for final per-contig imputed VCF files

PreprocessPLsGVCF summary

The PreprocessPLsGVCF workflow preprocesses each input GVCF in a batch and hierarchically merges all preprocessed outputs into a single batch-level BCF for downstream GLIMPSE2 phasing.

PreprocessPLsGVCF internal processing

StepPurpose
ParseInputManifest (ParseVcfManifestIntoArrays)Parse manifest into parallel arrays of GVCF paths and index paths
PreprocessPLsGVCF scatter (PreprocessPLs task)Run per-sample extract-bubble-PLs to generate preprocessed BCFs
PastePreprocessPLsGVCFs (MultilevelHierarchicallyMergeVcfs)Hierarchically merge preprocessed BCFs across configured regions

PreprocessPLsGVCF outputs

OutputDescription
preprocessed_pls_bcfBatch-level merged preprocessed BCF
preprocessed_pls_bcf_idxIndex for preprocessed_pls_bcf
num_samplesNumber of samples represented in the batch

Glimpse2SVImputationBatch summary

The Glimpse2SVImputationBatch workflow is the per-batch subworkflow used by Glimpse2SVImputation. It takes one preprocessed batch BCF and runs chromosome-level chunked phasing, ligation, header normalization, and pop/marginalize post-processing.

Batch internal processing

StepPurpose
ChunkedGLIMPSE2PhaseRun GLIMPSE2_phase over each chunk for each chromosome
GLIMPSE2LigateLigate chunk-level phased outputs into one chromosome-level BCF
UpdateHeaderRebuild/update headers with dictionary and optional pipeline line
PopAndMarginalizeCollisionsApply pop/marginalize processing over one or more regions per chromosome
ConcatPopAndMarginalizeCollisions (ConcatBcfs)Concatenate regional popped BCFs into one popped BCF per chromosome

Batch outputs

OutputDescription
glimpse2_bubble_posteriors_vcfPer-chromosome post-ligation BCFs with updated headers
glimpse2_bubble_posteriors_vcf_idxIndexes for bubble posterior outputs
glimpse2_popped_posteriors_vcfFinal per-chromosome popped BCFs for upstream cohort merge
glimpse2_popped_posteriors_vcf_idxIndexes for popped posterior outputs

MultilevelHierarchicallyPasteVcfsStreaming summary

The MultilevelHierarchicallyMergeVcfs workflow provides scalable multi-level merging for squared-off single-sample VCF/BCF inputs. 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 fofns
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

Glimpse2SVImputationQuotaConsumed summary

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

QuotaConsumed internal processing

StepPurpose
CountGvcfsFromManifestCount GVCF entries in the manifest and report quota_consumed

QuotaConsumed outputs

OutputDescription
quota_consumedNumber of submitted GVCF entries counted from the manifest

Glimpse2SVImputationQC summary

The InputQC workflow validates manifest-level and GVCF-level readiness before SV imputation.

InputQC checks

  • required manifest columns are present: gvcf_path, gvcf_index_path
  • manifest has at least one row and no empty required values
  • GVCF paths are unique
  • GVCF and index extensions are valid (.vcf.gz/.gvcf.gz and .tbi)
  • GVCF and index basenames are matched
  • paths use valid gs:// format and are accessible
  • GVCF file size is below the configured threshold (default 10 GB)
  • GVCF headers are compatible with the expected reference dictionary
  • each GVCF contains exactly one sample
  • sample IDs are unique across all provided GVCFs
  • PL and GT FORMAT IDs are present in each GVCF header

InputQC outputs

OutputDescription
passes_qcOverall QC pass/fail status
qc_messagesAggregated QC failure messages (empty when QC passes)

Important notes

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

Contact us

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