Skip to content

Add GATK contamination check for WES/WGS samples#2

Open
dorotejavujinovic wants to merge 1213 commits into
CISLD:masterfrom
dorotejavujinovic:gatk-contamination-clean
Open

Add GATK contamination check for WES/WGS samples#2
dorotejavujinovic wants to merge 1213 commits into
CISLD:masterfrom
dorotejavujinovic:gatk-contamination-clean

Conversation

@dorotejavujinovic

Copy link
Copy Markdown

Description

Adds GATK-based contamination detection to complement VerifyBamID2 for more reliable contamination estimation across both WGS and WES samples.

Motivation

  • VerifyBamID2 works well for WGS but has significant limitations with WES data
  • GATK CalculateContamination performs better on targeted sequencing (WES)
  • Having both methods for WGS provides cross-validation and increases confidence

Changes

  • Add CONTAMINATION_CHECK subworkflow using GATK4
  • Add PARSE_CONTAMINATION module for MultiQC integration
  • Add GATK4 GetPileupSummaries and CalculateContamination modules
  • Implement conditional intervals handling (WGS vs WES)
  • Configure MultiQC to display contamination results with thresholds

Usage

params.run_contamination = true
params.contamination_sites = "/path/to/small_exac_common_3.hg38.vcf.gz"
params.contamination_sites_tbi = "/path/to/small_exac_common_3.hg38.vcf.gz.tbi"

Testing

  • Tested on WGS samples
  • Tested on WES samples
  • MultiQC integration verified

Technical Details

  • WGS: Uses Channel.empty() for genome-wide analysis
  • WES: Uses target BED file for exome-restricted analysis
  • Results displayed in MultiQC with color-coded contamination thresholds (<2% green, 2-5% yellow, >5% red)

ramprasadn and others added 30 commits June 29, 2026 13:41
Migrate call_mobile_elements and annotate_consequence_pli to typed workflow outputs
Replace ch_publish/emit: publish pattern in the call_repeat_expansions subworkflow with named channel emits
…tion outputs via workflow outputs instead of publishDir
…nation.py to root bin; remove duplicate CREATE_* includes; rename skip_tools option to gatkcontamination
Replace ch_publish with named typed channel emits for prepare_references subworkflow
Co-authored-by: Felix Lenner <52530259+fellen31@users.noreply.github.com>
Co-authored-by: Felix Lenner <52530259+fellen31@users.noreply.github.com>
Replace ch_publish with named typed channel emits for variant_evaluation subworkflow
Replace `ch_publish` with named typed channel emits for `rank_variants` subworkflow
Replace ch_publish/subworkflow_results with named typed channel emits for gens and generate_cytosure_files subworkflows
new metromaps with mitosalt and no eklipse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants