Skip to content
Merged
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
5 changes: 5 additions & 0 deletions modules/nf-core/ribocode/gtfupdate/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
channels:
- conda-forge
- bioconda
dependencies:
- bioconda::ribocode=1.2.15
38 changes: 38 additions & 0 deletions modules/nf-core/ribocode/gtfupdate/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
process RIBOCODE_GTFUPDATE {
tag "$meta.id"
label 'process_single'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/fe/fe815db0864b45b91afc7bc84c55cb60acb0035e7248dda7f480a55c4cb105d7/data':
'community.wave.seqera.io/library/ribocode:1.2.15--5530b252f5433a62' }"

input:
tuple val(meta), path(gtf)

output:
tuple val(meta), path("*.gtf") , emit: gtf
tuple val("${task.process}"), val('ribocode'), eval('RiboCode --version 2>&1') , emit: versions_ribocode, topic: versions

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

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"

"""
GTFupdate \\
${gtf} \\
$args \\
> ${prefix}_updated.gtf
"""

stub:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"

"""
touch ${prefix}_updated.gtf
"""
}
66 changes: 66 additions & 0 deletions modules/nf-core/ribocode/gtfupdate/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json
name: "ribocode_gtfupdate"
description: Update GTF annotation file for RiboCode compatibility
keywords:
- ribo-seq
- ribosome profiling
- gtf
- annotation
tools:
- "ribocode":
description: "A package for detecting the actively translated ORFs using ribosome-profiling
data"
homepage: "https://github.com/xryanglab/RiboCode"
documentation: "https://github.com/xryanglab/RiboCode"
tool_dev_url: "https://github.com/xryanglab/RiboCode"
doi: "10.1093/nar/gky179"
licence: ["MIT"]
identifier: ""

input:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'test', single_end:false ]`
- gtf:
type: file
description: GTF annotation file to update (uncompressed)
pattern: "*.{gtf}"
ontologies: []
output:
gtf:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'test', single_end:false ]`
- "*.gtf":
type: file
description: Updated GTF annotation file
pattern: "*_updated.gtf"
versions_ribocode:
- - ${task.process}:
type: string
description: Name of the process
- ribocode:
type: string
description: Name of the tool
- RiboCode --version 2>&1:
type: eval
description: The expression to obtain the version of the tool

topics:
versions:
- - ${task.process}:
type: string
description: Name of the process
- ribocode:
type: string
description: Name of the tool
- RiboCode --version 2>&1:
type: eval
description: The expression to obtain the version of the tool

