modules icon indicating copy to clipboard operation
modules copied to clipboard

feat: support no reference tumor only cnvkit analysis

Open znorgaard opened this issue 7 months ago • 3 comments

[!NOTE] The failing tests on this PR are only occurring with nextflow=24.10.2 for a single stub test and are due to a known nextflow bug, https://github.com/nextflow-io/nextflow/issues/5456

The cnvkit/batch module will now support the recommended mode for running tumor only samples without a reference.cnn file.

From the docs:

If you have no normal samples to use for the reference, you can create a “flat” reference which assumes equal coverage in all bins by using the --normal/-n flag without specifying any additional BAM files:

https://cnvkit.readthedocs.io/en/stable/quickstart.html

PR checklist

  • [X] This comment contains a description of changes (with reason).
  • [X] If you've fixed a bug or added code that should be tested, add tests!
  • Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky:
    • For modules:
      • [x] nf-core modules test <MODULE> --profile docker
      • [x] nf-core modules test <MODULE> --profile singularity
      • [x] nf-core modules test <MODULE> --profile conda

znorgaard avatar Jun 09 '25 23:06 znorgaard

The stub test is failing because there is no stub here, can you please add one.

That's not actually why it's failing. In the absence of a stub the script block is executed. This is specifically a bug in nextflow=24.10.2, https://github.com/nextflow-io/nextflow/issues/5456. You can prove this to yourself locally.

  1. Environment set up with mamba/conda
mamba create -n nf-core-nextflow25 nf-core nextflow=25.04.2
mamba create -n nf-core-nextflow24 nf-core nextflow=24.10.2
  1. Get to the master modules branch
cd modules
git checkout master
git pull
  1. Run tests with nextflow 24.20.2 and 25.04.2
mamba activate nf-core-nextflow25
nf-test test modules/nf-core/cnvkit/batch/tests --profile docker

SUCCESS: Executed 9 tests in 118.892s

mamba deactivate
mamba activate nf-core-nextflow24
nf-test test modules/nf-core/cnvkit/batch/tests --profile docker

FAILURE: Executed 9 tests in 114.519s (1 failed)

If you look at the failed actions they're specifically the ones for nextflow=24.20.2. The actions using latest everything pass.

That said, I'm happy to add a stub for this.

znorgaard avatar Jun 16 '25 16:06 znorgaard

The stub test is failing because there is no stub here, can you please add one.

That's not actually why it's failing. In the absence of a stub the script block is executed. This is specifically a bug in nextflow=24.10.2, nextflow-io/nextflow#5456. You can prove this to yourself locally.

  1. Environment set up with mamba/conda
mamba create -n nf-core-nextflow25 nf-core nextflow=25.04.2
mamba create -n nf-core-nextflow24 nf-core nextflow=24.10.2
  1. Get to the master modules branch
cd modules
git checkout master
git pull
  1. Run tests with nextflow 24.20.2 and 25.04.2
mamba activate nf-core-nextflow25
nf-test test modules/nf-core/cnvkit/batch/tests --profile docker

SUCCESS: Executed 9 tests in 118.892s

mamba deactivate
mamba activate nf-core-nextflow24
nf-test test modules/nf-core/cnvkit/batch/tests --profile docker

FAILURE: Executed 9 tests in 114.519s (1 failed)

If you look at the failed actions they're specifically the ones for nextflow=24.20.2. The actions using latest everything pass.

That said, I'm happy to add a stub for this.

Yes, that might be the case, but it will be fixed if you add a stub.

SPPearce avatar Jun 16 '25 16:06 SPPearce

@znorgaard , please note that the module version has been updated in the meantime.

SPPearce avatar Jun 25 '25 07:06 SPPearce