Skip to content

add decomposition of HDP with SigProfilerAssignment and minor fixes#425

Draft
FerriolCalvet wants to merge 20 commits intodevfrom
ferriol-updates
Draft

add decomposition of HDP with SigProfilerAssignment and minor fixes#425
FerriolCalvet wants to merge 20 commits intodevfrom
ferriol-updates

Conversation

@FerriolCalvet
Copy link
Collaborator

@FerriolCalvet FerriolCalvet commented Feb 26, 2026

Main update: extracted signatures decomposition

The main update is to do the decomposition of the mutational signatures extracted by HDP using SigProfilerAssignment.
This results in a much cleaner assignment of mutational signatures to samples. See example below:

SigProfilerAssignment directly:
image

Results of SigProfilerAssignment decomposition using the signatures extracted by HDP:
image

Minor fixes

  • Remove all mentions to hg19 and mm10 these are not supported anymore
  • Remove some duplicated mutation subsets for exonic mutations

m-huertasp and others added 16 commits February 23, 2026 14:49
- also simplified plot_coverage_per_gene
- Removed functions to get the api calls
- New functions to obtain the gff and filter it
- Modified functions to process the data
- Added docstrings
- Also modified the order
- Removed unused functions
- Improved efficiency of find_exon by applying vectorized dataframe
  operations
- Fix errors in docstrings and parameter definition
- Add log information and remove info from matplotlib
- Added click option to script
- Added definition to nextflow process
- then distribute in the appropriate steps
- allow plotting summary of interindividual variability when run_mutdensity is enabled
-not working, to be tested
- use SPA to decompose and reassign signatures to samples
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

Adds a post-processing step to decompose HDP-extracted mutational signatures using SigProfilerAssignment, while also simplifying exon-only mutation subsetting and removing deprecated genome references (hg19/mm10).

Changes:

  • Run SigProfilerAssignment decompose_fit on HDP-extracted signatures and publish decomposition outputs.
  • Centralize exon-consensus mutation subsetting once in DEEPCSA and pass exon-filtered mutations into downstream selection/mutability analyses.
  • Remove hg19/mm10 references from docs/configs/scripts and adjust output publishing paths.

Reviewed changes

Copilot reviewed 15 out of 20 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
workflows/deepcsa.nf Adds exon-only mutation subsetting and routes exon-filtered mutations into downstream analyses; tweaks result aggregation condition.
subworkflows/local/signatures_hdp/main.nf Emits HDP signatures reformatted for SigProfilerAssignment decomposition.
subworkflows/local/signatures/main.nf Runs SigProfilerAssignment cosmic_fit plus new HDP decomposition step.
subworkflows/local/oncodrive3d/main.nf Removes redundant mutation/bed intersection; expects pre-filtered mutations.
subworkflows/local/omega/main.nf Removes redundant mutation/bed intersection; expects pre-filtered mutations.
subworkflows/local/mutability/main.nf Removes redundant mutation/bed intersection; expects pre-filtered mutations.
subworkflows/local/dnds/main.nf Removes redundant mutation/bed intersection; expects pre-filtered mutations.
subworkflows/local/adjmutdensity/main.nf Comment clarification for mutation intersection.
modules/local/signatures/sigprofiler/assignment/decompose_fit/main.nf New SigProfilerAssignment decompose_fit process for HDP decomposition.
modules/local/signatures/sigprofiler/assignment/cosmic_fit/main.nf Renames process and updates CLI args for SigProfilerAssignment 1.1.3.
modules/local/signatures/hdp/reformat_sigs/main.nf New process to reformat HDP signatures into SigProfilerAssignment-compatible TSV.
modules/local/signatures/hdp/process_results/main.nf Exposes extracted signature components file as a workflow output.
conf/modules.config Updates publish paths and adds publish rules for new decomposition/reformat steps; removes deprecated genome mappings.
conf/tools/omega.config Removes deprecated genome mappings.
docs/usage.md Updates supported genome note (GRCh38 only) for external resources.
bin/utils_context.py Removes deprecated genome imports.
bin/sites_table_from_positions.py Removes hg19/mm10 options and mapping.
bin/postprocessing_annotation.py Removes hg19/mm10 options and mapping.
bin/panel_postprocessing_annotation.py Removes hg19/mm10 options and mapping.
subworkflows/local/oncodriveclustl/main.nf Minor formatting/alignment change.
Comments suppressed due to low confidence (2)

workflows/deepcsa.nf:405

  • DNDS subworkflow no longer takes a bedfile input (see subworkflows/local/dnds/main.nf), but this call still passes CREATEPANELS.out.exons_consensus_bed as a third argument. This will cause a Nextflow compilation/runtime error due to mismatched inputs. Update the call to pass only the inputs expected by DNDS (mutations, depth, panel) or reintroduce the bedfile input consistently.
        DNDS(mutations_in_exons,
                    DEPTHSEXONSCONS.out.subset,
                    CREATEPANELS.out.exons_consensus_bed,
                    CREATEPANELS.out.exons_consensus_panel
                    )

modules/local/signatures/sigprofiler/assignment/cosmic_fit/main.nf:56

  • The stub: section only creates a PDF, but the process declares TXT outputs (stats and mutation_probs). In stub mode this will fail due to missing expected outputs. Update the stub to create placeholder TXT files that match the declared glob patterns (and keep versions.yml).

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

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.

Reduce duplicated mutation subsets Run SigProfilerAssignment with the pipeline output of HDP

3 participants