authors:
- "@JackCurragh"
56 changes: 56 additions & 0 deletions modules/nf-core/ribocode/gtfupdate/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
nextflow_process {

name "Test Process RIBOCODE_GTFUPDATE"
script "../main.nf"
process "RIBOCODE_GTFUPDATE"

tag "modules"
tag "modules_nfcore"
tag "ribocode"
tag "ribocode/gtfupdate"

test("test_ribocode_gtfupdate") {

when {
process {
"""
input[0] = [
[ id:'test' ],
file(params.modules_testdata_base_path + "genomics/homo_sapiens/riboseq_expression/Homo_sapiens.GRCh38.111_chr20.gtf", checkIfExists: true)
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match("process_outputs") },
{ assert snapshot(process.out.findAll { key, val -> key.startsWith("versions") }).match("versions") }
)
}
}

test("test_ribocode_gtfupdate - stub") {

options "-stub"

when {
process {
"""
input[0] = [
[ id:'test' ],
file(params.modules_testdata_base_path + "genomics/homo_sapiens/riboseq_expression/Homo_sapiens.GRCh38.111_chr20.gtf", checkIfExists: true)
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert process.out.gtf[0][1].toString().endsWith('.gtf') }
)
}
}
}
61 changes: 61 additions & 0 deletions modules/nf-core/ribocode/gtfupdate/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"versions": {
"content": [
{
"versions_ribocode": [
[
"RIBOCODE_GTFUPDATE",
"ribocode",
"1.2.15"
]
]
}
],
"meta": {
"nf-test": "0.9.3",
"nextflow": "25.10.2"
},
"timestamp": "2025-12-15T13:58:20.352527"
},
"process_outputs": {
"content": [
{
"0": [
[
{
"id": "test"
},
"test_updated.gtf:md5,4aee3722f1d061395e2fdce7277708b3"
]
],
"1": [
[
"RIBOCODE_GTFUPDATE",
"ribocode",
"1.2.15"
]
],
"gtf": [
[
{
"id": "test"
},
"test_updated.gtf:md5,4aee3722f1d061395e2fdce7277708b3"
]
],
"versions_ribocode": [
[
"RIBOCODE_GTFUPDATE",
"ribocode",
"1.2.15"
]
]
}
],
"meta": {
"nf-test": "0.9.3",
"nextflow": "25.10.2"
},
"timestamp": "2025-12-15T13:58:20.062134"
}
}
5 changes: 5 additions & 0 deletions modules/nf-core/ribocode/metaplots/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
channels:
- conda-forge
- bioconda
dependencies:
- bioconda::ribocode=1.2.15
40 changes: 40 additions & 0 deletions modules/nf-core/ribocode/metaplots/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
process RIBOCODE_METAPLOTS {
tag "$meta.id"
label 'process_single'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/fe/fe815db0864b45b91afc7bc84c55cb60acb0035e7248dda7f480a55c4cb105d7/data':
'community.wave.seqera.io/library/ribocode:1.2.15--5530b252f5433a62' }"

input:
tuple val(meta), path(bam)
tuple val(meta2), path(annotation)

output:
tuple val(meta), path("*config.txt") , emit: config
tuple val(meta), path("*.pdf") , emit: pdf
tuple val("${task.process}"), val('ribocode'), eval('RiboCode --version 2>&1') , emit: versions_ribocode, topic: versions

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

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
metaplots \\
-a $annotation \\
-r $bam \\
-o ${prefix} \\
$args
"""

stub:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}_config.txt
touch ${prefix}_report.pdf
"""
}
87 changes: 87 additions & 0 deletions modules/nf-core/ribocode/metaplots/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json
name: "ribocode_metaplots"
description: Set up RiboCode ORF calling with metaplots
keywords:
- ribo-seq
- ribosome profiling
- orf calling
tools:
- "ribocode":
description: "A package for detecting the actively translated ORFs using ribosome-profiling
data"
homepage: "https://github.com/xryanglab/RiboCode"
documentation: "https://github.com/xryanglab/RiboCode"
tool_dev_url: "https://github.com/xryanglab/RiboCode"
doi: "10.1093/nar/gky179"
licence: ["MIT"]
identifier: ""

input:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'test', single_end:false ]`
- bam:
type: file
description: Sorted BAM/CRAM/SAM file
pattern: "*.{bam,cram,sam}"
ontologies: []
- - meta2:
type: map
description: |
Groovy Map containing annotation information
e.g. `[ id:'genome' ]`
- annotation:
type: directory
description: Directory containing annotation files from ribocode/prepare
pattern: "annotation"

output:
config:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'test', single_end:false ]`
- "*config.txt":
type: file
description: RiboCode configuration file containing P-site offsets
pattern: "*_config.txt"
ontologies: []
pdf:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'test', single_end:false ]`
- "*.pdf":
type: file
description: PDF file containing P-site metaplots for quality control
pattern: "*_report.pdf"
ontologies: []
versions_ribocode:
- - ${task.process}:
type: string
description: Name of the process
- ribocode:
type: string
description: Name of the tool
- RiboCode --version 2>&1:
type: eval
description: The expression to obtain the version of the tool

topics:
versions:
- - ${task.process}:
type: string
description: Name of the process
- ribocode:
type: string
description: Name of the tool
- RiboCode --version 2>&1:
type: eval
description: The expression to obtain the version of the tool

authors:
- "@JackCurragh"
Loading
Loading