Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
17 changes: 4 additions & 13 deletions modules/nf-core/adapterremoval/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ process ADAPTERREMOVAL {
tuple val(meta), path("${prefix}.collapsed.truncated.fastq.gz"), emit: collapsed_truncated, optional: true
tuple val(meta), path("${prefix}.paired.fastq.gz") , emit: paired_interleaved , optional: true
tuple val(meta), path('*.settings') , emit: settings
path "versions.yml" , emit: versions
tuple val("${task.process}"), val('adapterremoval'), eval('AdapterRemoval --version 2>&1 | sed -e "s/.* //g"'), emit: versions_adapterremoval, topic: versions

when:
task.ext.when == null || task.ext.when
Expand Down Expand Up @@ -50,10 +50,7 @@ process ADAPTERREMOVAL {
ensure_fastq '${prefix}.truncated.gz'
ensure_fastq '${prefix}.discarded.gz'

cat <<-END_VERSIONS > versions.yml
"${task.process}":
adapterremoval: \$(AdapterRemoval --version 2>&1 | sed -e "s/AdapterRemoval ver. //g")
END_VERSIONS

"""
} else {
"""
Expand Down Expand Up @@ -82,10 +79,7 @@ process ADAPTERREMOVAL {
ensure_fastq '${prefix}.collapsed.truncated.gz'
ensure_fastq '${prefix}.paired.gz'

cat <<-END_VERSIONS > versions.yml
"${task.process}":
adapterremoval: \$(AdapterRemoval --version 2>&1 | sed -e "s/AdapterRemoval ver. //g")
END_VERSIONS

"""
}

Expand All @@ -110,9 +104,6 @@ process ADAPTERREMOVAL {
fi
fi

cat <<-END_VERSIONS > versions.yml
"${task.process}":
adapterremoval: \$(AdapterRemoval --version 2>&1 | sed -e "s/AdapterRemoval ver. //g")
END_VERSIONS

"""
}
26 changes: 20 additions & 6 deletions modules/nf-core/adapterremoval/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,27 @@ output:
pattern: "*.settings"
ontologies:
- edam: "http://edamontology.org/format_2330" # Textual format
versions_adapterremoval:
- - ${task.process}:
type: string
description: The process the versions were collected from
- adapterremoval:
type: string
description: The tool name
- AdapterRemoval --version 2>&1 | sed "s/ ver. //g":
type: eval
description: The expression to obtain the version of adapterremoval
topics:
versions:
- versions.yml:
type: file
description: File containing software versions
pattern: "versions.yml"
ontologies:
- edam: "http://edamontology.org/format_3750" # YAML
- - ${task.process}:
type: string
description: The process the versions were collected from
- adapterremoval:
type: string
description: The tool name
- AdapterRemoval --version 2>&1 | sed "s/.* //g":
type: eval
description: The expression to obtain the version of adapterremoval
authors:
- "@maxibor"
- "@jfy133"
Expand Down
27 changes: 7 additions & 20 deletions modules/nf-core/adapterremoval/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ nextflow_process {
assertAll(
{ assert process.success },
{ assert snapshot(
process.out.singles_truncated,
process.out.settings,
process.out.versions
process.out
).match() },
)
}
Expand Down Expand Up @@ -61,9 +59,7 @@ nextflow_process {
assertAll(
{ assert process.success },
{ assert snapshot(
process.out.paired_truncated,
process.out.settings,
process.out.versions
process.out
).match() }
)
}
Expand Down Expand Up @@ -92,11 +88,7 @@ nextflow_process {
assertAll(
{ assert process.success },
{ assert snapshot(
process.out.paired_truncated,
process.out.collapsed,
file(process.out.collapsed_truncated[0][1]).name, // Check for present but is empty
process.out.settings,
process.out.versions
process.out
).match() }
)
}
Expand Down Expand Up @@ -126,9 +118,7 @@ nextflow_process {
assertAll(
{ assert process.success },
{ assert snapshot(
process.out.paired_truncated,
process.out.settings,
process.out.versions
process.out
).match() }
)
}
Expand Down Expand Up @@ -158,8 +148,7 @@ nextflow_process {
assertAll(
{ assert process.success },
{ assert snapshot(
process.out,
path(process.out.versions[0]).yaml
process.out
).match() }
)
}
Expand All @@ -186,8 +175,7 @@ nextflow_process {
assertAll(
{ assert process.success },
{ assert snapshot(
process.out,
path(process.out.versions[0]).yaml
process.out
).match() }
)
}
Expand Down Expand Up @@ -217,8 +205,7 @@ nextflow_process {
assertAll(
{ assert process.success },
{ assert snapshot(
process.out,
path(process.out.versions[0]).yaml
process.out
).match() }
)
}
Expand Down
Loading
Loading