Skip to content

Commit

Permalink
remove params.outdir from modules and subworfklows tests (#5007)
Browse files Browse the repository at this point in the history
* remove params.outdir from modules and subworfklows tests

* update usage of params outdir

* update more tests

* Apply suggestions from code review

* Apply suggestions from code review

* update snap

* update snap

* update even more snaps

* remove obsolete snaps
  • Loading branch information
maxulysse authored Feb 28, 2024
1 parent dcfa9a1 commit 5caf764
Show file tree
Hide file tree
Showing 21 changed files with 205 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ nextflow_process {
params {
settings_path = '/tmp/.ncbi'
settings_file = "${params.settings_path}/user-settings.mkfg"
outdir = "$outputDir"
}

process {
Expand Down

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

Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ params.settings_file = "${params.settings_path}/user-settings.mkfg"
env.NCBI_SETTINGS = params.settings_file

process {

publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
withName: CUSTOM_SRATOOLSNCBISETTINGS {
containerOptions = {
(workflow.containerEngine == 'singularity') ?
Expand Down
10 changes: 10 additions & 0 deletions modules/nf-core/gatk4/genomicsdbimport/tests/main.nf.test.snap

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

20 changes: 18 additions & 2 deletions modules/nf-core/mtmalign/align/tests/main.nf.test.snap

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

8 changes: 0 additions & 8 deletions modules/nf-core/sratools/fasterqdump/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ nextflow_process {
}

when {
params {
outdir = "$outputDir"
}

process {
"""
input[0] = UNTAR.out.untar.map{ meta, files -> [ [ id:'test_single_end', single_end:true ], files]}
Expand Down Expand Up @@ -58,10 +54,6 @@ nextflow_process {
}

when {
params {
outdir = "$outputDir"
}

process {
"""
input[0] = UNTAR.out.untar.map{ meta, files -> [ [ id:'test_paired_end', single_end:false ], files]}
Expand Down
12 changes: 10 additions & 2 deletions modules/nf-core/sratools/fasterqdump/tests/main.nf.test.snap

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

6 changes: 0 additions & 6 deletions modules/nf-core/sratools/prefetch/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ nextflow_process {
test("sratools/prefetch") {

when {
params {
outdir = "output"
}
process {
"""
input[0] = Channel.of([ [ id:'test', single_end:false ], 'DRR000774' ])
Expand All @@ -33,9 +30,6 @@ nextflow_process {
test("sratools/prefetch with sralite") {

when {
params {
outdir = "output"
}
process {
"""
input[0] = Channel.of([ [ id:'test', single_end:false ], 'SRR1170046' ])
Expand Down
12 changes: 10 additions & 2 deletions modules/nf-core/sratools/prefetch/tests/main.nf.test.snap

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

62 changes: 49 additions & 13 deletions modules/nf-core/tcoffee/align/tests/main.nf.test.snap

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

8 changes: 0 additions & 8 deletions modules/nf-core/untar/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,12 @@ nextflow_process {
name "Test Process UNTAR"
script "../main.nf"
process "UNTAR"

tag "modules"
tag "modules_nfcore"
tag "untar"

test("test_untar") {

when {
params {
outdir = "$outputDir"
}
process {
"""
input[0] = [ [], file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/db/kraken2.tar.gz', checkIfExists: true) ]
Expand All @@ -33,9 +28,6 @@ nextflow_process {
test("test_untar_onlyfiles") {

when {
params {
outdir = "$outputDir"
}
process {
"""
input[0] = [ [], file(params.modules_testdata_base_path + 'generic/tar/hello.tar.gz', checkIfExists: true) ]
Expand Down
12 changes: 10 additions & 2 deletions modules/nf-core/untar/tests/main.nf.test.snap

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

Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ nextflow_workflow {
input[1] = []
"""
}
params {
outdir = "output"
}
}

then {
Expand Down
Loading

0 comments on commit 5caf764

Please sign in to comment.