nf-test
nf-test copied to clipboard
Setup file
Just a thought since these could get quite verbose. But now having second thoughts now that I'm seeing they're not pure "Nextflow".
test("Should use process ABRICATE_RUN to generate input data") {
setup "./setup.nf"
when {
process {
"""
input[0] = ABRICATE_RUN.out.report.collect{ meta, report -> report }.map{ report -> [[ id: 'test_summary'], report]}
"""
}
}
// ...
setup.nf
setup {
run("ABRICATE_RUN") {
script "../../run/main.nf"
process {
"""
input[0] = Channel.fromList([
tuple([ id:'test1', single_end:false ], // meta map
file(params.test_data['bacteroides_fragilis']['genome']['genome_fna_gz'], checkIfExists: true)),
tuple([ id:'test2', single_end:false ],
file(params.test_data['haemophilus_influenzae']['genome']['genome_fna_gz'], checkIfExists: true))
])
"""
}
}
}