Skip to content

Add several plotting scripts#333

Merged
FerriolCalvet merged 26 commits intodevfrom
massive-plotting
Aug 1, 2025
Merged

Add several plotting scripts#333
FerriolCalvet merged 26 commits intodevfrom
massive-plotting

Conversation

@FerriolCalvet
Copy link
Collaborator

@FerriolCalvet FerriolCalvet commented Jul 29, 2025

Still missing some plots but this is a partial plotting update to get several plots to dev so that it can start to be used.

AI generated summary

This pull request introduces significant updates to the plotting workflows and configuration of the deepcsa pipeline, focusing on modularization, improved plotting capabilities, and better handling of omega analysis outputs. Key changes include the addition of new processes and workflows for plotting, updates to the omega analysis workflow, and the replacement of individual plot modules with a centralized plotting summary workflow.

Plotting Enhancements:

  • Added a new process PLOT_SATURATION in modules/local/plot/saturation/main.nf for generating saturation plots, including inputs, outputs, and the necessary script logic.
  • Introduced a new workflow PLOTTING_SUMMARY in subworkflows/local/plottingsummary/main.nf to centralize and streamline the generation of selection and saturation plots. This replaces individual plot calls in the main workflow.
  • Updated the PLOT_SELECTION_METRICS process in modules/local/plot/selection_metrics/main.nf to simplify arguments and output handling, and ensure output directories are created consistently. [1] [2]

Omega Analysis Workflow Updates:

  • Enhanced the OMEGA_ANALYSIS workflow in subworkflows/local/omega/main.nf by adding empty channels for site_comparison_results and global_loc_results to handle outputs more flexibly.
  • Modified the workflow to flatten and emit site_comparison_results for downstream use, ensuring compatibility with the new plotting summary workflow. [1] [2]

Integration into Main Workflow:

  • Replaced the PLOT_SELECTION_METRICS module with the new PLOTTING_SUMMARY workflow in workflows/deepcsa.nf, integrating it with the omega analysis and positive selection results. [1] [2]
  • Updated the workflow logic to ensure PLOTTINGSUMMARY is invoked only when all required parameters (omega, oncodrive3d, oncodrivefml, indels) are enabled.

Configuration Adjustments:

  • Added a new parameter omega_plot to the conf/test_real.config file to toggle omega plot generation.

These changes improve the modularity, maintainability, and functionality of the pipeline, particularly in the context of plotting and omega analysis.

FerriolCalvet and others added 16 commits June 16, 2025 12:04
- subworkflow definition
- shortlisting plots to add

missing:
- nf scripts for the modules
- python scripts for the plots
list inputs
missing:
- handle sample information input files
- handle reference datasets
- handle multiple genes
- not tested
- pending to decide creation of unique_splice_sites
commit 10c12aa
Author: FerriolCalvet <ferriolcalvet@gmail.com>
Date:   Thu Jul 24 12:35:40 2025 +0200

    update gnomAD threshold to 0.001

    - ignore errors in omega plot

commit 31e741e
Author: FerriolCalvet <ferriolcalvet@gmail.com>
Date:   Tue Jul 22 18:34:11 2025 +0200

    update description and fix broken link

commit 7b0fd9b
Merge: 72dc4d9 cb18adc
Author: Ferriol Calvet <38539786+FerriolCalvet@users.noreply.github.com>
Date:   Sun Jul 20 22:34:46 2025 +0200

    Merge pull request #315 from bbglab/dev

commit cb18adc
Author: FerriolCalvet <ferriolcalvet@gmail.com>
Date:   Sat Jul 19 12:40:39 2025 +0200

    fix bug in mut density & update omega container

commit 1b4a52d
Author: FerriolCalvet <ferriolcalvet@gmail.com>
Date:   Tue Jul 15 15:52:07 2025 +0200

    fix broken path for test_real

