Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rattle cluster #7447

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
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
7 changes: 7 additions & 0 deletions modules/nf-core/rattle/cluster/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json
channels:
- conda-forge
- bioconda
dependencies:
- bioconda::false_flag
47 changes: 47 additions & 0 deletions modules/nf-core/rattle/cluster/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
process RATTLE_CLUSTER {
tag "$meta.id"
label 'process_low'

if (params.enable_conda) {
error "Conda environments are not set up for rattle (when this module was built). Please use docker or singularity containers."
}
container 'ecoflowucl/rattle:v1.0'

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

output:
tuple val(meta), path("clusters.out"), emit: clusters
path "versions.yml" , emit: versions

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

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def RATTLE_VERSION = "v1.0" // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
"""
rattle \\
cluster $args \\
-t $task.cpus \\
-i $reads

cat <<-END_VERSIONS > versions.yml
"${task.process}":
rattle: $RATTLE_VERSION
END_VERSIONS
"""

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

cat <<-END_VERSIONS > versions.yml
"${task.process}":
rattle: $RATTLE_VERSION
END_VERSIONS
"""
}
47 changes: 47 additions & 0 deletions modules/nf-core/rattle/cluster/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: "rattle_cluster"
description: Reference-free reconstruction and quantification of transcriptomes from
long-read sequencing
keywords:
- transcriptomes
- cluster
- nanopore
tools:
- "rattle":
description: "Reference-free reconstruction and quantification of transcriptomes
from long-read sequencing"
homepage: "https://github.com/comprna/RATTLE"
documentation: "https://github.com/comprna/RATTLE"
tool_dev_url: "https://github.com/comprna/RATTLE"
doi: "10.1186/s13059-022-02715-w"
licence: ["GPL-3.0"]
identifier: biotools:rattle
input:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1', suffix:'bacteria' ]`
- reads:
type: file
description: Input file in FASTA/FASTQ format.
pattern: "*.{fasta,fastq,fasta.gz,fastq.gz,fa,fq,fa.gz,fq.gz}"
output:
- clusters:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1', suffix:'bacteria' ]
- "clusters.out":
type: file
description: Output clusters in binary format.
pattern: "cluster.out"
- versions:
- versions.yml:
type: file
description: File containing software versions
pattern: "versions.yml"
authors:
- "@chriswyatt1"
maintainers:
- "@chriswyatt1"
34 changes: 34 additions & 0 deletions modules/nf-core/rattle/cluster/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "rattle"
tag "rattle/cluster"

test("test-rattle") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
[ file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/nanopore/fastq/test.fastq.gz', checkIfExists: true) ]
]

"""
}
}

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

}
37 changes: 37 additions & 0 deletions modules/nf-core/rattle/cluster/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"test-rattle": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"clusters.out:md5,809306985afaace6a2a107d33d4784c7"
]
],
"1": [
"versions.yml:md5,d8ac60817803edd53da602b602061e4d"
],
"clusters": [
[
{
"id": "test",
"single_end": false
},
"clusters.out:md5,809306985afaace6a2a107d33d4784c7"
]
],
"versions": [
"versions.yml:md5,d8ac60817803edd53da602b602061e4d"
]
}
],
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.4"
},
"timestamp": "2025-02-06T14:00:48.224614821"
}
}
Loading