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
14 changes: 1 addition & 13 deletions modules/nf-core/annosine/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@ process ANNOSINE {
output:
tuple val(meta), path("${prefix}.log"), emit: log
tuple val(meta), path("${prefix}.fa") , emit: fa, optional: true
path "versions.yml" , emit: versions
tuple val("${task.process}"), val('annosine'), eval('pip show annosine2 | grep "^Version" | sed "s/Version: //"'), emit: versions_annosine, topic: versions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be able to simplify it by:

Suggested change
tuple val("${task.process}"), val('annosine'), eval('pip show annosine2 | grep "^Version" | sed "s/Version: //"'), emit: versions_annosine, topic: versions
tuple val("${task.process}"), val('annosine'), eval('pip show annosine2 | sed -n "s/Version: //p"'), emit: versions_annosine, topic: versions


when:
task.ext.when == null || task.ext.when

script:
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}_annosine"
def VERSION = '2.0.8' // WARN: Manually update when changing Bioconda assets
if ( "${fasta}" == "${prefix}.fa" ) error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!"
"""
AnnoSINE_v2 \\
Expand All @@ -38,24 +37,13 @@ process ANNOSINE {
${prefix}/Seed_SINE.fa \\
${prefix}.fa \\
|| echo 'AnnoSINE_v2 did not find SINE sequences. See log for details!'

cat <<-END_VERSIONS > versions.yml
"${task.process}":
annosine: ${VERSION}
END_VERSIONS
"""

stub:
prefix = task.ext.prefix ?: "${meta.id}_annosine"
def VERSION = '2.0.8' // WARN: Manually update when changing Bioconda assets
if ( "${fasta}" == "${prefix}.fa" ) error "Input and output names are the same, use \"task.ext.prefix\" to disambiguate!"
"""
touch ${prefix}.log
touch ${prefix}.fa

cat <<-END_VERSIONS > versions.yml
"${task.process}":
annosine: ${VERSION}
END_VERSIONS
"""
}
33 changes: 23 additions & 10 deletions modules/nf-core/annosine/meta.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json
name: "annosine"
description: Accelerating de novo SINE annotation in plant and animal genomes
keywords:
Expand All @@ -13,9 +12,9 @@ tools:
documentation: "https://github.com/liaoherui/AnnoSINE_v2"
tool_dev_url: "https://github.com/liaoherui/AnnoSINE_v2"
doi: "10.1101/2024.03.01.582874"
licence: ["MIT"]
licence:
- "MIT"
identifier: biotools:annosine

input:
- - meta:
type: map
Expand All @@ -27,7 +26,7 @@ input:
description: Input genome assembly
pattern: "*.{fasta,fa,fsa}"
ontologies:
- edam: http://edamontology.org/format_1929 # FASTA
- edam: http://edamontology.org/format_1929 #FASTA
- mode:
type: integer
description: |
Expand Down Expand Up @@ -59,13 +58,27 @@ output:
description: |
Non-redundant SINE library with serial number
pattern: "*.{fa}"
versions_annosine:
- - "${task.process}":
type: string
description: The name of the process
- "annosine":
type: string
description: The name of the tool
- 'pip show annosine2 | grep "^Version" | sed "s/Version: //"':
type: eval
description: The expression to obtain the version of the tool
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 name of the process
- "annosine":
type: string
description: The name of the tool
- 'pip show annosine2 | grep "^Version" | sed "s/Version: //"':
type: eval
description: The expression to obtain the version of the tool
authors:
- "@GallVp"
maintainers:
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-core/annosine/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ nextflow_process {
{ assert path(process.out.log[0][1]).text.contains('AnnoSINE COMPLETE!') },
{ assert snapshot(
process.out.fa,
process.out.versions,
process.out.findAll { key, val -> key.startsWith('versions') },
).match()
}
)
Expand Down
42 changes: 28 additions & 14 deletions modules/nf-core/annosine/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,21 @@
"test_annosine.fa:md5,fc3bd39555133a1b50623bccc7d4cf9b"
]
],
[
"versions.yml:md5,b07e03bcf541df634bf5c47cbad4bd2f"
]
{
"versions_annosine": [
[
"ANNOSINE",
"annosine",
"2.0.8"
]
]
}
],
"timestamp": "2026-03-13T09:45:27.322794252",
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.5"
},
"timestamp": "2025-03-27T14:41:54.821745"
"nf-test": "0.9.4",
"nextflow": "25.10.4"
}
},
"actinidia_chinensis - fasta - stub": {
"content": [
Expand All @@ -42,7 +48,11 @@
]
],
"2": [
"versions.yml:md5,b07e03bcf541df634bf5c47cbad4bd2f"
[
"ANNOSINE",
"annosine",
"2.0.8"
]
],
"fa": [
[
Expand All @@ -62,15 +72,19 @@
"test_annosine.log:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,b07e03bcf541df634bf5c47cbad4bd2f"
"versions_annosine": [
[
"ANNOSINE",
"annosine",
"2.0.8"
]
]
}
],
"timestamp": "2026-03-13T09:46:04.662034254",
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.5"
},
"timestamp": "2025-03-27T14:40:02.826271"
"nf-test": "0.9.4",
"nextflow": "25.10.4"
}
}
}
Loading