8000 nf-test for subworkflows - I by ramprasadn · Pull Request #695 · nf-core/raredisease · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

nf-test for subworkflows - I #695

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 20 commits into
base: dev
Choose a base branch
from
Open

nf-test for subworkflows - I #695

wants to merge 20 commits into from

Conversation

ramprasadn
Copy link
Collaborator
@ramprasadn ramprasadn commented Apr 9, 2025

PR checklist

Renamed "test_one_sample" to "test_singleton"
Added tests for a few subworkflows.

Note: I have not updated the CI to run nf-tests and those changes will come along with the next template update.

  • 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
  • If necessary, also make a PR on the nf-core/raredisease branch on the nf-core/test-datasets repository.
  • Make sure your code lints (nf-core pipelines lint).
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
  • Ensure the test suite passes (nextflow run . -profile test_one_sample,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).

Copy link
github-actions bot commented Apr 9, 2025

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

Posted for pipeline commit 67e4226

+| ✅ 202 tests passed       |+
#| ❔   7 tests were ignored |#
!| ❗  17 tests had warnings |!

❗ Test warnings:

  • schema_lint - Input mimetype is missing or empty
  • local_component_structure - call_repeat_expansions.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - qc_bam.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - annotate_mt_snvs.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - call_structural_variants.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - annotate_structural_variants.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - rank_variants.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - gens.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - generate_cytosure_files.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - annotate_mobile_elements.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - call_snv.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - variant_evaluation.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - subsample_mt.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - annotate_consequence_pli.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - generate_clinical_set.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - annotate_genome_snvs.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure
  • local_component_structure - call_mobile_elements.nf in subworkflows/local should be moved to a SUBWORKFLOW_NAME/main.nf structure

❔ Tests ignored:

  • files_exist - File is ignored: conf/modules.config
  • files_unchanged - File ignored due to lint config: .github/CONTRIBUTING.md
  • files_unchanged - File ignored due to lint config: .github/PULL_REQUEST_TEMPLATE.md
  • files_unchanged - File ignored due to lint config: assets/nf-core-raredisease_logo_light.png
  • files_unchanged - File ignored due to lint config: docs/images/nf-core-raredisease_logo_light.png
  • files_unchanged - File ignored due to lint config: docs/images/nf-core-raredisease_logo_dark.png
  • modules_config - modules_config

✅ Tests passed:

Run details

  • nf-core/tools version 3.2.1
  • Run at 2025-05-23 15:28:04

@ramprasadn ramprasadn marked this pull request as ready for review April 14, 2025 12:36
Copy link
Contributor
@fellen31 fellen31 left a comment

Choose a reason for hiding this comment

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

Nice! Consider adding a stub test to each workflow if you think it's worth it.

nf-test.config Outdated

// Include plugins
plugins {
load "nft-bam@0.4.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps

Suggested change
load "nft-bam@0.4.0"
load "nft-bam@0.6.0"

@@ -0,0 +1,125 @@
process {

publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you need this line?

params {
aligner = 'bwamem2'
mt_aligner = 'bwamem2'
testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/raredisease/'
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider to set this in test.config, then using configFile "conf/test.config" in nf-test.config to skip this line for all tests.

Comment on lines +197 to +200
workflow.out.genome_bam_bai.collect { meta, bamfile, index -> [ meta, bam(bamfile).getHeaderMD5(), index ] },
workflow.out.mt_bam_bai.collect { meta, bamfile, index -> [ meta, bam(bamfile).getReadsMD5(), index ] },
workflow.out.mtshift_bam_bai.collect { meta, bamfile, index -> [ meta, bam(bamfile).getReadsMD5(), index ] },
workflow.out.versions
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

"""
input[0] = Channel.of([
[id:'mt'],
file('https://raw.githubusercontent.com/nf-core/test-datasets/raredisease/reference/reference_mt.fa', checkIfExists: true)
Copy link
Contributor

Choose a reason for hiding this comment

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

Think you could use testdata_base_path in the setups if you set in it the config.

@@ -0,0 +1,39 @@
process {

publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }

Comment on lines 12 to 15
testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/raredisease/reference/'
fasta = params.testdata_base_path + 'reference.fasta'
fai = params.testdata_base_path + 'reference.fasta.fai'
dict = params.testdata_base_path + 'reference.dict'
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you not need to set params.scatter_count?

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
0