From 883dc3ea615764a3d37d2b6d6111ed522e1f9ea9 Mon Sep 17 00:00:00 2001 From: razmia02 Date: Wed, 1 Jul 2026 21:36:35 +0500 Subject: [PATCH 1/4] Initial module setup --- modules/nf-core/ciri2/environment.yml | 10 +++ modules/nf-core/ciri2/main.nf | 83 ++++++++++++++++++++++++ modules/nf-core/ciri2/meta.yml | 78 ++++++++++++++++++++++ modules/nf-core/ciri2/tests/main.nf.test | 75 +++++++++++++++++++++ 4 files changed, 246 insertions(+) create mode 100644 modules/nf-core/ciri2/environment.yml create mode 100644 modules/nf-core/ciri2/main.nf create mode 100644 modules/nf-core/ciri2/meta.yml create mode 100644 modules/nf-core/ciri2/tests/main.nf.test diff --git a/modules/nf-core/ciri2/environment.yml b/modules/nf-core/ciri2/environment.yml new file mode 100644 index 000000000000..156e8cb6a259 --- /dev/null +++ b/modules/nf-core/ciri2/environment.yml @@ -0,0 +1,10 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json +channels: + - conda-forge + - bioconda +dependencies: + # TODO nf-core: List required Conda package(s). + # Software MUST be pinned to channel (i.e. "bioconda"), version (i.e. "1.10"). + # For Conda, the build (i.e. "h9402c20_2") must be EXCLUDED to support installation on different operating systems. + - "bioconda::ciri2=2.0.6" diff --git a/modules/nf-core/ciri2/main.nf b/modules/nf-core/ciri2/main.nf new file mode 100644 index 000000000000..d0e4b4519285 --- /dev/null +++ b/modules/nf-core/ciri2/main.nf @@ -0,0 +1,83 @@ +// TODO nf-core: If in doubt look at other nf-core/modules to see how we are doing things! :) +// https://github.com/nf-core/modules/tree/master/modules/nf-core/ +// You can also ask for help via your pull request or on the #modules channel on the nf-core Slack workspace: +// https://nf-co.re/join +// TODO nf-core: A module file SHOULD only define input and output files as command-line parameters. +// All other parameters MUST be provided using the "task.ext" directive, see here: +// https://www.nextflow.io/docs/latest/process.html#ext +// where "task.ext" is a string. +// Any parameters that need to be evaluated in the context of a particular sample +// e.g. single-end/paired-end data MUST also be defined and evaluated appropriately. +// TODO nf-core: Software that can be piped together SHOULD be added to separate module files +// unless there is a run-time, storage advantage in implementing in this way +// e.g. it's ok to have a single module for bwa to output BAM instead of SAM: +// bwa mem | samtools view -B -T ref.fasta +// TODO nf-core: Optional inputs are not currently supported by Nextflow. However, using an empty +// list (`[]`) instead of a file can be used to work around this issue. + +process CIRI2 { + tag "$meta.id" + label 'process_single' + + // TODO nf-core: See section in main README for further information regarding finding and adding container addresses to the section below. + 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': + 'quay.io/biocontainers/ciri2' }" + + input:// TODO nf-core: Where applicable all sample-specific information e.g. "id", "single_end", "read_group" + // MUST be provided as an input via a Groovy Map called "meta". + // This information may not be required in some instances e.g. indexing reference genome files: + // https://github.com/nf-core/modules/blob/master/modules/nf-core/bwa/index/main.nf + // TODO nf-core: Where applicable please provide/convert compressed files as input/output + // e.g. "*.fastq.gz" and NOT "*.fastq", "*.bam" and NOT "*.sam" etc. + tuple val(meta), path(bam) + + output: + // TODO nf-core: Named file extensions MUST be emitted for ALL output channels + tuple val(meta), path("*.bam"), emit: bam + // TODO nf-core: List additional required output channels/values here + // TODO nf-core: Update the command here to obtain the version number of the software used in this module + // TODO nf-core: If multiple software packages are used in this module, all MUST be added here + // by copying the line below and replacing the current tool with the extra tool(s) + tuple val("${task.process}"), val('ciri2'), eval("ciri2 --version"), 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}" + // TODO nf-core: Where possible, a command MUST be provided to obtain the version number of the software e.g. 1.10 + // If the software is unable to output a version number on the command-line then it can be manually specified + // e.g. https://github.com/nf-core/modules/blob/master/modules/nf-core/homer/annotatepeaks/main.nf + // Each software used MUST provide the software name and version number in the YAML version file (versions.yml) + // TODO nf-core: It MUST be possible to pass additional parameters to the tool as a command-line string via the "task.ext.args" directive + // TODO nf-core: If the tool supports multi-threading then you MUST provide the appropriate parameter + // using the Nextflow "task" variable e.g. "--threads $task.cpus" + // TODO nf-core: Please replace the example samtools command below with your module's command + // TODO nf-core: Please indent the command appropriately (4 spaces!!) to help with readability ;) + """ + ciri2 \\ + $args \\ + -@ $task.cpus \\ + -o ${prefix}.bam \\ + $bam + """ + + stub: + def args = task.ext.args ?: '' + def prefix = task.ext.prefix ?: "${meta.id}" + // TODO nf-core: A stub section should mimic the execution of the original module as best as possible + // Have a look at the following examples: + // Simple example: https://github.com/nf-core/modules/blob/624977dfaf562211e68a8a868ca80acc8461f1ac/modules/nf-core/cutadapt/main.nf#L34-L46 + // Complex example: https://github.com/nf-core/modules/blob/88d43dad73a675e66bff49ebb57fe657a5909018/modules/nf-core/bedtools/split/main.nf#L32-L43 + // TODO nf-core: If the module doesn't use arguments ($args), you SHOULD remove: + // - The definition of args `def args = task.ext.args ?: ''` above. + // - The use of the variable in the script `echo $args ` below. + """ + echo $args + + touch ${prefix}.bam + """ +} diff --git a/modules/nf-core/ciri2/meta.yml b/modules/nf-core/ciri2/meta.yml new file mode 100644 index 000000000000..ac860150b6b0 --- /dev/null +++ b/modules/nf-core/ciri2/meta.yml @@ -0,0 +1,78 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json +# # TODO nf-core: Add a description of the module and list keywords +name: "ciri2" +description: Circular RNA identification based on multiple seed matching +keywords: + - circRNA + - detection + - genomics + - transcriptomics +tools: + ## TODO nf-core: Add a description and other details for the software below + - "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"] + identifier: "biotools:ciri" + +input: + ### TODO nf-core: Add a description of all of the variables used as input + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1' ]` + - bam: + type: file + description: Sorted BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + ontologies: + - edam: "http://edamontology.org/format_2572" # BAM + - edam: "http://edamontology.org/format_2573" # CRAM + - edam: "http://edamontology.org/format_3462" # SAM + +output: + ### TODO nf-core: Add a description of all of the variables used as output + bam: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1' ]` + - "*.bam": + type: file + description: Sorted BAM/CRAM/SAM file + pattern: "*.{bam,cram,sam}" + ontologies: + - edam: "http://edamontology.org/format_2572" # BAM + - edam: "http://edamontology.org/format_2573" # CRAM + - edam: "http://edamontology.org/format_3462" # SAM + versions_ciri2: + - - "${task.process}": + type: string + description: The name of the process + - "ciri2": + type: string + description: The name of the tool + - "ciri2 --version": + 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: + type: string + description: The name of the tool + - ciri2 --version: + type: eval + description: The expression to obtain the version of the tool +authors: + - "@razmia02" +maintainers: + - "@razmia02" diff --git a/modules/nf-core/ciri2/tests/main.nf.test b/modules/nf-core/ciri2/tests/main.nf.test new file mode 100644 index 000000000000..a357a6490d22 --- /dev/null +++ b/modules/nf-core/ciri2/tests/main.nf.test @@ -0,0 +1,75 @@ +// TODO nf-core: Once you have added the required tests, please run the following command to build this file: +// nf-core modules test ciri2 +nextflow_process { + + name "Test Process CIRI2" + script "../main.nf" + process "CIRI2" + + tag "modules" + tag "modules_nfcore" + tag "ciri2" + + // TODO nf-core: Change the test name preferably indicating the test-data and file-format used + test("sarscov2 - bam") { + + // TODO nf-core: If you are created a test for a chained module + // (the module requires running more than one process to generate the required output) + // add the 'setup' method here. + // You can find more information about how to use a 'setup' method in the nf-test docs (https://www.nf-test.com/docs/testcases/setup/). + + when { + process { + """ + // TODO nf-core: define inputs of the process here. Example: + + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + ] + """ + } + } + + then { + assert process.success + assertAll( + { assert snapshot( + process.out, + process.out.findAll { key, val -> key.startsWith('versions') } + ).match() } + //TODO nf-core: Add all required assertions to verify the test output. + // See https://nf-co.re/docs/developing/testing/assertions for more information and examples. + ) + } + + } + + // TODO nf-core: Change the test name preferably indicating the test-data and file-format used but keep the " - stub" suffix. + test("sarscov2 - bam - stub") { + + options "-stub" + + when { + process { + """ + // TODO nf-core: define inputs of the process here. Example: + + input[0] = [ + [ id:'test' ], + file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), + ] + """ + } + } + + then { + assert process.success + assertAll( + { assert snapshot(process.out).match() } + ) + } + + } + +} From ddbaf9d5c8e31154a4b6cdc4edc06827dde8ff90 Mon Sep 17 00:00:00 2001 From: razmia02 Date: Wed, 1 Jul 2026 22:05:32 +0500 Subject: [PATCH 2/4] Initial module setup --- modules/nf-core/ciri2/meta.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/nf-core/ciri2/meta.yml b/modules/nf-core/ciri2/meta.yml index ac860150b6b0..c3d2c16aa888 100644 --- a/modules/nf-core/ciri2/meta.yml +++ b/modules/nf-core/ciri2/meta.yml @@ -15,8 +15,8 @@ tools: 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"] - identifier: "biotools:ciri" + licence: ["GPL-2.0-only"] + identifier: "" input: ### TODO nf-core: Add a description of all of the variables used as input From 239f66b4fdef754cf282a10f48f1d761b5336342 Mon Sep 17 00:00:00 2001 From: razmia02 Date: Fri, 3 Jul 2026 02:39:40 +0500 Subject: [PATCH 3/4] Added input & output channels --- modules/nf-core/ciri2/environment.yml | 3 --- modules/nf-core/ciri2/main.nf | 17 ++++++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/nf-core/ciri2/environment.yml b/modules/nf-core/ciri2/environment.yml index 156e8cb6a259..bb298e178f57 100644 --- a/modules/nf-core/ciri2/environment.yml +++ b/modules/nf-core/ciri2/environment.yml @@ -4,7 +4,4 @@ channels: - conda-forge - bioconda dependencies: - # TODO nf-core: List required Conda package(s). - # Software MUST be pinned to channel (i.e. "bioconda"), version (i.e. "1.10"). - # For Conda, the build (i.e. "h9402c20_2") must be EXCLUDED to support installation on different operating systems. - "bioconda::ciri2=2.0.6" diff --git a/modules/nf-core/ciri2/main.nf b/modules/nf-core/ciri2/main.nf index d0e4b4519285..bf3a93ac5a92 100644 --- a/modules/nf-core/ciri2/main.nf +++ b/modules/nf-core/ciri2/main.nf @@ -22,8 +22,8 @@ process CIRI2 { // TODO nf-core: See section in main README for further information regarding finding and adding container addresses to the section below. 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': - 'quay.io/biocontainers/ciri2' }" + 'https://depot.galaxyproject.org/singularity/ciri2:2.0.6--pl5321hdfd78af_0': + 'quay.io/biocontainers/ciri2:2.0.6--pl5321hdfd78af_0' }" input:// TODO nf-core: Where applicable all sample-specific information e.g. "id", "single_end", "read_group" // MUST be provided as an input via a Groovy Map called "meta". @@ -31,12 +31,16 @@ process CIRI2 { // https://github.com/nf-core/modules/blob/master/modules/nf-core/bwa/index/main.nf // TODO nf-core: Where applicable please provide/convert compressed files as input/output // e.g. "*.fastq.gz" and NOT "*.fastq", "*.bam" and NOT "*.sam" etc. - tuple val(meta), path(bam) + tuple val(meta), path(sam) // Required -I sam_file + path fasta // optional -F reference fasta file + path annotation // optional -A GTF or GFF3 annotation file + path ref_dir // optional -R reference directory path output: // TODO nf-core: Named file extensions MUST be emitted for ALL output channels - tuple val(meta), path("*.bam"), emit: bam - // TODO nf-core: List additional required output channels/values here + tuple val(meta), path("*.txt"), emit: circrna + tuple val(meta), path("*.log"), emit: logfile, optional: true + // TODO nf-core: Update the command here to obtain the version number of the software used in this module // TODO nf-core: If multiple software packages are used in this module, all MUST be added here // by copying the line below and replacing the current tool with the extra tool(s) @@ -61,8 +65,7 @@ process CIRI2 { ciri2 \\ $args \\ -@ $task.cpus \\ - -o ${prefix}.bam \\ - $bam + -o ${prefix}.txt \\ """ stub: From 2a7de5b87931a9381a60ad835a9c529e27e0d2c6 Mon Sep 17 00:00:00 2001 From: razmia02 Date: Fri, 3 Jul 2026 22:19:41 +0500 Subject: [PATCH 4/4] Updated main.nf & meta.yml --- modules/nf-core/ciri2/main.nf | 15 +++++--- modules/nf-core/ciri2/meta.yml | 68 ++++++++++++++++++++-------------- 2 files changed, 51 insertions(+), 32 deletions(-) diff --git a/modules/nf-core/ciri2/main.nf b/modules/nf-core/ciri2/main.nf index bf3a93ac5a92..03a90da2ef69 100644 --- a/modules/nf-core/ciri2/main.nf +++ b/modules/nf-core/ciri2/main.nf @@ -52,6 +52,8 @@ process CIRI2 { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + def anno = annotation ? "-A ${annotation}" : "" + def reference = fasta ? "-F ${fasta}" : "-R ${ref_dir}" // TODO nf-core: Where possible, a command MUST be provided to obtain the version number of the software e.g. 1.10 // If the software is unable to output a version number on the command-line then it can be manually specified // e.g. https://github.com/nf-core/modules/blob/master/modules/nf-core/homer/annotatepeaks/main.nf @@ -62,10 +64,13 @@ process CIRI2 { // TODO nf-core: Please replace the example samtools command below with your module's command // TODO nf-core: Please indent the command appropriately (4 spaces!!) to help with readability ;) """ - ciri2 \\ - $args \\ - -@ $task.cpus \\ - -o ${prefix}.txt \\ + perl CIRI2.pl \\ + -I $sam \\ + -O ${prefix}.txt \\ + $reference \\ + $anno \\ + -T $task.cpus \\ + $args """ stub: @@ -81,6 +86,6 @@ process CIRI2 { """ echo $args - touch ${prefix}.bam + touch ${prefix}.txt """ } diff --git a/modules/nf-core/ciri2/meta.yml b/modules/nf-core/ciri2/meta.yml index c3d2c16aa888..bf0af47af4f6 100644 --- a/modules/nf-core/ciri2/meta.yml +++ b/modules/nf-core/ciri2/meta.yml @@ -1,5 +1,3 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json -# # TODO nf-core: Add a description of the module and list keywords name: "ciri2" description: Circular RNA identification based on multiple seed matching keywords: @@ -8,59 +6,75 @@ keywords: - genomics - transcriptomics tools: - ## TODO nf-core: Add a description and other details for the software below - "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: "" - + licence: + - "GPL-2.0-only" + identifier: "biotools:ciri2" input: - ### TODO nf-core: Add a description of all of the variables used as input - - meta: type: map description: | Groovy Map containing sample information e.g. `[ id:'sample1' ]` - - bam: + - sam: type: file - description: Sorted BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" + description: Raw SAM file from BWA + pattern: "*.{sam}" ontologies: - - edam: "http://edamontology.org/format_2572" # BAM - - edam: "http://edamontology.org/format_2573" # CRAM - - edam: "http://edamontology.org/format_3462" # SAM - + - 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: - ### TODO nf-core: Add a description of all of the variables used as output - bam: + circrna: - - meta: type: map description: | Groovy Map containing sample information e.g. `[ id:'sample1' ]` - - "*.bam": + - "*.txt": type: file - description: Sorted BAM/CRAM/SAM file - pattern: "*.{bam,cram,sam}" - ontologies: - - edam: "http://edamontology.org/format_2572" # BAM - - edam: "http://edamontology.org/format_2573" # CRAM - - edam: "http://edamontology.org/format_3462" # SAM + description: Output file containing circRNA list + pattern: "*.{txt}" + ontologies: [] versions_ciri2: - - - "${task.process}": + - - ${task.process}: type: string description: The name of the process - - "ciri2": + - ciri2: type: string description: The name of the tool - - "ciri2 --version": + - ciri2 --version: type: eval description: The expression to obtain the version of the tool - + logfile: + - - meta: + type: map + description: | + Groovy Map containing sample information + e.g. `[ id:'sample1' ]` + - "*.log": + type: file + description: Output logfile + pattern: "*.{log}" + ontologies: [] topics: versions: - - ${task.process}: