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
6 changes: 6 additions & 0 deletions modules/nf-core/ciri2/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
channels:
- conda-forge
- bioconda
dependencies:
- "bioconda::ciri2=2.0.6=pl5321hdfd78af_0"
54 changes: 54 additions & 0 deletions modules/nf-core/ciri2/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@

process CIRI2 {
tag "$meta.id"
label 'process_single'


conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/ciri2:2.0.6--pl5321hdfd78af_0':
'quay.io/biocontainers/ciri2:2.0.6--pl5321hdfd78af_0' }"

input:
tuple val(meta), path(sam) // Required input sam_file
path fasta // optional reference fasta file
path annotation // optional GTF or GFF3 annotation file
path ref_dir // optional reference directory path

output:

tuple val(meta), path("*.txt"), emit: circrna
tuple val(meta), path("*.txt.log"), emit: log, optional: true
tuple val(meta), path("CIRIerror.log"), emit: error_log, optional: true

tuple val("${task.process}"), val('CIRI2.pl'), eval("CIRI2.pl --help | sed -n 's/^Version:\\s*//p'"), topic: versions, emit: versions_ciri2

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

script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
def anno = annotation ? "--anno ${annotation}" : ""
def reference = fasta ? "--ref_file ${fasta}" : "--ref_dir ${ref_dir}"

"""
CIRI2.pl \\
--in $sam \\
--out ${prefix}.txt \\
$reference \\
$anno \\
--thread_num $task.cpus \\
$args
"""

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

"""
echo $args

touch ${prefix}.txt
"""
}
103 changes: 103 additions & 0 deletions modules/nf-core/ciri2/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: "ciri2"
description: Circular RNA identification based on multiple seed matching
keywords:
- circRNA
- detection
- genomics
- transcriptomics
tools:
- "ciri2":
description: "CIRI2: Circular RNA identification based on multiple seed matching"
homepage: "https://ciri-cookbook.readthedocs.io/en/latest/CIRI2.html"
documentation: "https://ciri-cookbook.readthedocs.io/en/latest/CIRI2.html"
tool_dev_url: "https://github.com/bioinfo-biols/CIRI-full/tree/master/bin/CIRI_v2.0.6"
doi: "10.1093/bib/bbx014"
licence:
- "GPL-2.0-only"
identifier: "biotools:ciri2"
input:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1' ]`
- sam:
type: file
description: Raw SAM file from BWA
pattern: "*.{sam}"
ontologies:
- edam: "http://edamontology.org/format_3462"
- fasta:
type: file
description: Fasta file for reference sequence
pattern: "*.{fasta, fa}"
ontologies:
- edam: "http://edamontology.org/format_1929"
- annotation:
type: file
description: GTF or GFF3 annotation file
pattern: "*.{gtf, gff, gff3}"
ontologies:
- edam: "http://edamontology.org/format_2305"
- ref_dir:
type: directory
description: Directory containing reference files
output:
circrna:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1' ]`
- "*.txt":
type: file
description: Output file containing circRNA list
pattern: "*.{txt}"
ontologies: []
log:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1' ]`
- "*.txt.log":
type: file
description: Output log file
pattern: "*.{txt.log}"
ontologies: []
error_log:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1' ]`
- CIRIerror.log:
type: file
description: Output error log file
pattern: "CIRIerror.log"
ontologies: []
versions_ciri2:
- - ${task.process}:
type: string
description: The name of the process
- CIRI2.pl:
type: string
description: The name of the tool
- CIRI2.pl --help | sed -n 's/^Version:\s*//p':
type: eval
description: The expression to obtain the version of the tool
topics:
versions:
- - ${task.process}:
type: string
description: The name of the process
- CIRI2.pl:
type: string
description: The name of the tool
- CIRI2.pl --help | sed -n 's/^Version:\s*//p':
type: eval
description: The expression to obtain the version of the tool
authors:
- "@razmia02"
maintainers:
- "@razmia02"
85 changes: 85 additions & 0 deletions modules/nf-core/ciri2/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
nextflow_process {

name "Test Process CIRI2"
script "../main.nf"
process "CIRI2"
config "./nextflow.config"
tag "modules"
tag "modules_nfcore"
tag "ciri2"
tag "samtools/view"

setup {
run("SAMTOOLS_VIEW") {
script "../../samtools/view/main.nf"
process {
"""
input[0] = [
[ id:'test', single_end: false ],
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.rna.paired_end.bam', checkIfExists: true),
[]
]
input[1] = [
[ id:'fasta' ], file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true), [] ]
input[2] = [ [], [] ]
input[3] = [ [], [] ]
input[4] = []
"""
}
}
}

test("homo_sapiens - sam - pairedend") {
Comment thread
razmia02 marked this conversation as resolved.

when {
process {
"""
input[0] = SAMTOOLS_VIEW.out.sam
input[1] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
input[2] = []
input[3] = []
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
file(process.out.circrna[0][1]).name,
process.out.logfile ? file(process.out.logfile[0][1]).name : null,
process.out.findAll { key, val -> key.startsWith('versions') }
).match() }
)
}
}

test("homo_sapiens - sam - pairedend -- stub") {

options "-stub"

when {
process {
"""
input[0] = [
[ id:'test', single_end: false ],
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.rna.paired_end.bam', checkIfExists: true)
]
input[1] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
input[2] = []
input[3] = []
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(
process.out.circrna,
process.out.findAll { key, val -> key.startsWith('versions') }
).match() }
Comment thread
razmia02 marked this conversation as resolved.
)
}
}
}
49 changes: 49 additions & 0 deletions modules/nf-core/ciri2/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"homo_sapiens - sam - pairedend": {
"content": [
"test.txt",
null,
{
"versions_ciri2": [
[
"CIRI2",
"CIRI2.pl",
"2.0.6"
]
]
}
],
"timestamp": "2026-07-24T19:44:07.04302318",
"meta": {
"nf-test": "0.9.5",
"nextflow": "26.04.3"
}
},
"homo_sapiens - sam - pairedend -- stub": {
"content": [
[
[
{
"id": "test",
"single_end": false
},
"test.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
{
"versions_ciri2": [
[
"CIRI2",
"CIRI2.pl",
"2.0.6"
]
]
}
],
"timestamp": "2026-07-24T19:44:21.142901021",
"meta": {
"nf-test": "0.9.5",
"nextflow": "26.04.3"
}
}
}
5 changes: 5 additions & 0 deletions modules/nf-core/ciri2/tests/nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
process {
withName: 'SAMTOOLS_VIEW' {
ext.args = '--output-fmt sam'
}
}