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, optionally censors values of RAF below 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 GVCF/index arraysWorkflow input block
Data output file formatPer-contig imputed VCFs with index filesWorkflow outputs
ContainersGLIMPSE2, 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_gvcfsOptional array of input GVCF paths. If both arrays and a manifest are supplied, arrays take precedence.
input_gvcf_idxsOptional array of matching GVCF index paths for input_gvcfs.
gvcf_manifestOptional manifest TSV used when input arrays are not provided. The workflow expects the manifest to contain gvcf_path and gvcf_index_path columns.
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_vcfPanel VCF used in the preprocessing stage for bubble extraction.
preprocess_panel_bubble_split_sites_only_vcf_idxIndex for preprocess_panel_bubble_split_sites_only_vcf.
extract_bubble_likelihoods_extra_argsOptional extra arguments passed to the preprocessing step.
paste_regionsRegions passed to the hierarchical merge in the preprocessing step.
chromosomesChromosomes/contigs to process.
genetic_maps_tsvTSV mapping contig names to GLIMPSE2 genetic map files.
ref_dictReference dictionary used in header updates.
chunked_panel_jsonJSON describing chunk bins and regions by chromosome.
extra_phase_argsCommand-line arguments passed to GLIMPSE2_phase. Default value is the default in the workflow input block.
glimpse_phase_cpu_overrideOptional CPU override for GLIMPSE2 chunk phasing. If unset, the batch workflow defaults to 4 threads.
pop_glimpse2_panel_resources_jsonJSON containing panel resources used in pop/marginalize processing.
info_filter_for_inclusionOptional INFO threshold for variant inclusion; default 0.0 (disabled).
raf_censoring_thresholdRemove RAF annotations for sites with RAF <= this value; default 0.0 (disabled).
pipeline_header_lineOptional additional header line added to output VCF headers.
glimpse2_dockerDocker image used for GLIMPSE2 phases and ligation tasks.

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 the manifest into sample-level batchesgvcf_manifest_to_use, sample_batch_sizeEnables gateway-level cohort scaling
PreProcessGVCFsBatch (PreprocessPLsGVCF)Preprocess one batch of GVCFs into a merged 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 BCF in shard regionsPer-batch-and-contig popped BCF + indexCaptures per-batch-and-shard annotations for cohort recomputation
MergePoppedRegionMerge sample columns across batches for each shardArrays of per-batch-and-shard VCFsCreates the full-cohort shard VCF
RecomputePoppedAfInfoAndFilterInfoAndCensorRafRecompute AF/INFO across the merged cohort and re-annotate for each shard and optionally filter by INFO and censor RAFMerged per-shard VCFs + annotations + sample counts + INFO and RAF thresholdsRestores cohort-correct AF/INFO values
ConcatAndFinalizeMultiBatchConcat shards and finalize VCF/index outputsPer-shard re-annotated+filtered+censored VCFsEmits imputed_vcf and imputed_vcf_index per contig
FilterInfoAndCensorRafAndFinalizeBcfOptionally filter by INFO and censor RAF and then finalize VCF/index outputs for single batchesPopped contig BCFEmits 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 the batch manifest into arrays of GVCF paths and index paths
PreprocessPLsGVCF scatter (PreprocessPLs)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 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

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
  • each GVCF is vcf version 4.x

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.