Skip to content

Export per-mutation signature probabilities from SigProfilerAssignment - #221

Open
robert-a-forsyth wants to merge 2 commits into
devfrom
fix/sigprofiler-probabilities-per-mutation
Open

robert-a-forsyth wants to merge 2 commits into
devfrom
fix/sigprofiler-probabilities-per-mutation

Conversation

@robert-a-forsyth

Copy link
Copy Markdown
Collaborator

Addresses #127 (comment 4809238681): export_probabilities_per_mutation only works with VCF input, so the COSMIC fit now reads the PASS VCF; the matrices only gate which contexts are fitted. cosmic_fit ignores --volume, so the genome volume is set through SIGPROFILER{MATRIXGENERATOR,ASSIGNMENT}_VOLUME.

PR checklist

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the pipeline conventions in the contribution docs
  • Make sure your code lints (nf-core pipelines lint).
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
  • Check for unexpected warnings in debug mode (nextflow run . -profile debug,test,docker --outdir <OUTDIR>).
  • Usage Documentation in docs/usage.md is updated.
  • Output Documentation in docs/output.md is updated.
  • CHANGELOG.md is updated.
  • README.md is updated (including new tool citations and authors/contributors).

Addresses #127 (comment 4809238681): export_probabilities_per_mutation only
works with VCF input, so the COSMIC fit now reads the PASS VCF; the matrices
only gate which contexts are fitted. cosmic_fit ignores --volume, so the
genome volume is set through SIGPROFILER{MATRIXGENERATOR,ASSIGNMENT}_VOLUME.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
input_${ctx}/ \\
${prefix}/${ctx} \\
--input_type matrix \\
--input_type vcf \\

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No small test runs this script block. CI only runs the stub test, which just touches the output files. The pipeline tests set skip_signatures = true in both conf/test.config and conf/test_full.config. So none of the new behaviour is exercised:

  • --input_type vcf with --context_type 96|DINUC|ID
  • SigProfilerAssignment's internal matrix generation, which finds the genome only through SIGPROFILERMATRIXGENERATOR_VOLUME and needs tsb/${genome}. Only that one genome is linked into volume/. Check that the ID fit, whose signatures are GRCh37-based, doesn't try to load or install tsb/GRCh37 on a GRCh38 or CHM13-T2T run.
  • --export_probabilities_per_mutation True with the DBS78 and ID83 fits, not just SBS96.

Please run the Slurm test array (or a real signatures run on GRCh38 and on CHM13) and confirm that Decomposed_Mutation_Probabilities/ is filled in for every fitted context.

--cosmic_version ${cosmic_version} \\
--collapse_to_SBS96 ${collapse} \\
--volume spa_volume \\
--export_probabilities_per_mutation True \\

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing CHANGELOG.md entry. This PR adds a new published output (Decomposed_Mutation_Probabilities/) and switches the COSMIC fit from matrix input to VCF input, which can change the fitted activities. CHANGELOG.md has no entry for #221 under v1.2.0dev. REVIEW.md requires one.

@claude

claude Bot commented Oct 13, 2026

Copy link
Copy Markdown

Automated review: 2 findings (see inline comments).

To check by running: the Slurm test array or a real signatures run on GRCh38 and on CHM13-T2T. Confirm that cosmic_fit --input_type vcf finds the genome through SIGPROFILERMATRIXGENERATOR_VOLUME, that the ID83 fit doesn't need tsb/GRCh37, and that Decomposed_Mutation_Probabilities/ is written for each fitted context (SBS96, DBS78, ID83).

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

nf-core pipelines lint overall result: Passed ✅ ⚠️

Posted for pipeline commit e004e73

+| ✅ 232 tests passed       |+
#| ❔  22 tests were ignored |#
#| ❔   1 tests had warnings |#
!| ❗  45 tests had warnings |!
Details

