Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/nf-core/cat/cat/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ channels:
- conda-forge
- bioconda
dependencies:
- conda-forge::pigz=2.3.4
- conda-forge::pigz=2.8
6 changes: 3 additions & 3 deletions modules/nf-core/cat/cat/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ process CAT_CAT {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/pigz:2.3.4' :
'biocontainers/pigz:2.3.4' }"
'https://depot.galaxyproject.org/singularity/pigz:2.8' :
'biocontainers/pigz:2.8' }"

input:
tuple val(meta), path(files_in)

output:
tuple val(meta), path("${prefix}"), emit: file_out
path "versions.yml" , emit: versions
tuple val("${task.process}"), val("pigz"), eval("pigz --version 2>&1 | sed 's/pigz //g'"), topic: versions, emit: versions_cat

when:
task.ext.when == null || task.ext.when
Expand Down
85 changes: 43 additions & 42 deletions modules/nf-core/cat/cat/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@ nextflow_process {
name "Test Process CAT_CAT"
script "../main.nf"
process "CAT_CAT"

tag "modules"
tag "modules_nfcore"
tag "cat"
tag "cat/cat"

test("test_cat_name_conflict") {
test("sarscov2 - genome - name conflict") {
when {
params {
outdir = "${outputDir}"
}
process {
"""
input[0] =
Expand All @@ -30,16 +28,13 @@ nextflow_process {
assertAll(
{ assert !process.success },
{ assert process.stdout.toString().contains("The name of the input file can't be the same as for the output prefix") },
{ assert snapshot(process.out.versions).match() }
{ assert snapshot(process.out).match() }
)
}
}

test("test_cat_unzipped_unzipped") {
test("sarscov2 - [ fasta, sizes ] - unzipped") {
when {
params {
outdir = "${outputDir}"
}
process {
"""
input[0] =
Expand All @@ -62,11 +57,8 @@ nextflow_process {
}


test("test_cat_zipped_zipped") {
test("sarscov2 - [ gff3_gz, maf_gz ] - zipped") {
when {
params {
outdir = "${outputDir}"
}
process {
"""
input[0] =
Expand All @@ -81,25 +73,20 @@ nextflow_process {
}
}
then {
def lines = path(process.out.file_out.get(0).get(1)).linesGzip
assertAll(
{ assert process.success },
{ assert snapshot(
lines[0..5],
lines.size(),
process.out.versions
).match()
{ assert snapshot(process.out).match()
}
)
}
}

test("test_cat_zipped_unzipped") {
config './nextflow_zipped_unzipped.config'
test("sarscov2 - [ gff3_gz, maf_gz ] - unzipped") {
config './nextflow.config'

when {
params {
outdir = "${outputDir}"
cat_prefix = "cat.txt"
}
process {
"""
Expand All @@ -124,11 +111,12 @@ nextflow_process {

}

test("test_cat_unzipped_zipped") {
config './nextflow_unzipped_zipped.config'
test("sarscov2 - [ fasta, sizes ] - zipped") {
config './nextflow.config'

when {
params {
outdir = "${outputDir}"
cat_prefix = "cat.txt.gz"
}
process {
"""
Expand All @@ -144,24 +132,19 @@ nextflow_process {
}
}
then {
def lines = path(process.out.file_out.get(0).get(1)).linesGzip
assertAll(
{ assert process.success },
{ assert snapshot(
lines[0..5],
lines.size(),
process.out.versions
).match()
}
{ assert snapshot(process.out).match() }
)
}
}

test("test_cat_one_file_unzipped_zipped") {
config './nextflow_unzipped_zipped.config'
test("sarscov2 - fasta - zipped") {
config './nextflow.config'

when {
params {
outdir = "${outputDir}"
cat_prefix = "cat.txt.gz"
}
process {
"""
Expand All @@ -176,15 +159,33 @@ nextflow_process {
}
}
then {
def lines = path(process.out.file_out.get(0).get(1)).linesGzip
assertAll(
{ assert process.success },
{ assert snapshot(
lines[0..5],
lines.size(),
process.out.versions
).match()
}
{ assert snapshot(process.out).match() }
)
}
}

test("sarscov2 - fasta - unzipped - stub") {
options "-stub"

when {
process {
"""
input[0] =
[
[ id:'test', single_end:true ],
[
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
]
]
"""
}
}
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
)
}
}
Expand Down
Loading
Loading