Skip to content
Draft
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
16 changes: 3 additions & 13 deletions modules/nf-core/repeatmodeler/builddatabase/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ process REPEATMODELER_BUILDDATABASE {

output:
tuple val(meta), path("${prefix}.*") , emit: db
path "versions.yml" , emit: versions
tuple val("${task.process}"), val('repeatmodeler'), eval("RepeatModeler --version 2>&1 | sed 's/RepeatModeler version //'") , emit: versions_repeatmodeler, topic: versions

when:
task.ext.when == null || task.ext.when
Expand All @@ -21,13 +21,8 @@ process REPEATMODELER_BUILDDATABASE {
prefix = task.ext.prefix ?: "${meta.id}"
"""
BuildDatabase \\
-name $prefix \\
$fasta

cat <<-END_VERSIONS > versions.yml
"${task.process}":
repeatmodeler: \$(RepeatModeler --version | sed 's/RepeatModeler version //')
END_VERSIONS
-name ${prefix} \\
${fasta}
"""

stub:
Expand All @@ -41,10 +36,5 @@ process REPEATMODELER_BUILDDATABASE {
touch ${prefix}.nog
touch ${prefix}.nsq
touch ${prefix}.translation

cat <<-END_VERSIONS > versions.yml
"${task.process}":
repeatmodeler: \$(RepeatModeler --version | sed 's/RepeatModeler version //')
END_VERSIONS
"""
}
35 changes: 25 additions & 10 deletions modules/nf-core/repeatmodeler/builddatabase/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: "repeatmodeler_builddatabase"
description: Create a database for RepeatModeler
keywords:
Expand All @@ -7,12 +6,12 @@ keywords:
- repeat
tools:
- "repeatmodeler":
description: "RepeatModeler is a de-novo repeat family identification and modeling
package."
description: "RepeatModeler is a de-novo repeat family identification and modeling package."
homepage: "https://github.com/Dfam-consortium/RepeatModeler"
documentation: "https://github.com/Dfam-consortium/RepeatModeler"
tool_dev_url: "https://github.com/Dfam-consortium/RepeatModeler"
licence: ["Open Software License v2.1"]
licence:
- "Open Software License v2.1"
identifier: biotools:repeatmodeler

input:
Expand All @@ -38,13 +37,29 @@ output:
description: Database files for repeatmodeler
pattern: "`${prefix}.*`"
ontologies: []
versions_repeatmodeler:
- - ${task.process}:
type: string
description: The name of the process
- repeatmodeler:
type: string
description: The name of the tool
- RepeatModeler --version 2>&1 | sed 's/RepeatModeler 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
- repeatmodeler:
type: string
description: The name of the tool
- RepeatModeler --version 2>&1 | sed 's/RepeatModeler version //':
type: eval
description: The expression to obtain the version of the tool

authors:
- "@GallVp"
maintainers:
Expand Down
13 changes: 7 additions & 6 deletions modules/nf-core/repeatmodeler/builddatabase/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ nextflow_process {
}

then {
assert process.success
assertAll(
{ assert process.success },
{ assert snapshot(process.out.versions).match("versions") },
{ assert snapshot(process.out.db[0][1].collect { file(it).name }.sort().toString()).match("db") },
{ assert snapshot(process.out.db[0][1].findAll { ! ( "$it"[-3..-1] in [ 'nin', 'njs' ] ) } ).match("stable_md5") }
{ assert snapshot(
sanitizeOutput(process.out, unstableKeys: ['db']),
process.out.db[0][1].findAll { ! ( "$it"[-3..-1] in [ 'nin', 'njs' ] ) }
).match() }
)
}

Expand All @@ -49,9 +50,9 @@ nextflow_process {
}

then {
assert process.success
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}

Expand Down
88 changes: 38 additions & 50 deletions modules/nf-core/repeatmodeler/builddatabase/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"sarscov2-genome_fasta-stub": {
"content": [
{
"0": [
"db": [
[
{
"id": "test"
Expand All @@ -19,51 +19,49 @@
]
]
],
"1": [
"versions.yml:md5,7944637266bc3e2726899eaad5e46c87"
],
"versions_repeatmodeler": [
[
"REPEATMODELER_BUILDDATABASE",
"repeatmodeler",
"2.0.5"
]
]
}
],
"timestamp": "2026-08-03T13:44:38.119214327",
"meta": {
"nf-test": "0.9.5",
"nextflow": "26.04.6"
}
},
"sarscov2-genome_fasta": {
"content": [
{
"db": [
[
{
"id": "test"
},
[
"test.nhr:md5,d41d8cd98f00b204e9800998ecf8427e",
"test.nin:md5,d41d8cd98f00b204e9800998ecf8427e",
"test.njs:md5,d41d8cd98f00b204e9800998ecf8427e",
"test.nnd:md5,d41d8cd98f00b204e9800998ecf8427e",
"test.nni:md5,d41d8cd98f00b204e9800998ecf8427e",
"test.nog:md5,d41d8cd98f00b204e9800998ecf8427e",
"test.nsq:md5,d41d8cd98f00b204e9800998ecf8427e",
"test.translation:md5,d41d8cd98f00b204e9800998ecf8427e"
"test.nhr",
"test.nin",
"test.njs",
"test.nnd",
"test.nni",
"test.nog",
"test.nsq",
"test.translation"
]
]
],
"versions": [
"versions.yml:md5,7944637266bc3e2726899eaad5e46c87"
"versions_repeatmodeler": [
[
"REPEATMODELER_BUILDDATABASE",
"repeatmodeler",
"2.0.5"
]
]
}
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-04-02T12:06:44.261566"
},
"versions": {
"content": [
[
"versions.yml:md5,7944637266bc3e2726899eaad5e46c87"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-01-09T15:14:48.807063"
},
"stable_md5": {
"content": [
},
[
"test.nhr:md5,1a41cb6d0b00c28f62ad60e75ae2f6fc",
"test.nnd:md5,2002e13acf59079a1a5782c918894579",
Expand All @@ -73,20 +71,10 @@
"test.translation:md5,ccbb119522c09daa976a9015ba999329"
]
],
"timestamp": "2026-08-03T13:44:32.313232604",
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-04-23T10:03:41.669433"
},
"db": {
"content": [
"[test.nhr, test.nin, test.njs, test.nnd, test.nni, test.nog, test.nsq, test.translation]"
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "23.10.1"
},
"timestamp": "2024-04-02T12:08:36.94713"
"nf-test": "0.9.5",
"nextflow": "26.04.6"
}
}
}
18 changes: 4 additions & 14 deletions modules/nf-core/repeatmodeler/repeatmodeler/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ process REPEATMODELER_REPEATMODELER {
tuple val(meta), path("*.fa") , emit: fasta
tuple val(meta), path("*.stk"), emit: stk
tuple val(meta), path("*.log"), emit: log
path "versions.yml" , emit: versions
tuple val("${task.process}"), val('repeatmodeler'), eval("RepeatModeler --version 2>&1 | sed 's/RepeatModeler version //'") , emit: versions_repeatmodeler, topic: versions

when:
task.ext.when == null || task.ext.when
Expand All @@ -25,18 +25,13 @@ process REPEATMODELER_REPEATMODELER {
def db_name = file(db[0]).getBaseName()
"""
RepeatModeler \\
-database $db_name \\
$args \\
-threads $task.cpus
-database ${db_name} \\
${args} \\
-threads ${task.cpus}

mv ${db_name}-families.fa ${prefix}.fa
mv ${db_name}-families.stk ${prefix}.stk
mv ${db_name}-rmod.log ${prefix}.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
repeatmodeler: \$(RepeatModeler --version | sed 's/RepeatModeler version //')
END_VERSIONS
"""

stub:
Expand All @@ -45,10 +40,5 @@ process REPEATMODELER_REPEATMODELER {
touch ${prefix}.fa
touch ${prefix}.stk
touch ${prefix}.log

cat <<-END_VERSIONS > versions.yml
"${task.process}":
repeatmodeler: \$(RepeatModeler --version | sed 's/RepeatModeler version //')
END_VERSIONS
"""
}
38 changes: 26 additions & 12 deletions modules/nf-core/repeatmodeler/repeatmodeler/meta.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json
name: "repeatmodeler_repeatmodeler"
description: Performs de novo transposable element (TE) family identification with
RepeatModeler
description: Performs de novo transposable element (TE) family identification with RepeatModeler
keywords:
- genomics
- fasta
- repeat
- transposable element
tools:
- "repeatmodeler":
description: "RepeatModeler is a de-novo repeat family identification and modeling
package."
description: "RepeatModeler is a de-novo repeat family identification and modeling package."
homepage: "https://github.com/Dfam-consortium/RepeatModeler"
documentation: "https://github.com/Dfam-consortium/RepeatModeler"
tool_dev_url: "https://github.com/Dfam-consortium/RepeatModeler"
licence: ["Open Software License v2.1"]
licence:
- "Open Software License v2.1"
identifier: biotools:repeatmodeler
input:
- - meta:
Expand Down Expand Up @@ -61,13 +59,29 @@ output:
description: A summarized log of the run
pattern: "*.log"
ontologies: []
versions_repeatmodeler:
- - ${task.process}:
type: string
description: The name of the process
- repeatmodeler:
type: string
description: The name of the tool
- RepeatModeler --version 2>&1 | sed 's/RepeatModeler 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
- repeatmodeler:
type: string
description: The name of the tool
- RepeatModeler --version 2>&1 | sed 's/RepeatModeler version //':
type: eval
description: The expression to obtain the version of the tool

authors:
- "@GallVp"
maintainers:
Expand Down
12 changes: 5 additions & 7 deletions modules/nf-core/repeatmodeler/repeatmodeler/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,10 @@ nextflow_process {
}

then {
assert process.success
assertAll(
{ assert process.success },
{ assert snapshot(process.out.fasta).match("fasta") },
{ assert snapshot(process.out.stk).match("stk") },
{ assert file(process.out.log[0][1]).text.contains('1 families discovered.') },
{ assert snapshot(process.out.versions).match("versions") }
{ assert snapshot(sanitizeOutput(process.out, unstableKeys: ["log"])).match() },
{ assert file(process.out.log[0][1]).text.contains('1 families discovered.') }
)
}

Expand All @@ -63,9 +61,9 @@ nextflow_process {
}

then {
assert process.success
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}

Expand Down
Loading
Loading