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
5 changes: 5 additions & 0 deletions modules/nf-core/circlator/all/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
channels:
- conda-forge
- bioconda
dependencies:
- "bioconda::circlator=1.5.5"
40 changes: 40 additions & 0 deletions modules/nf-core/circlator/all/main.nf
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can run

nextflow lint -format -sort-declarations -spaces 4 -harshil-alignment

on this file to clean this up nicely.

Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
process CIRCLATOR_ALL {
tag "$meta.id"
label 'process_high'

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/circlator:1.5.5--py35_0':
'biocontainers/circlator:1.5.5--py35_0' }"

input:
tuple val(meta), path(assembly)
tuple val(meta2), path(reads)
Comment on lines +11 to +12
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we put all these inputs into one tuple? That will make sure you're sure that EVERY time everything comes together in the right combination.

Not 100% sure on this but if these things should match per sample I would do one input but if for example the reads stay consistent and only the assembly changes we can leave it as is :)


output:
tuple val(meta), path("${prefix}"), emit: results
tuple val(meta), path("${prefix}/*.fasta"), emit: fasta
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would copy the fasta files into the base dir with

mv ${prefix}/*.fasta *.fasta

and emit them directly that makes downstream easier I think

tuple val("${task.process}"), val('circlator'), eval("circlator version"), topic: versions, emit: versions_circlator

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

script:
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
"""
circlator all \\
$args \\
--threads $task.cpus \\
${assembly} \\
${reads} \\
${prefix}
"""

stub:
prefix = task.ext.prefix ?: "${meta.id}"
"""
mkdir -p ${prefix}
touch ${prefix}/06.fixstart.fasta
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how many fasta files are actually being created?

"""
}
94 changes: 94 additions & 0 deletions modules/nf-core/circlator/all/meta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: "circlator_all"
description: >
Runs the full Circlator pipeline to circularise genome assemblies from long reads.
Sequentially runs: mapreads, bam2reads, assemble, merge, clean, and fixstart.
keywords:
- circlator
- genome assembly
- circularisation
- long reads
- genomics
tools:
- "circlator":
description: "A tool to circularise genome assemblies using long sequencing reads."
homepage: "https://github.com/sanger-pathogens/circlator"
documentation: "https://github.com/sanger-pathogens/circlator/wiki"
tool_dev_url: "https://github.com/sanger-pathogens/circlator"
doi: "10.1186/s13059-015-0849-0"
licence:
- "GPL v3"
identifier: ""
input:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1' ]`
- assembly:
type: file
description: Input genome assembly in FASTA format
pattern: "*.{fasta,fa,fna}"
ontologies:
- edam: "http://edamontology.org/format_1929"
- - meta2:
type: map
description: |
Groovy Map containing sample information for reads
e.g. `[ id:'sample1' ]`
- reads:
type: file
description: Long reads in FASTA or FASTQ format (PacBio or Oxford
Nanopore)
pattern: "*.{fasta,fa,fastq,fq}"
ontologies:
- edam: "http://edamontology.org/format_1929"
- edam: "http://edamontology.org/format_1930"
output:
results:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1' ]`
- ${prefix}:
type: directory
description: Directory containing all intermediate and final output
files from Circlator
pattern: "*"
fasta:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. `[ id:'sample1' ]`
- ${prefix}/*.fasta:
type: file
description: Final circularised genome assembly in FASTA format
pattern: "*.fasta"
ontologies:
- edam: "http://edamontology.org/format_1929"
versions_circlator:
- - ${task.process}:
type: string
description: The name of the process
- circlator:
type: string
description: The name of the tool
- circlator 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
- circlator:
type: string
description: The name of the tool
- circlator version:
type: eval
description: The expression to obtain the version of the tool
authors:
- "@cwoodside1278"
maintainers:
- "@cwoodside1278"
33 changes: 33 additions & 0 deletions modules/nf-core/circlator/all/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
nextflow_process {
name "Test Process CIRCLATOR_ALL"
script "../main.nf"
process "CIRCLATOR_ALL"
tag "modules"
tag "modules_nfcore"
tag "circlator"
tag "circlator/all"

test("sarscov2 - fasta reads - stub") {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we only have the stub test here? :)

options "-stub"
when {
process {
"""
input[0] = [
[ id:'test' ],
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true)
]
input[1] = [
[ id:'test' ],
file(params.modules_testdata_base_path + 'genomics/sarscov2/nanopore/fastq/test.fastq.gz', checkIfExists: true)
]
"""
}
}
then {
assert process.success
assertAll(
{ assert snapshot(process.out).match() }
)
}
}
}
63 changes: 63 additions & 0 deletions modules/nf-core/circlator/all/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"sarscov2 - fasta reads - stub": {
"content": [
{
"0": [
[
{
"id": "test"
},
[
"06.fixstart.fasta:md5,d41d8cd98f00b204e9800998ecf8427e"
]
]
],
"1": [
[
{
"id": "test"
},
"06.fixstart.fasta:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"2": [
[
"CIRCLATOR_ALL",
"circlator",
"1.5.5"
]
],
"fasta": [
[
{
"id": "test"
},
"06.fixstart.fasta:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"results": [
[
{
"id": "test"
},
[
"06.fixstart.fasta:md5,d41d8cd98f00b204e9800998ecf8427e"
]
]
],
"versions_circlator": [
[
"CIRCLATOR_ALL",
"circlator",
"1.5.5"
]
]
}
],
"timestamp": "2026-03-22T18:50:56.053731566",
"meta": {
"nf-test": "0.9.4",
"nextflow": "25.10.4"
}
}
}
Loading