commit db6d640
Author: Ferriol Calvet <38539786+FerriolCalvet@users.noreply.github.com>
Date:   Fri Jul 11 15:50:45 2025 +0200

    Allow gene selection in consensus (#316)

    * update consensus building to filter genes

    - add consensus compliance param
    - add list of genes param
    - NOT tested

    * tested gene filter implementation

    - consensus panels implemented in polars
    - allowing subset for specific genes

commit b92c2b9
Author: FerriolCalvet <ferriolcalvet@gmail.com>
Date:   Thu Jul 10 23:56:47 2025 +0200

    add metro map

commit 11fb1c5
Author: FerriolCalvet <ferriolcalvet@gmail.com>
Date:   Thu Jul 10 08:25:31 2025 +0200

    update description in main README

commit 628f282
Author: Ferriol Calvet <38539786+FerriolCalvet@users.noreply.github.com>
Date:   Mon Jul 7 19:14:21 2025 +0200

    Add more complete docs (#306)

    * first doc update

    * update in usage documentation

    - list params
    - list structural parameters and files

    * backbone of output docs

    * update usage description with custom sets of mutations

    * fix headers

    * docs: Update usage with vep information

    * update output description

    * update order of usage information

    * update distribution of information in the docs

    * fix typo in docs/output.md

    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

    * fix markdown linting

    * remove unnecessary validation params from config

    - REQUIRES TESTING

    * remove remaining references to download VEP cache

    * update dag format to mmd

    * update in usage

    * update documentation of file formatting and some params

    * add examples in file formatting docs

    * apply review comments

    * remove Nextflow parameters section

    * minor fix in nextflow.config

    ---------

    Co-authored-by: Miquel L. Grau <miguel.grau@irbbarcelona.org>
    Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

commit 72dc4d9
Author: FerriolCalvet <ferriolcalvet@gmail.com>
Date:   Mon Jul 7 15:53:47 2025 +0200

    temporary LICENSE definition

commit 14c5246
Author: Ferriol Calvet <38539786+FerriolCalvet@users.noreply.github.com>
Date:   Fri Jun 27 11:19:45 2025 +0200

    fix bug in panel_annotation (#313)

    reimplement it with click solved the problem
    - only_canonical boolean working
    - not tested

commit 764782a
Author: Ferriol Calvet <38539786+FerriolCalvet@users.noreply.github.com>
Date:   Thu Jun 26 23:23:05 2025 +0200

    Update mutation rate to mutation density (#307)

    * rename mutrate to mut density

    - reimplement with click
    - partial renaming
    - simplification of sample_name logic

    * full update of mutation rate to mutation density

    * define other_sample_SNP based on all VAF

    * update mutation density functions

    - clean code
    - add explanation on mutation density

    * apply review changes

commit aae8f0b
Author: Ferriol Calvet <38539786+FerriolCalvet@users.noreply.github.com>
Date:   Thu Jun 26 10:49:00 2025 +0200

    Ensure POSTPROCESSVEPPANEL in output (#311)

    * fix relative mutabilities output

    * explicitly define postprocessveppanel outdir

    * force outputting postprocesspanel

    * update storing fixes

commit dd25b9b
Merge: 05c80ee 26d5d9b
Author: Ferriol Calvet <38539786+FerriolCalvet@users.noreply.github.com>
Date:   Wed Jun 4 23:09:29 2025 +0200

    Merge pull request #303 from bbglab/dev

    First pre-release merge

commit 05c80ee
Merge: ea9a301 e06218a
Author: Ferriol Calvet <38539786+FerriolCalvet@users.noreply.github.com>
Date:   Tue Apr 29 10:30:23 2025 +0200

    Merge pull request #289 from bbglab/tmp-dev

    First release

commit e06218a
Merge: 7559d7f ea9a301
Author: Ferriol Calvet <38539786+FerriolCalvet@users.noreply.github.com>
Date:   Tue Apr 29 10:11:05 2025 +0200

    Merge branch 'main' into tmp-dev

commit ea9a301
Author: FerriolCalvet <ferriolcalvet@gmail.com>
Date:   Thu Jul 25 16:05:10 2024 +0200

    update schema
- add mutation types
- collect sitecomparisons
- remove reference to ddg. requires external
- fix input unique to keep header and minimal information
- tested and works
Copy link
Collaborator Author

@FerriolCalvet FerriolCalvet left a comment

Choose a reason for hiding this comment

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

I think all looks good for now

@FerriolCalvet FerriolCalvet requested a review from Copilot July 29, 2025 15:33

This comment was marked as outdated.

Copy link
Member

@FedericaBrando FedericaBrando left a comment

Choose a reason for hiding this comment

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

I've checked the files and gave a broad overview of the code. I think overall is a good improvement in terms of logic and organization. Most of my comments refers to the dead code present in the code base that should either removed or explained.

A minor issue may arise if the request is looped forever and r.ok is never True. I would add a limit, an exception or a raise (whatever fits best).

Good job! 💯

FerriolCalvet and others added 3 commits July 30, 2025 00:00
- temporary solution to domain information loading
- subset domains to in_panel ones
- update domain name definition
- plotting modules works
- missing autoexons plot
- update signatures output
@FerriolCalvet FerriolCalvet self-assigned this Jul 31, 2025
@FerriolCalvet FerriolCalvet linked an issue Jul 31, 2025 that may be closed by this pull request
- add general error handling to all plotting modules
- generate exons bedfile within panel
- use correct exons definition
- update custom bedfile name
- not tested
@FerriolCalvet FerriolCalvet requested a review from Copilot August 1, 2025 08:09
Copy link
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 PR introduces significant plotting and analysis workflow improvements to the deepcsa pipeline, focusing on centralized plotting capabilities and enhanced omega analysis integration. The changes modularize plotting functionality while improving the handling of selection analysis outputs.

  • Replaces individual plot modules with a centralized PLOTTING_SUMMARY workflow
  • Enhances omega analysis workflow to better handle site comparison and plotting outputs
  • Updates parameter naming from omega_hotspots_bedfile to omega_subgenic_bedfile for clarity

Reviewed Changes

Copilot reviewed 22 out of 34 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
workflows/deepcsa.nf Integrates new plotting summary workflow and updates DNA2PROTEIN mapping inputs
subworkflows/local/plottingsummary/main.nf New centralized plotting workflow combining selection and saturation plots
subworkflows/local/omega/main.nf Enhanced to emit site comparison results and support new plotting workflow
modules/local/plot/saturation/main.nf New process for generating saturation plots with comprehensive inputs
modules/local/plot/selection_metrics/main.nf Simplified argument handling and standardized output directory creation
Various config files Parameter renaming from omega_hotspots_bedfile to omega_subgenic_bedfile

@FerriolCalvet FerriolCalvet merged commit fd48355 into dev Aug 1, 2025
@FerriolCalvet FerriolCalvet deleted the massive-plotting branch August 11, 2025 21:36
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.

Needle plots by bins

3 participants