Skip to content

Commit

Permalink
update data path for modules custom/tx2gene (nf-core#4991)
Browse files Browse the repository at this point in the history
* actually test versions

* update data path

* fix tests
  • Loading branch information
maxulysse authored Feb 26, 2024
1 parent 5908e57 commit ec15502
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 42 deletions.
41 changes: 19 additions & 22 deletions modules/nf-core/custom/tx2gene/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -16,69 +16,66 @@ nextflow_process {
script "../../../untar/main.nf"
process {
"""
input[0] = [
[ id:'test'], // meta map
file(params.test_data['saccharomyces_cerevisiae']['genome']['kallisto_results'], checkIfExists: true)
]
input[0] = Channel.of([
[ id:'test'], // meta map
file(params.modules_testdata_base_path + 'genomics/eukaryotes/saccharomyces_cerevisiae/kallisto_results.tar.gz', checkIfExists: true)
])
"""
}
}
}

test("saccharomyces_cerevisiae - gtf") {

when {
process {
"""
input[0] = [
[ id:'test'], // meta map
file(params.test_data['saccharomyces_cerevisiae']['genome']['genome_gfp_gtf'], checkIfExists: true)
]
input[0] = Channel.of([
[ id:'test'], // meta map
file(params.modules_testdata_base_path + 'genomics/eukaryotes/saccharomyces_cerevisiae/genome_gfp.gtf', checkIfExists: true)
])
input[1] = UNTAR.out.untar.map { meta, dir -> [ meta, dir.listFiles().collect() ] }
input[2] = 'kallisto'
input[3] = 'gene_id'
input[3] = 'gene_id'
input[4] = 'gene_name'
"""
}
}


then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out.tx2gene).match('tx2gene') },
{ assert snapshot(process.out.tx2gene).match('versions') }
{ assert snapshot(process.out.versions).match('versions') }
)
}

}

test("saccharomyces_cerevisiae - gtf - stub") {

options "-stub"
options "-stub"

when {
process {
"""
input[0] = [
input[0] = Channel.of([
[ id:'test'], // meta map
file(params.test_data['saccharomyces_cerevisiae']['genome']['genome_gfp_gtf'], checkIfExists: true)
]
file(params.modules_testdata_base_path + 'genomics/eukaryotes/saccharomyces_cerevisiae/genome_gfp.gtf', checkIfExists: true)
])
input[1] = UNTAR.out.untar.map { meta, dir -> [ meta, dir.listFiles().collect() ] }
input[2] = 'kallisto'
input[3] = 'gene_id'
input[3] = 'gene_id'
input[4] = 'gene_name'
"""
}
}


then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out.tx2gene).match('tx2gene - stub') },
{ assert snapshot(process.out.tx2gene).match('versions - stub') }
{ assert snapshot(process.out.versions).match('versions - stub') }
)
}
}
}
}
30 changes: 10 additions & 20 deletions modules/nf-core/custom/tx2gene/tests/main.nf.test.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ec15502

Please sign in to comment.