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
10 changes: 7 additions & 3 deletions modules/ensembl/fasta/recombine/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

nextflow.enable.types = true

process FASTA_RECOMBINE {

tag "${meta.id}"
Expand All @@ -22,11 +24,13 @@ process FASTA_RECOMBINE {
container "docker.io/ensemblorg/ensembl-genomio:v1.7.0"

input:
tuple val(meta), path(fasta_manifest), path(agp)
record(meta: Map, fasta_manifest: Path, agp: Path?)

output:
tuple val(meta), path("${meta.id}.fa"), emit: recombined_fasta
tuple val("${task.process}"), val('fasta_recombine'), eval("fasta_recombine --version"), emit: versions_fasta_recombine, topic: versions
record(meta: meta, recombined_fasta: file("${meta.id}.fa"))

topic:
tuple(task.process, 'fasta_recombine', eval("fasta_recombine --version 2>/dev/null || echo unknown")) >> 'versions'

when:
task.ext.when == null || task.ext.when
Expand Down
12 changes: 1 addition & 11 deletions modules/ensembl/fasta/recombine/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,6 @@ output:
pattern: "*.fa"
ontologies:
- edam: http://edamontology.org/format_1929 # FASTA
versions_fasta_recombine:
- - ${task.process}:
type: string
description: The name of the process.
- fasta_recombine:
type: string
description: The name of the tool.
- "fasta_recombine --version":
type: eval
description: The expression to obtain the version of the tool
topics:
versions:
- - ${task.process}:
Expand All @@ -64,7 +54,7 @@ topics:
- fasta_recombine:
type: string
description: The name of the tool.
- "fasta_recombine --version":
- "fasta_recombine --version 2>/dev/null || echo unknown":
type: eval
description: The expression to obtain the version of the tool
authors:
Expand Down
25 changes: 13 additions & 12 deletions modules/ensembl/fasta/recombine/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ nextflow_process {
tag "modules_ensembl"
tag "fasta"
tag "fasta/recombine"
topics "versions"

test("stub outputs: header mode") {

Expand All @@ -38,18 +39,18 @@ nextflow_process {
def no_file = file("NO_FILE")
no_file.text = ""

input[0] = [
[ id: 'test' ],
manifest,
no_file
]
input[0] = record(meta: [ id: 'test' ], fasta_manifest: manifest, agp: no_file)
"""
}
}

then {
assert process.trace.tasks().size() == 1
assert process.out.recombined_fasta.size() == 1
assert process.out[0].size() == 1
assert file(process.out[0][0].recombined_fasta).name == 'test.fa'
assert topics.versions.size() == 1
assert topics.versions[0].size() == 3
assert topics.versions[0][0] == 'FASTA_RECOMBINE'
assert process.success
assert snapshot(process.out).match()
}
Expand All @@ -67,18 +68,18 @@ nextflow_process {

def agp = file("test.agp")
agp.text = ""
input[0] = [
[ id: 'test' ],
manifest,
agp
]
input[0] = record(meta: [ id: 'test' ], fasta_manifest: manifest, agp: agp)
"""
}
}

then {
assert process.trace.tasks().size() == 1
assert process.out.recombined_fasta.size() == 1
assert process.out[0].size() == 1
assert file(process.out[0][0].recombined_fasta).name == 'test.fa'
assert topics.versions.size() == 1
assert topics.versions[0].size() == 3
assert topics.versions[0][0] == 'FASTA_RECOMBINE'
assert process.success
assert snapshot(process.out).match()
}
Expand Down
72 changes: 14 additions & 58 deletions modules/ensembl/fasta/recombine/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,82 +3,38 @@
"content": [
{
"0": [
[
{
{
"meta": {
"id": "test"
},
"test.fa:md5,c40116e7d725da4662e6bdd654f70075"
]
],
"1": [
[
"FASTA_RECOMBINE",
"fasta_recombine",
"1.7.0"
]
],
"recombined_fasta": [
[
{
"id": "test"
},
"test.fa:md5,c40116e7d725da4662e6bdd654f70075"
]
],
"versions_fasta_recombine": [
[
"FASTA_RECOMBINE",
"fasta_recombine",
"1.7.0"
]
"recombined_fasta": "test.fa:md5,c40116e7d725da4662e6bdd654f70075"
}
]
}
],
"timestamp": "2026-06-11T18:08:46.722339",
"timestamp": "2026-09-29T12:53:47.242818",
"meta": {
"nf-test": "0.9.4",
"nextflow": "25.10.3"
"nf-test": "0.9.5",
"nextflow": "26.04.3"
}
},
"stub outputs: header mode": {
"content": [
{
"0": [
[
{
"id": "test"
},
"test.fa:md5,c40116e7d725da4662e6bdd654f70075"
]
],
"1": [
[
"FASTA_RECOMBINE",
"fasta_recombine",
"1.7.0"
]
],
"recombined_fasta": [
[
{
{
"meta": {
"id": "test"
},
"test.fa:md5,c40116e7d725da4662e6bdd654f70075"
]
],
"versions_fasta_recombine": [
[
"FASTA_RECOMBINE",
"fasta_recombine",
"1.7.0"
]
"recombined_fasta": "test.fa:md5,c40116e7d725da4662e6bdd654f70075"
}
]
}
],
"timestamp": "2026-06-11T18:08:44.434921",
"timestamp": "2026-09-29T12:53:44.690151",
"meta": {
"nf-test": "0.9.4",
"nextflow": "25.10.3"
"nf-test": "0.9.5",
"nextflow": "26.04.3"
}
}
}
15 changes: 11 additions & 4 deletions modules/ensembl/fasta/split/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

nextflow.enable.types = true

process FASTA_SPLIT {
tag "${meta.id}"
label 'process_medium'
Expand All @@ -21,12 +23,17 @@ process FASTA_SPLIT {
container "docker.io/ensemblorg/ensembl-genomio:v1.7.0"

input:
tuple val(meta), path(fasta), val(longest_seq_bp)
record(meta: Map, fasta: Path, longest_seq_bp: Integer)

output:
tuple val(meta), path("splits/**/*.fa"), emit: fastas
tuple val(meta), path("splits/*.agp"), emit: agp, optional: true
tuple val("${task.process}"), val('fasta_split'), eval("fasta_split --version"), emit: versions_fasta_split, topic: versions
record(
meta: meta,
fastas: files("splits/**/*.fa"),
agp: file("splits/*.agp", optional: true)
)

topic:
tuple(task.process, 'fasta_split', eval("fasta_split --version 2>/dev/null || echo unknown")) >> 'versions'

when:
task.ext.when == null || task.ext.when
Expand Down
12 changes: 1 addition & 11 deletions modules/ensembl/fasta/split/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,6 @@ output:
pattern: "splits/*.agp"
ontologies:
- edam: "http://edamontology.org/format_3693" # AGP
versions_fasta_split:
- - ${task.process}:
type: string
description: The name of the process.
- fasta_split:
type: string
description: The name of the tool.
- "fasta_split --version":
type: eval
description: The expression to obtain the version of the tool
topics:
versions:
- - ${task.process}:
Expand All @@ -73,7 +63,7 @@ topics:
- fasta_split:
type: string
description: The name of the tool.
- "fasta_split --version":
- "fasta_split --version 2>/dev/null || echo unknown":
type: eval
description: The expression to obtain the version of the tool
authors:
Expand Down
Loading
Loading