Add depth-vs-metric QC plots and summaries for mutdensity/omega outputs#439
Merged
Conversation
Agent-Logs-Url: https://github.com/bbglab/deepCSA/sessions/a3d27832-9c45-4e45-8f40-3262358fa1f2 Co-authored-by: FerriolCalvet <38539786+FerriolCalvet@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bbglab/deepCSA/sessions/a3d27832-9c45-4e45-8f40-3262358fa1f2 Co-authored-by: FerriolCalvet <38539786+FerriolCalvet@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bbglab/deepCSA/sessions/a3d27832-9c45-4e45-8f40-3262358fa1f2 Co-authored-by: FerriolCalvet <38539786+FerriolCalvet@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bbglab/deepCSA/sessions/a3d27832-9c45-4e45-8f40-3262358fa1f2 Co-authored-by: FerriolCalvet <38539786+FerriolCalvet@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bbglab/deepCSA/sessions/a3d27832-9c45-4e45-8f40-3262358fa1f2 Co-authored-by: FerriolCalvet <38539786+FerriolCalvet@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add module for QC plots of metrics vs depth
Add depth-vs-metric QC plots and summaries for mutdensity/omega outputs
Apr 4, 2026
- sample comparisons are relevant within a gene - comparisons between genes of the same sample are not that relevant - add FIXME for defining command line arguments properly
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new QC analysis to relate sequencing depth to mutagenesis/selection metrics, wiring it into the DeepCSA plotting QC path and publishing the resulting plots/tables.
Changes:
- Introduces
bin/metrics_vs_depth_qc.pyand a new Nextflow processPLOT_METRICS_VS_DEPTH_QCto generate metric-vs-depth PDFs and TSV summaries. - Integrates the new QC step into the QC plotting subworkflow and main workflow wiring, including placeholder handling for optional inputs.
- Adds a publishDir route and documents the new output location.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| workflows/deepcsa.nf | Wires new QC inputs into PLOTTINGQC and adds placeholder channels for optional inputs. |
| subworkflows/local/plotting_qc/main.nf | Includes and invokes the new metrics-vs-depth QC module; emits new outputs. |
| modules/local/plot/qc/metrics_vs_depth/main.nf | New Nextflow process wrapper around metrics_vs_depth_qc.py with stub outputs. |
| bin/metrics_vs_depth_qc.py | New QC implementation producing scatterplot PDFs and depth-effect/missingness TSV summaries. |
| conf/results_outputs.config | Publishes outputs under qc/metrics_vs_depth. |
| conf/modules.config | Adds process config for optional-arg gating via task.ext.*. |
| docs/output.md | Documents the new QC output path. |
| assets/placeholder_no_file.tsv | Placeholder file used for optional-channel fallbacks. |
| tests/deepcsa.nf.test | Minor edit (removes trailing blank line). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- activate the use of all groups
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds QC focused on how sequencing depth relates to mutagenesis/selection metrics, using compiled cohort outputs and per-gene per-sample depth tables. It introduces scatterplot outputs (per sample) and TSV summaries to quantify depth effects and highlight depth-associated missingness.
New QC capability: metric vs depth (per sample, per gene points)
bin/metrics_vs_depth_qc.pyto analyze:all_mutdensities.tsv(required)all_adjusted_mutdensities.tsv(optional)all_omegas*_global_loc.tsv(optional)all_groups.json+*.depth_per_gene_per_sample.tsvmetricvsMEAN_GENE_DEPTH, split by sample)pearson/spearman, slope, p-value)Pipeline integration
modules/local/plot/qc/metrics_vs_depth/main.nf(PLOT_METRICS_VS_DEPTH_QC)subworkflows/local/plotting_qc/main.nfworkflows/deepcsa.nfPublished outputs and docs
qc/metrics_vs_depthinconf/results_outputs.configdocs/output.md) to include the new QC artifact group.assets/placeholder_no_file.tsv).Test surface update
tests/deepcsa.nf.testomega scenario to assert presence of the new QC output directory.