Skip to content

canvas/germline: Added tests and missing inputs, some cleanup - #12462

Open
Schmytzi wants to merge 17 commits into
nf-core:masterfrom
Schmytzi:canvas_cleanup
Open

canvas/germline: Added tests and missing inputs, some cleanup#12462
Schmytzi wants to merge 17 commits into
nf-core:masterfrom
Schmytzi:canvas_cleanup

Conversation

@Schmytzi

@Schmytzi Schmytzi commented Jul 29, 2026

Copy link
Copy Markdown
Contributor
  • Added missing inputs and tests.
  • Replaced genomedir input with separate kmer_fasta and genomesize inputs
  • Removed automatic selection of ploidy VCF based on sex, now responsibility of the caller
  • Removed dependency on external python script
  • Replaced file operations on inputs with stageAs
  • Added check that at least one SNV VCF is supplied
  • Removed automatic filtering of REF calls, now responsibility of the caller
  • Replaced hard-coded version with call to Canvas --version
  • Skipping CI tests because of hard-coded request for 8 CPUs and 25 GB of RAM

Requires nf-core/test-datasets#2188 to be merged first.

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 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

@Schmytzi
Schmytzi marked this pull request as ready for review August 6, 2026 09:15
@Schmytzi
Schmytzi requested review from a team as code owners August 6, 2026 09:15
@maxulysse

Copy link
Copy Markdown
Member

I don't like that no tests at all are run for this module

@erikrikarddaniel erikrikarddaniel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

Comment thread modules/nf-core/canvas/germline/main.nf
Comment thread modules/nf-core/canvas/germline/environment.yml
-o ./
--bam ${bam} \\
--genome-folder ./Sequence/WholeGenomeFasta \\
--reference ${kmer_fasta} \\

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.

I am a little confused by this one, but I don't know the tool. If I understand the input logic correctly, than the only file in the genome-folder is the kmer-fasta. Why do you need to point to it twice? From the doc it sounds like these might be different files: ```
-r, --reference=VALUE Canvas-ready reference fasta file (required)
-g, --genome-folder=VALUE folder that contains both genome.fa and
GenomeSize.xml (required)

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.

Canvas doesn't actually use the genome.fa file that is in the genome folder, it only reads GenomeSize.xml and uses the masked FASTA as its reference. I assume the parameters are the way they are for consistency with other Illumina tools. The module even works the same if kmer_fasta is not staged as Sequence/WholeGenomeFasta/genome.fa, so maybe it would be more straightforward to not to that?

Comment thread modules/nf-core/canvas/germline/meta.yml Outdated
Comment thread modules/nf-core/canvas/germline/meta.yml Outdated
Comment thread modules/nf-core/canvas/germline/meta.yml Outdated
Comment thread modules/nf-core/canvas/germline/meta.yml Outdated
Comment thread modules/nf-core/canvas/germline/meta.yml Outdated
Comment thread modules/nf-core/canvas/germline/meta.yml Outdated
Comment thread modules/nf-core/canvas/germline/tests/main.nf.test Outdated
Comment thread modules/nf-core/canvas/germline/main.nf Outdated
Comment thread modules/nf-core/canvas/germline/tests/nextflow.config Outdated
Comment thread modules/nf-core/canvas/germline/main.nf Outdated
Comment thread .github/skip_nf_test.json Outdated
{
"id": "NA12878"
},
"NA12878.CoverageAndVariantFrequency.txt:md5,7a0bf126ad613632eabcc2d5b20034c5"

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.

it looks like all test scenarios end up with exactly the same output. Is this intended? Could you check that there are no mix up of files in the module?

@Schmytzi Schmytzi Aug 13, 2026

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.

Canvas emits a single REF call for the region, which I would expect here regardless of optional input files. So I think that should be fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants