From 07e590216c58bd19faffb98c474dd9fd7e897b34 Mon Sep 17 00:00:00 2001 From: alejandrogzi Date: Thu, 23 Apr 2026 13:19:37 +0200 Subject: [PATCH 1/3] feat: add xorf modules --- modules/nextflow/xorf/chunk/main.nf | 64 ++++++++++++++++ modules/nextflow/xorf/netstart2/main.nf | 56 ++++++++++++++ modules/nextflow/xorf/rnasamba/main.nf | 68 +++++++++++++++++ modules/nextflow/xorf/transaid/main.nf | 59 ++++++++++++++ modules/nextflow/xorf/translationai/main.nf | 61 +++++++++++++++ modules/wdl/xorf/chunk/main.wdl | 81 ++++++++++++++++++++ modules/wdl/xorf/netstart2/main.wdl | 71 +++++++++++++++++ modules/wdl/xorf/rnasamba/main.wdl | 85 +++++++++++++++++++++ modules/wdl/xorf/transaid/main.wdl | 74 ++++++++++++++++++ modules/wdl/xorf/translationai/main.wdl | 77 +++++++++++++++++++ 10 files changed, 696 insertions(+) create mode 100644 modules/nextflow/xorf/chunk/main.nf create mode 100644 modules/nextflow/xorf/netstart2/main.nf create mode 100644 modules/nextflow/xorf/rnasamba/main.nf create mode 100644 modules/nextflow/xorf/transaid/main.nf create mode 100644 modules/nextflow/xorf/translationai/main.nf create mode 100644 modules/wdl/xorf/chunk/main.wdl create mode 100644 modules/wdl/xorf/netstart2/main.wdl create mode 100644 modules/wdl/xorf/rnasamba/main.wdl create mode 100644 modules/wdl/xorf/transaid/main.wdl create mode 100644 modules/wdl/xorf/translationai/main.wdl diff --git a/modules/nextflow/xorf/chunk/main.nf b/modules/nextflow/xorf/chunk/main.nf new file mode 100644 index 0000000..cb145a6 --- /dev/null +++ b/modules/nextflow/xorf/chunk/main.nf @@ -0,0 +1,64 @@ +// Copyright (c) 2025 Alejandro Gonzales-Irribarren +// Distributed under the terms of the Apache License, Version 2.0. + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CHUNKER — Splits genomic regions (BED/GTF/GFF) and sequences (2bit/FA/FA.GZ) + into chunks for parallel processing. Allows to extend the extracted chunk by a given + upstream and downstream amount of nucleotides. Additionally, it allows to specify + the number of chunks to be generated. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +process CHUNKER { + tag "$meta.id:$meta.chr" + label 'process_low' + + conda "${moduleDir}/environment.yml" + container 'ghcr.io/alejandrogzi/orf-chunk:latest' + + input: + tuple val(meta), path(regions) + tuple val(meta1), path(sequence) + val(chunk_size) + + output: + tuple val(meta), path('tmp/*bed'), optional: true, emit: chunked_regions + tuple val(meta), path('tmp/*fa'), optional: true, emit: chunked_sequences + path "versions.yml", emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def upstream = task.ext.upstream ?: 1000 + def downstream = task.ext.downstream ?: 1000 + def prefix = task.ext.prefix ?: meta.chr + """ + orf chunk \\ + --regions $regions \\ + --sequence $sequence \\ + --chunks $chunk_size \\ + -u $upstream \\ + -d $downstream \\ + --prefix $prefix \\ + --ignore-errors + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + orf-chunk: \$(orf --version 2>&1 | sed 's/^.*orf //; s/ .*\$//') + END_VERSIONS + """ + + stub: + """ + touch tmp + touch tmp/*bed + touch tmp/*fa + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + orf-chunk: \$(orf --version 2>&1 | sed 's/^.*orf //; s/ .*\$//') + END_VERSIONS + """ +} diff --git a/modules/nextflow/xorf/netstart2/main.nf b/modules/nextflow/xorf/netstart2/main.nf new file mode 100644 index 0000000..54950dd --- /dev/null +++ b/modules/nextflow/xorf/netstart2/main.nf @@ -0,0 +1,56 @@ +// Copyright (c) 2025 Alejandro Gonzales-Irribarren +// Distributed under the terms of the Apache License, Version 2.0. + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + NETSTART2 — Predicts translation initiation sites using neural networks +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +process NETSTART2 { + tag "$meta.id:$meta.name" + label 'process_single' + + conda "${moduleDir}/environment.yml" + container 'ghcr.io/alejandrogzi/orf-net:latest' + + input: + tuple val(meta), path(sequence) + tuple val(meta), path(bed) + + output: + tuple val(meta), path("${meta.id}*csv"), optional: true, emit: netstart + tuple val(meta), env(PREDICTION_COUNT), optional: true, emit: count + path "versions.yml", emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + """ + netstart2 \\ + -in $sequence \\ + -compute_device cpu \\ + -o chordata \\ + -out ${meta.id}_netstart + $args + + PREDICTION_COUNT=\$(wc -l < ${meta.id}*csv) + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + netstart2: \$(netstart2 --version 2>&1 | sed 's/.*Version: //') + END_VERSIONS + """ + + stub: + """ + touch ${meta.id}* + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + netstart2: \$(netstart2 --version 2>&1 | sed 's/.*Version: //') + END_VERSIONS + """ +} diff --git a/modules/nextflow/xorf/rnasamba/main.nf b/modules/nextflow/xorf/rnasamba/main.nf new file mode 100644 index 0000000..f1a8554 --- /dev/null +++ b/modules/nextflow/xorf/rnasamba/main.nf @@ -0,0 +1,68 @@ +// Copyright (c) 2025 Alejandro Gonzales-Irribarren +// Distributed under the terms of the Apache License, Version 2.0. + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + RNASAMBA — Classifies ORFs as coding or non-coding using RNAsamba machine learning + models through a Rust wrapper. Requires specifiying the upstream and downstream + amount of nucleotides extended from the incoming file. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +process RNASAMBA { + tag "$meta.id:$meta.name" + label 'process_single' + + conda "${moduleDir}/environment.yml" + container 'ghcr.io/alejandrogzi/orf-samba:latest' + + input: + tuple val(meta), path(bed), path(sequence) + tuple val(_), path(weights) + + output: + tuple val(meta), path("${meta.id}/*tsv") , optional: true, emit: samba + tuple val(meta), path("${meta.id}/*strip.fa") , optional: true, emit: fasta + tuple val(meta), path(bed) , optional: true, emit: bed + path "versions.yml", emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + def upstream = task.ext.upstream ?: 1000 + def downstream = task.ext.downstream ?: 1000 + """ + orf samba \\ + --fasta $sequence \\ + --outdir ${meta.id} \\ + --upstream-flank $upstream \\ + --downstream-flank $downstream \\ + --weights $weights \\ + $args + + mv ${meta.id}/samba/*tsv ${meta.id}/${meta.id}.${meta.name}.samba.tsv && rm -rf ${meta.id}/samba + mv ${meta.name}.tmp.strip.fa ${meta.id}/${meta.id}.${meta.name}.strip.fa + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + orf-samba: \$(orf --version 2>&1 | sed 's/^.*orf //; s/ .*\$//') + rnasamba: \$(rnasamba --version 2>&1 | tail -n 1 | sed 's/^rnasamba //') + END_VERSIONS + """ + + stub: + """ + touch ${meta.id} + touch ${meta.id}/*strip.fa + touch ${meta.id}/samba + touch ${meta.id}/samba/* + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + orf-samba: \$(orf --version 2>&1 | sed 's/^.*orf //; s/ .*\$//') + rnasamba: \$(rnasamba --version 2>&1 | tail -n 1 | sed 's/^rnasamba //') + END_VERSIONS + """ +} diff --git a/modules/nextflow/xorf/transaid/main.nf b/modules/nextflow/xorf/transaid/main.nf new file mode 100644 index 0000000..d3ff275 --- /dev/null +++ b/modules/nextflow/xorf/transaid/main.nf @@ -0,0 +1,59 @@ +// Copyright (c) 2025 Alejandro Gonzales-Irribarren +// Distributed under the terms of the Apache License, Version 2.0. + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + TRANSAID — Predicts translation initiation sites using TransAID deep learning + models. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +process TRANSAID { + tag "$meta.id:$meta.name" + label 'process_single' + + conda "${moduleDir}/environment.yml" + container 'ghcr.io/alejandrogzi/orf-net:latest' + + input: + tuple val(meta), path(sequence) + tuple val(meta), path(bed) + + output: + tuple val(meta), path("*csv") , optional: true, emit: transaid + tuple val(meta), env(PREDICTION_COUNT) , optional: true, emit: count + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + """ + transaid \\ + --input $sequence \\ + --gpu -1 \\ + --output ${meta.id}_transaid \\ + $args + + mv *csv ${meta.id}.${meta.name}.transaid.csv + PREDICTION_COUNT=\$(wc -l < ${meta.id}.${meta.name}.transaid.csv) + + rm *.faa + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + transaid: \$(transaid --version 2>&1 | sed 's/.*Version: //') + END_VERSIONS + """ + + stub: + """ + touch ${meta.id}* + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + transaid: \$(transaid --version 2>&1 | sed 's/.*Version: //') + END_VERSIONS + """ +} diff --git a/modules/nextflow/xorf/translationai/main.nf b/modules/nextflow/xorf/translationai/main.nf new file mode 100644 index 0000000..996b8a7 --- /dev/null +++ b/modules/nextflow/xorf/translationai/main.nf @@ -0,0 +1,61 @@ +// Copyright (c) 2025 Alejandro Gonzales-Irribarren +// Distributed under the terms of the Apache License, Version 2.0. + +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + TRANSLATIONAI — Runs translational inference (TAI) on ORF predictions through a + Rust wrapper. Requires specifiying the upstream and downstream amount of nucleotides + extended from the incoming file. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*/ + +process TRANSLATION { + tag "$meta.id:$meta.name" + label 'process_single' + + conda "${moduleDir}/environment.yml" + container 'ghcr.io/alejandrogzi/orf-tai:latest' + + input: + tuple val(meta), path(bed), path(sequence) + + output: + tuple val(meta), path(bed), path(sequence), path("${meta.id}/*result"), optional: true, emit: predictions + path "versions.yml", emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def upstream = task.ext.upstream ?: 1000 + def downstream = task.ext.downstream ?: 1000 + """ + orf tai \\ + --fasta $sequence \\ + --bed $bed \\ + --outdir ${meta.id} \\ + -u $upstream \\ + -d $downstream + + mv ${meta.id}/tai/*result ${meta.id}/ && rm -rf ${meta.id}/tai + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + orf-tai: \$(orf --version 2>&1 | sed 's/^.*orf //; s/ .*\$//') + translationai: 0.0.1 + END_VERSIONS + """ + + stub: + """ + touch ${meta.id} + touch ${meta.id}/tai + touch ${meta.id}/tai/*result + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + orf-tai: \$(orf --version 2>&1 | sed 's/^.*orf //; s/ .*\$//') + translationai: 0.0.1 + END_VERSIONS + """ +} diff --git a/modules/wdl/xorf/chunk/main.wdl b/modules/wdl/xorf/chunk/main.wdl new file mode 100644 index 0000000..5881a87 --- /dev/null +++ b/modules/wdl/xorf/chunk/main.wdl @@ -0,0 +1,81 @@ +# Copyright (c) 2026 The Hiller Lab at the Senckenberg Gessellschaft für Naturforschung +# Distributed under the terms of the Apache License, Version 2.0. + +# CHUNKER — Splits genomic regions (BED/GTF/GFF) and sequences (2bit/FA/FA.GZ) +# into chunks for parallel processing. Allows to extend the extracted chunk by a given +# upstream and downstream amount of nucleotides. Additionally, it allows to specify +# the number of chunks to be generated. + +version 1.3 + +task chunk { + input { + String meta_id + String meta_chr + File regions + File sequence + Int chunk_size + Int upstream = 1000 + Int downstream = 1000 + String prefix = meta_chr + } + + command <<< + set -euo pipefail + + orf chunk \ + --regions ~{regions} \ + --sequence ~{sequence} \ + --chunks ~{chunk_size} \ + -u ~{upstream} \ + -d ~{downstream} \ + --prefix ~{prefix} \ + --ignore-errors + + cat <<-END_VERSIONS > versions.yml + "CHUNKER": + orf-chunk: $(orf --version 2>&1 | sed 's/^.*orf //; s/ .*$//') + END_VERSIONS + >>> + + output { + Array[File] chunked_regions = glob("tmp/*bed") + Array[File] chunked_sequences = glob("tmp/*fa") + File versions = "versions.yml" + } + + requirements { + container: "ghcr.io/alejandrogzi/orf-chunk:latest" + } +} + +workflow run { + input { + String meta_id + String meta_chr + File regions + File sequence + Int chunk_size + Int upstream = 1000 + Int downstream = 1000 + String prefix = meta_chr + } + + call chunk { + input: + meta_id = meta_id, + meta_chr = meta_chr, + regions = regions, + sequence = sequence, + chunk_size = chunk_size, + upstream = upstream, + downstream = downstream, + prefix = prefix + } + + output { + Array[File] chunked_regions = chunk.chunked_regions + Array[File] chunked_sequences = chunk.chunked_sequences + File versions = chunk.versions + } +} diff --git a/modules/wdl/xorf/netstart2/main.wdl b/modules/wdl/xorf/netstart2/main.wdl new file mode 100644 index 0000000..7154f42 --- /dev/null +++ b/modules/wdl/xorf/netstart2/main.wdl @@ -0,0 +1,71 @@ +# Copyright (c) 2026 The Hiller Lab at the Senckenberg Gessellschaft für Naturforschung +# Distributed under the terms of the Apache License, Version 2.0. + +# NETSTART2 — Predicts translation initiation sites using neural networks + +version 1.3 + +task netstart2 { + input { + String meta_id + String meta_name + File sequence + File bed + String args = "" + } + + String out_prefix = meta_id + "_netstart" + + command <<< + set -euo pipefail + + netstart2 \ + -in ~{sequence} \ + -compute_device cpu \ + -o chordata \ + -out ~{out_prefix} \ + ~{args} + + PREDICTION_COUNT=$(wc -l < ~{meta_id}*csv) + + cat <<-END_VERSIONS > versions.yml + "NETSTART2": + netstart2: $(netstart2 --version 2>&1 | sed 's/.*Version: //') + END_VERSIONS + >>> + + output { + Array[File] netstart = glob("${meta_id}*csv") + Int count = read_int("PREDICTION_COUNT") + File versions = "versions.yml" + } + + requirements { + container: "ghcr.io/alejandrogzi/orf-net:latest" + } +} + +workflow run { + input { + String meta_id + String meta_name + File sequence + File bed + String args = "" + } + + call netstart2 { + input: + meta_id = meta_id, + meta_name = meta_name, + sequence = sequence, + bed = bed, + args = args + } + + output { + Array[File] netstart = netstart2.netstart + Int count = netstart2.count + File versions = netstart2.versions + } +} diff --git a/modules/wdl/xorf/rnasamba/main.wdl b/modules/wdl/xorf/rnasamba/main.wdl new file mode 100644 index 0000000..88f5fe9 --- /dev/null +++ b/modules/wdl/xorf/rnasamba/main.wdl @@ -0,0 +1,85 @@ +# Copyright (c) 2026 The Hiller Lab at the Senckenberg Gessellschaft für Naturforschung +# Distributed under the terms of the Apache License, Version 2.0. + +# RNASAMBA — Classifies ORFs as coding or non-coding using RNAsamba machine learning +# models through a Rust wrapper. Requires specifiying the upstream and downstream +# amount of nucleotides extended from the incoming file. + +version 1.3 + +task samba { + input { + String meta_id + String meta_name + File bed + File sequence + File weights + Int upstream = 1000 + Int downstream = 1000 + String args = "" + } + + command <<< + set -euo pipefail + + orf samba \ + --fasta ~{sequence} \ + --outdir ~{meta_id} \ + --upstream-flank ~{upstream} \ + --downstream-flank ~{downstream} \ + --weights ~{weights} \ + ~{args} + + mv ~{meta_id}/samba/*tsv ~{meta_id}/~{meta_id}.~{meta_name}.samba.tsv && rm -rf ~{meta_id}/samba + mv ~{meta_name}.tmp.strip.fa ~{meta_id}/~{meta_id}.~{meta_name}.strip.fa + + cat <<-END_VERSIONS > versions.yml + "RNASAMBA": + orf-samba: $(orf --version 2>&1 | sed 's/^.*orf //; s/ .*$//') + rnasamba: $(rnasamba --version 2>&1 | tail -n 1 | sed 's/^rnasamba //') + END_VERSIONS + >>> + + output { + Array[File] samba = glob("${meta_id}/*tsv") + Array[File] fasta = glob("${meta_id}/*strip.fa") + File input_bed = bed + File versions = "versions.yml" + } + + requirements { + container: "ghcr.io/alejandrogzi/orf-samba:latest" + } +} + +workflow run { + input { + String meta_id + String meta_name + File bed + File sequence + File weights + Int upstream = 1000 + Int downstream = 1000 + String args = "" + } + + call samba { + input: + meta_id = meta_id, + meta_name = meta_name, + bed = bed, + sequence = sequence, + weights = weights, + upstream = upstream, + downstream = downstream, + args = args + } + + output { + Array[File] samba = samba.samba + Array[File] fasta = samba.fasta + File input_bed = samba.input_bed + File versions = samba.versions + } +} diff --git a/modules/wdl/xorf/transaid/main.wdl b/modules/wdl/xorf/transaid/main.wdl new file mode 100644 index 0000000..a5d9184 --- /dev/null +++ b/modules/wdl/xorf/transaid/main.wdl @@ -0,0 +1,74 @@ +# Copyright (c) 2026 The Hiller Lab at the Senckenberg Gessellschaft für Naturforschung +# Distributed under the terms of the Apache License, Version 2.0. + +# TRANSAID — Predicts translation initiation sites using TransAID deep learning +# models. + +version 1.3 + +task transaid { + input { + String meta_id + String meta_name + File sequence + File bed + String args = "" + } + + String out_prefix = meta_id + "_transaid" + + command <<< + set -euo pipefail + + transaid \ + --input ~{sequence} \ + --gpu -1 \ + --output ~{out_prefix} \ + ~{args} + + mv *csv ~{meta_id}.~{meta_name}.transaid.csv + PREDICTION_COUNT=$(wc -l < ~{meta_id}.~{meta_name}.transaid.csv) + + rm *.faa + + cat <<-END_VERSIONS > versions.yml + "TRANSAID": + transaid: $(transaid --version 2>&1 | sed 's/.*Version: //') + END_VERSIONS + >>> + + output { + Array[File] transaid = glob("*.csv") + Int count = read_int("PREDICTION_COUNT") + File versions = "versions.yml" + } + + requirements { + container: "ghcr.io/alejandrogzi/orf-net:latest" + } +} + +workflow run { + input { + String meta_id + String meta_name + File sequence + File bed + String args = "" + } + + call transaid { + input: + meta_id = meta_id, + meta_name = meta_name, + sequence = sequence, + bed = bed, + args = args + } + + output { + Array[File] transaid = transaid.transaid + Int count = transaid.count + File versions = transaid.versions + } +} diff --git a/modules/wdl/xorf/translationai/main.wdl b/modules/wdl/xorf/translationai/main.wdl new file mode 100644 index 0000000..be238b4 --- /dev/null +++ b/modules/wdl/xorf/translationai/main.wdl @@ -0,0 +1,77 @@ +# Copyright (c) 2026 The Hiller Lab at the Senckenberg Gessellschaft für Naturforschung +# Distributed under the terms of the Apache License, Version 2.0. + +# TRANSLATIONAI — Runs translational inference (TAI) on ORF predictions through a +# Rust wrapper. Requires specifiying the upstream and downstream amount of nucleotides +# extended from the incoming file. + +version 1.3 + +task translation { + input { + String meta_id + String meta_name + File bed + File sequence + Int upstream = 1000 + Int downstream = 1000 + } + + command <<< + set -euo pipefail + + orf tai \ + --fasta ~{sequence} \ + --bed ~{bed} \ + --outdir ~{meta_id} \ + -u ~{upstream} \ + -d ~{downstream} + + mv ~{meta_id}/tai/*result ~{meta_id}/ && rm -rf ~{meta_id}/tai + + cat <<-END_VERSIONS > versions.yml + "TRANSLATION": + orf-tai: $(orf --version 2>&1 | sed 's/^.*orf //; s/ .*$//') + translationai: 0.0.1 + END_VERSIONS + >>> + + output { + File input_bed = bed + File input_sequence = sequence + Array[File] predictions = glob("${meta_id}/*result") + File versions = "versions.yml" + } + + requirements { + container: "ghcr.io/alejandrogzi/orf-tai:latest" + } +} + +workflow run { + input { + String meta_id + String meta_name + File bed + File sequence + Int upstream = 1000 + Int downstream = 1000 + } + + call translation { + input: + meta_id = meta_id, + meta_name = meta_name, + bed = bed, + sequence = sequence, + upstream = upstream, + downstream = downstream + } + + output { + File input_bed = translation.input_bed + File input_sequence = translation.input_sequence + Array[File] predictions = translation.predictions + File versions = translation.versions + } +} From 95a3c39f03adfbb2f1ec71281ba3636487bfc6a0 Mon Sep 17 00:00:00 2001 From: alejandrogzi Date: Thu, 23 Apr 2026 13:29:05 +0200 Subject: [PATCH 2/3] fix: comply with linter --- modules/nextflow/xorf/netstart2/main.nf | 9 +++------ modules/nextflow/xorf/rnasamba/main.nf | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/modules/nextflow/xorf/netstart2/main.nf b/modules/nextflow/xorf/netstart2/main.nf index 54950dd..c4a4ea4 100644 --- a/modules/nextflow/xorf/netstart2/main.nf +++ b/modules/nextflow/xorf/netstart2/main.nf @@ -16,11 +16,10 @@ process NETSTART2 { input: tuple val(meta), path(sequence) - tuple val(meta), path(bed) + tuple val(meta1), path(bed) output: - tuple val(meta), path("${meta.id}*csv"), optional: true, emit: netstart - tuple val(meta), env(PREDICTION_COUNT), optional: true, emit: count + tuple val(meta1), path("${meta.id}*csv"), optional: true, emit: netstart path "versions.yml", emit: versions when: @@ -33,11 +32,9 @@ process NETSTART2 { -in $sequence \\ -compute_device cpu \\ -o chordata \\ - -out ${meta.id}_netstart + -out ${meta.id}_netstart \\ $args - PREDICTION_COUNT=\$(wc -l < ${meta.id}*csv) - cat <<-END_VERSIONS > versions.yml "${task.process}": netstart2: \$(netstart2 --version 2>&1 | sed 's/.*Version: //') diff --git a/modules/nextflow/xorf/rnasamba/main.nf b/modules/nextflow/xorf/rnasamba/main.nf index f1a8554..e4bf2b9 100644 --- a/modules/nextflow/xorf/rnasamba/main.nf +++ b/modules/nextflow/xorf/rnasamba/main.nf @@ -18,7 +18,7 @@ process RNASAMBA { input: tuple val(meta), path(bed), path(sequence) - tuple val(_), path(weights) + tuple val(meta1), path(weights) output: tuple val(meta), path("${meta.id}/*tsv") , optional: true, emit: samba From 052c0c3ff2dc990f63864d3afce94ffa9d5c278c Mon Sep 17 00:00:00 2001 From: alejandrogzi Date: Thu, 23 Apr 2026 13:30:47 +0200 Subject: [PATCH 3/3] fix: remove duplicated meta + env --- modules/nextflow/xorf/transaid/main.nf | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/modules/nextflow/xorf/transaid/main.nf b/modules/nextflow/xorf/transaid/main.nf index d3ff275..ca2b7d6 100644 --- a/modules/nextflow/xorf/transaid/main.nf +++ b/modules/nextflow/xorf/transaid/main.nf @@ -17,12 +17,11 @@ process TRANSAID { input: tuple val(meta), path(sequence) - tuple val(meta), path(bed) + tuple val(meta1), path(bed) output: - tuple val(meta), path("*csv") , optional: true, emit: transaid - tuple val(meta), env(PREDICTION_COUNT) , optional: true, emit: count - path "versions.yml" , emit: versions + tuple val(meta1), path("*csv") , optional: true, emit: transaid + path "versions.yml" , emit: versions when: task.ext.when == null || task.ext.when @@ -37,8 +36,6 @@ process TRANSAID { $args mv *csv ${meta.id}.${meta.name}.transaid.csv - PREDICTION_COUNT=\$(wc -l < ${meta.id}.${meta.name}.transaid.csv) - rm *.faa cat <<-END_VERSIONS > versions.yml