-
Notifications
You must be signed in to change notification settings - Fork 0
Add VAF vs depth plots with independent modules and workflow integration #394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
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>
|
@copilot the updates added do not work, the module you created is not connected to any workflow for it being executed. Can you make sure to connect it appropriately? Also, the current version of the module requires the user to run all methods: mutdensity, omega, oncodrivefml in order to get the module to work, but I would like them to be independent from each other so that each of them was run independently. Also please restrict the hyperbolas to the vaf and mutation density plots, do not add them for the others. Make sure all these tasks are completed before asking for my review again. |
- 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>
I've addressed all the feedback:
The modules are now fully independent - each checks for file availability and generates only the applicable plots. Fixed in commits 8e1a4ad and 9cf5d71. |
- 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>
Implements plotting functionality to analyze relationships between sequencing depth and quantitative metrics (VAF, mutation density, omega, OncodriveFML). The implementation uses independent modules with hyperbolic curves only for VAF and mutation density plots.
Implementation
Two independent scripts:
bin/plot_vaf_mutdensity_depth.py- VAF and mutation density plots WITH hyperbolic curvesplot_vaf_vs_depth_per_site()- VAF scatter with per-site depthplot_mutdensity_vs_depth()- Per-gene mutation density by type (all/SNV/indels)add_hyperbolic_curves()- Overlays N/depth curves (N=1,2,3...configurable)count_mutations_on_curves()- Tolerance-based assignment to curvesbin/plot_selection_depth.py- Selection metrics plots WITHOUT hyperbolic curvesplot_omega_vs_depth()- dN/dS ratios by impact (missense/truncating)plot_oncodrivefml_vs_depth()- Functional bias scoresIndependent Nextflow modules:
modules/local/plot/vaf_mutdensity_depth/- VAF and mutation density modulemodules/local/plot/selection_depth/- Selection metrics moduleWorkflow integration:
subworkflows/local/plot_depth_relationships/- Orchestrates both modulesworkflows/deepcsa.nfplot_depth_relationships = trueparameterDocumentation:
docs/vaf_depth_plots.md- Usage and interpretation guide for both modulesdocs/examples/vaf_depth_plots_example.sh- Usage patterns for each moduledocs/IMPLEMENTATION_SUMMARY.md- Technical details and integrationUsage
VAF and mutation density (with hyperbolic curves):
Selection metrics (without hyperbolic curves):
In pipeline:
Enable in nextflow.config:
plot_depth_relationships = trueKey features
Module independence: Each module runs separately with partial inputs
Hyperbolic curves restricted: Only on VAF and mutation density plots, NOT on omega or OncodriveFML
Automatic counting of mutations within 5% tolerance of each curve (VAF/mutation density only)
Statistical significance color-coding (p < 0.05 for omega, q < 0.1 for OncodriveFML)
Reference curves for mutation density showing expected counts at various depths
Flexible input handling - each module generates only plots for provided files
Workflow integration with proper channel handling for per-sample data
Fixes Add VAF vs depth plots #391
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.