Skip to content

Add QCs for individual mutations#408

Merged
FerriolCalvet merged 17 commits intodevfrom
qc_indvmutation
Jan 5, 2026
Merged

Add QCs for individual mutations#408
FerriolCalvet merged 17 commits intodevfrom
qc_indvmutation

Conversation

@FerriolCalvet
Copy link
Copy Markdown
Member

AI summary

This pull request introduces a new mutation-specific QC plotting process and expands the outputs and wiring for depth summary and plotting QC subworkflows. The changes improve the pipeline’s ability to generate and handle more granular depth and mutation-specific QC plots and tables, as well as set the groundwork for future depth relationship plotting functionality.

New mutation-specific QC plotting:

  • Added a new process PLOT_MUTATION_SPECIFIC in modules/local/plot/qc/mutation_specific/main.nf to generate mutation-specific QC plots and tables, with optional outputs and version tracking.
  • Integrated the new mutation-specific plotting process into the PLOTTING_QC subworkflow, including its input and invocation. [1] [2]
  • Updated the main DEEPCSA workflow to pass the somatic_mutations channel to PLOTTINGQC for mutation-specific QC plotting.

Expanded depth summary outputs and wiring:

  • Enhanced the PLOT_DEPTHS process to emit additional outputs: average depth per gene and per gene per sample, in addition to the existing per-sample average.
  • Updated the PLOT_DEPTHS subworkflow to emit these new outputs with descriptive names, making them available for downstream processes.

Configuration and groundwork for future features:

  • Added a new parameter plot_depth_relationships in nextflow.config to control future depth relationship plotting functionality.
  • Stubbed (commented) code in the main workflow to prepare for future implementation of depth relationship plots, including wiring for relevant channels and parameters.

Other workflow wiring improvements:

  • Added initialization for empty channels all_compiled_omegasgloballoc and all_mutdensities_file in the main workflow to support new and future features.
  • Wired all_compiled_omegasgloballoc to receive output from the OMEGA process for future use.

Copilot AI and others added 16 commits November 18, 2025 15:35
Co-authored-by: FerriolCalvet <38539786+FerriolCalvet@users.noreply.github.com>
Co-authored-by: FerriolCalvet <38539786+FerriolCalvet@users.noreply.github.com>
Co-authored-by: FerriolCalvet <38539786+FerriolCalvet@users.noreply.github.com>
Co-authored-by: FerriolCalvet <38539786+FerriolCalvet@users.noreply.github.com>
- Created separate scripts for VAF/mutation density (with hyperbolic curves) and selection metrics (without)
- Created independent Nextflow modules for each plot type
- Added PLOT_DEPTH_RELATIONSHIPS subworkflow to integrate modules
- Connected subworkflow to main workflow with plot_depth_relationships parameter
- Removed hyperbolic curves from omega and OncodriveFML plots as requested

Co-authored-by: FerriolCalvet <38539786+FerriolCalvet@users.noreply.github.com>
- Fixed subworkflow to use per-sample mutation density channels
- Removed old vaf_depth module and script
- Simplified channel joining logic in subworkflow
- Extract depth_per_gene file from depths output

Co-authored-by: FerriolCalvet <38539786+FerriolCalvet@users.noreply.github.com>
- Updated vaf_depth_plots.md to document two independent modules
- Clarified that hyperbolic curves only appear in VAF/mutation density plots
- Updated example script to show separate usage of each module
- Added clear distinction between modules with and without hyperbolic curves

Co-authored-by: FerriolCalvet <38539786+FerriolCalvet@users.noreply.github.com>
- still plots to be polished
Comment thread workflows/deepcsa.nf Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request introduces mutation-specific QC plotting capabilities and enhances the depth summary outputs to support more granular quality control analysis. The changes expand the pipeline's ability to generate QC plots for individual mutations with VAF vs depth relationships, while also preparing infrastructure for future depth relationship plotting functionality.

Key changes include:

  • Added new mutation-specific QC plotting process and Python script to generate VAF vs depth scatter plots with hyperbolic curve overlays, heatmaps, and top mutation tables
  • Enhanced depth summary outputs to emit per-gene and per-gene-per-sample average depth data in addition to per-sample averages
  • Added plot_depth_relationships parameter to prepare for future depth relationship analysis features

Reviewed changes

Copilot reviewed 6 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
modules/local/plot/qc/mutation_specific/main.nf New Nextflow process to generate mutation-specific QC plots and tables with configurable hyperbolic curve parameters
bin/plot_qc_mutations_vaf.py New Python script implementing VAF vs depth plotting with hyperbolic curves, heatmaps, and mutation ranking functionality
subworkflows/local/plotting_qc/main.nf Integration of mutation-specific plotting process into the QC workflow
subworkflows/local/plotdepths/main.nf Updated emit declarations to expose new per-gene and per-gene-per-sample depth outputs
modules/local/plot/depths_summary/main.nf Added two new output declarations for gene-level and gene-sample-level average depths
workflows/deepcsa.nf Wired somatic_mutations channel to PLOTTINGQC, initialized new channels for omega and mutation density data, added commented infrastructure for future depth relationship plots
nextflow.config Added plot_depth_relationships parameter for future feature toggle
bin/plot_saturation_in_genes.py Fixed exon and domain name parsing logic, added error handling for plot generation
bin/plot_maf.py Removed unused sys import and added new mutation counts stacked barplot to standard plotting output

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread modules/local/plot/qc/mutation_specific/main.nf
Comment thread modules/local/plot/qc/mutation_specific/main.nf
Comment thread modules/local/plot/qc/mutation_specific/main.nf
Comment thread modules/local/plot/qc/mutation_specific/main.nf
@FerriolCalvet FerriolCalvet merged commit 60668a3 into dev Jan 5, 2026
@FerriolCalvet FerriolCalvet deleted the qc_indvmutation branch January 5, 2026 09:24
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.

3 participants