-
Notifications
You must be signed in to change notification settings - Fork 44
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
base: dev
Are you sure you want to change the base?
Conversation
|
There was a problem hiding this 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" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps
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()}" } |
There was a problem hiding this comment.
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/' |
There was a problem hiding this comment.
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.
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 |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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()}" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } |
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' |
There was a problem hiding this comment.
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
?
PR checklist
Renamed "test_one_sample" to "test_singleton"
Added tests for a few subworkflows.
nf-core pipelines lint
).nextflow run . -profile test,docker --outdir <OUTDIR>
).nextflow run . -profile test_one_sample,docker --outdir <OUTDIR>
).nextflow run . -profile debug,test,docker --outdir <OUTDIR>
).docs/usage.md
is updated.docs/output.md
is updated.CHANGELOG.md
is updated.README.md
is updated (including new tool citations and authors/contributors).