❗ Test warnings:

  • nextflow_config - Config manifest.version should end in dev: 1.1.0
  • pipeline_todos - TODO string in nextflow.config: Specify your pipeline's command line flags
  • pipeline_todos - TODO string in nextflow.config: Update the field with the details of the contributors to your pipeline. New with Nextflow version 24.10.0
  • pipeline_todos - TODO string in README.md: Include a figure that guides the user through the major workflow steps. Many nf-core
  • pipeline_todos - TODO string in lint_log.txt: Named file extensions MUST be emitted for ALL output channels
  • pipeline_todos - TODO string in lint_log.txt: List additional required output channels/values here
  • pipeline_todos - TODO string in lint_log.txt: Named file extensions MUST be emitted for ALL output channels
  • pipeline_todos - TODO string in lint_log.txt: List additional required output channels/values here
  • pipeline_todos - TODO string in lint_log.txt: Named file extensions MUST be emitted for ALL output channels
  • pipeline_todos - TODO string in lint_log.txt: List additional required output channels/values here
  • pipeline_todos - TODO string in lint_log.txt: Named file extensions MUST be emitted for ALL output channels
  • pipeline_todos - TODO string in lint_log.txt: List additional required output channels/values here
  • pipeline_todos - TODO string in lint_log.txt: Named file extensions MUST be emitted for ALL output channels
  • pipeline_todos - TODO string in lint_log.txt: List additional required output channels/values here
  • pipeline_todos - TODO string in lint_log.txt: Named file extensions MUST be emitted for ALL output channels
  • pipeline_todos - TODO string in lint_log.txt: List additional required output channels/values here
  • pipeline_todos - TODO string in lint_log.txt: Named file extensions MUST be emitted for ALL output channels
  • pipeline_todos - TODO string in lint_log.txt: List additional required output channels/values here
  • pipeline_todos - TODO string in lint_log.txt: Named file extensions MUST be emitted for ALL output channels
  • pipeline_todos - TODO string in lint_log.txt: List additional required output channels/values here
  • pipeline_todos - TODO string in meta.yml: #Add a description of the module and list keywords
  • pipeline_todos - TODO string in methods_description_template.yml: #Update the HTML below to your preferred methods description, e.g. add publication citation for this pipeline
  • pipeline_todos - TODO string in nextflow.config: Specify any additional parameters here
  • pipeline_todos - TODO string in base.config: Check the defaults for all processes
  • pipeline_todos - TODO string in base.config: Customise requirements for specific processes.
  • pipeline_todos - TODO string in CONTRIBUTING.md: Add any pipeline specific contribution guidelines here, such as coding styles, procedures, checklists etc.
  • schema_description - Ungrouped param in schema: skip_modkit
  • schema_description - No description provided in schema for parameter: generate_gvcf
  • schema_description - No description provided in schema for parameter: autocorrelation
  • schema_description - No description provided in schema for parameter: vep_custom
  • schema_description - No description provided in schema for parameter: vep_custom_tbi
  • schema_description - No description provided in schema for parameter: severus_minsupport
  • schema_description - No description provided in schema for parameter: wakhan_chroms
  • local_component_structure - prepare_vep_plugins.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - ecdna.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - fiberseq.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - deepsomatic.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - small_variant_consensus.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - prepare_aa_data_repo.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - prepare_reference_files.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - prepare_annotation.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - prepare_signatures.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - reconplot_figures.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - phasing_haplotyping.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - padfoot_annotation.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure

❔ Tests ignored:

  • files_exist - File is ignored: CODE_OF_CONDUCT.md
  • files_exist - File is ignored: assets/nf-core-lrsomatic_logo_light.png
  • files_exist - File is ignored: docs/images/nf-core-lrsomatic_logo_light.png
  • files_exist - File is ignored: docs/images/nf-core-lrsomatic_logo_dark.png
  • files_exist - File is ignored: .github/ISSUE_TEMPLATE/config.yml
  • files_exist - File is ignored: .github/workflows/awstest.yml
  • files_exist - File is ignored: .github/workflows/awsfulltest.yml
  • files_exist - File is ignored: .github/CONTRIBUTING.md
  • nextflow_config - Config variable ignored: manifest.name
  • nextflow_config - Config variable ignored: manifest.homePage
  • nf_test_content - 'tests/sv_annotation_compose.nf.test' checking ignored
  • files_unchanged - File ignored due to lint config: CODE_OF_CONDUCT.md
  • files_unchanged - File ignored due to lint config: .github/ISSUE_TEMPLATE/bug_report.yml
  • files_unchanged - File ignored due to lint config: .github/PULL_REQUEST_TEMPLATE.md
  • files_unchanged - File ignored due to lint config: .github/workflows/branch.yml
  • files_unchanged - File ignored due to lint config: .github/workflows/linting.yml
  • files_unchanged - File ignored due to lint config: assets/email_template.txt
  • files_unchanged - File ignored due to lint config: assets/nf-core-lrsomatic_logo_light.png
  • files_unchanged - File ignored due to lint config: docs/images/nf-core-lrsomatic_logo_light.png
  • files_unchanged - File ignored due to lint config: docs/images/nf-core-lrsomatic_logo_dark.png
  • files_unchanged - File ignored due to lint config: docs/README.md
  • actions_awstest - 'awstest.yml' workflow not found: /home/runner/work/lrsomatic/lrsomatic/.github/workflows/awstest.yml

❔ Tests fixed:

✅ Tests passed:

Run details

  • nf-core/tools version 4.1.0
  • Run at 2026-10-13 14:23:42

…ities from seqinfo

VCF-mode cosmic_fit re-ran MatrixGenerator without the user's matrix args, so
--bed_file/--exome filtered the published matrices but not the fit, and each
context re-checksummed the genome. The fit reads the matrices again and the
per-mutation table comes from probabilities_per_mutation() on the
MatrixGenerator seqinfo, so the genome volume input is dropped.

- Reject --bed_file, --exome and --seqInfo False in --sigprofiler_matrix_args
- Add non-stub small nf-tests on synthetic matrices for GRCh38 and CHM13-T2T
- CHANGELOG entries and output/usage docs for the new output

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant