Skip to content

Add the finaletoolkit/delfi module#11547

Open
lbeltrame wants to merge 11 commits into
nf-core:masterfrom
DIncalciLab:finale-toolkit-delfi
Open

Add the finaletoolkit/delfi module#11547
lbeltrame wants to merge 11 commits into
nf-core:masterfrom
DIncalciLab:finale-toolkit-delfi

Conversation

@lbeltrame
Copy link
Copy Markdown
Contributor

@lbeltrame lbeltrame commented May 7, 2026

PR checklist

This PR introduces support for the delfi subcommand in finaletoolkit, which calculates the DELFI score, a popular measure used in fragmentomics introduced in Cristiano et al., 2019.

References #11365

  • 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 module conventions in the contribution docs
  • If necessary, include test data in your PR.
  • Remove all TODO statements.
  • Broadcast software version numbers to topic: versions - See version_topics
  • Follow the naming conventions.
  • Follow the parameters requirements.
  • Follow the input/output options guidelines.
  • Add a resource label
  • Use BioConda and BioContainers if possible to fulfil software requirements.
  • Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky:
    • For modules:
      • nf-core modules test <MODULE> --profile docker
      • nf-core modules test <MODULE> --profile singularity
      • nf-core modules test <MODULE> --profile conda
    • For subworkflows:
      • nf-core subworkflows test <SUBWORKFLOW> --profile docker
      • nf-core subworkflows test <SUBWORKFLOW> --profile singularity
      • nf-core subworkflows test <SUBWORKFLOW> --profile conda

lbeltrame added 2 commits May 6, 2026 14:42
This uses FinaleToolkit to calculate the DELFI score (Cristiano et al.,
2019).

cf. nf-core#11365
@lbeltrame lbeltrame self-assigned this May 7, 2026
Comment thread modules/nf-core/finaletoolkit/delfi/tests/main.nf.test Outdated
Comment thread modules/nf-core/finaletoolkit/delfi/tests/main.nf.test
Comment thread modules/nf-core/finaletoolkit/delfi/tests/main.nf.test Outdated
Comment thread modules/nf-core/finaletoolkit/delfi/main.nf Outdated
@lbeltrame
Copy link
Copy Markdown
Contributor Author

lbeltrame commented May 8, 2026

@SPPearce I should've handled it but I need to check the tests here, locally they fail probably because my Nextflow version is too old (error in an unrelated module).

EDIT: tests are green.

Comment on lines +28 to +29
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.2bit', checkIfExists: true)
,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.2bit', checkIfExists: true)
,
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.2bit', checkIfExists: true),

Comment on lines +73 to +74
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.2bit', checkIfExists: true)
,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.2bit', checkIfExists: true)
,
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.2bit', checkIfExists: true),

assertAll(
{ assert snapshot(
process.out,
process.out.findAll { key, val -> key.startsWith("versions") }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Don't need this if you are capturing process.out in its entirety.

assertAll(
{ assert snapshot(
process.out,
process.out.findAll { key, val -> key.startsWith("versions") }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
process.out.findAll { key, val -> key.startsWith("versions") }

Comment on lines +46 to +49
{ assert snapshot(
process.out,
process.out.findAll { key, val -> key.startsWith("versions") }
).match() }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
{ assert snapshot(
process.out,
process.out.findAll { key, val -> key.startsWith("versions") }
).match() }
{ assert snapshot(sanitizeOutput(process.out)).match() }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also applies to the stub.

Comment on lines +4 to +6
- sort
- genomics
- fragmentomics
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please update.

Comment on lines +23 to +28
- bam:
type: file
description: Sorted BAM file
pattern: "*.bam"
ontologies:
- edam: "http://edamontology.org/format_2572"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does this work with cram files?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Honestly I'm not sure. I'll check the code directly, but it looks like it wants BAM. I'll investigate.

@lbeltrame
Copy link
Copy Markdown
Contributor Author

Many thanks @SPPearce for the review. Most of these show why copy-pasting is bad. ;)
I'll get to these shortly.

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.

2 participants