-
Notifications
You must be signed in to change notification settings - Fork 1k
Add circlator/all module #11116
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
base: master
Are you sure you want to change the base?
Add circlator/all module #11116
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| channels: | ||
| - conda-forge | ||
| - bioconda | ||
| dependencies: | ||
| - "bioconda::circlator=1.5.5" |
| 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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would copy the fasta files into the base dir with 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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how many fasta files are actually being created? |
||
| """ | ||
| } | ||
| 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" |
| 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") { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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() } | ||
| ) | ||
| } | ||
| } | ||
| } | ||
| 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" | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can run
on this file to clean this up nicely.