add decomposition of HDP with SigProfilerAssignment and minor fixes#425
Draft
FerriolCalvet wants to merge 20 commits intodevfrom
Draft
add decomposition of HDP with SigProfilerAssignment and minor fixes#425FerriolCalvet wants to merge 20 commits intodevfrom
FerriolCalvet wants to merge 20 commits intodevfrom
Conversation
- 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
This was
linked to
issues
Feb 26, 2026
Contributor
There was a problem hiding this comment.
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_fiton HDP-extracted signatures and publish decomposition outputs. - Centralize exon-consensus mutation subsetting once in
DEEPCSAand 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
DNDSsubworkflow no longer takes abedfileinput (seesubworkflows/local/dnds/main.nf), but this call still passesCREATEPANELS.out.exons_consensus_bedas a third argument. This will cause a Nextflow compilation/runtime error due to mismatched inputs. Update the call to pass only the inputs expected byDNDS(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 (statsandmutation_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 keepversions.yml).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
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:

Results of SigProfilerAssignment decomposition using the signatures extracted by HDP:

Minor fixes