-
Notifications
You must be signed in to change notification settings - Fork 1k
Add module for Circlator (all) #11013
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
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,7 @@ | ||
| --- | ||
| # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/environment-schema.json | ||
| channels: | ||
| - conda-forge | ||
| - bioconda | ||
| dependencies: | ||
| - "bioconda::any2fasta=0.8.1" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| process ANY2FASTA { | ||
| tag "$meta.id" | ||
| label 'process_single' | ||
|
|
||
| conda "${moduleDir}/environment.yml" | ||
| container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
| 'https://depot.galaxyproject.org/singularity/any2fasta:0.8.1--hdfd78af_0' : | ||
| 'biocontainers/any2fasta:0.8.1--hdfd78af_0' }" | ||
|
|
||
| input: | ||
| tuple val(meta), path(sequence) | ||
|
|
||
| output: | ||
| tuple val(meta), path("*.fasta"), emit: fasta | ||
| tuple val("${task.process}"), val('any2fasta'), eval("any2fasta -v 2>&1 | head -1 | sed 's/any2fasta //'"), topic: versions, emit: versions_any2fasta | ||
|
|
||
| when: | ||
| task.ext.when == null || task.ext.when | ||
|
|
||
| script: | ||
| def args = task.ext.args ?: '' | ||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||
| """ | ||
| any2fasta \\ | ||
| $args \\ | ||
| ${sequence} \\ | ||
| > ${prefix}.fasta | ||
| """ | ||
|
|
||
| stub: | ||
| def args = task.ext.args ?: '' | ||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||
| """ | ||
| touch ${prefix}.fasta | ||
| """ | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| # yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/meta-schema.json | ||
| name: "any2fasta" | ||
| description: Convert various sequence formats (GenBank, GFF, FASTQ, FASTA, CLUSTAL, Stockholm, GFA) to FASTA format. Input files may be gzip, bzip2, zip, or zstd compressed. | ||
| keywords: | ||
| - fasta | ||
| - conversion | ||
| - sequences | ||
| - format | ||
| - genomics | ||
| tools: | ||
| - "any2fasta": | ||
| description: "Convert various sequence formats to FASTA" | ||
| homepage: "https://github.com/tseemann/any2fasta" | ||
| documentation: "https://github.com/tseemann/any2fasta" | ||
| tool_dev_url: "https://github.com/tseemann/any2fasta" | ||
| licence: | ||
| - "GPL-3.0" | ||
| identifier: biotools:any2fasta | ||
|
|
||
| input: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. `[ id:'sample1' ]` | ||
| - sequence: | ||
| type: file | ||
| description: | | ||
| Input sequence file in any supported format (GenBank, GFF, FASTQ, FASTA, | ||
| CLUSTAL, Stockholm, GFA). May be gzip, bzip2, zip, or zstd compressed. | ||
| pattern: "*.{gb,gbk,fa,fasta,fna,fq,fastq,gff,gfa,clw,sth,gb.gz,gbk.gz,fa.gz,fasta.gz,fq.gz,fastq.gz}" | ||
|
|
||
| output: | ||
| fasta: | ||
| - - meta: | ||
| type: map | ||
| description: | | ||
| Groovy Map containing sample information | ||
| e.g. `[ id:'sample1' ]` | ||
| - "*.fasta": | ||
| type: file | ||
| description: Output sequences in FASTA format | ||
| pattern: "*.fasta" | ||
| versions_any2fasta: | ||
| - - ${task.process}: | ||
| type: string | ||
| description: The name of the process | ||
| - any2fasta: | ||
| type: string | ||
| description: The name of the tool | ||
| - "any2fasta -v 2>&1 | head -1 | sed 's/any2fasta //'": | ||
| type: eval | ||
| description: The expression to obtain the version of the tool | ||
|
|
||
| topics: | ||
| versions: | ||
| - - ${task.process}: | ||
| type: string | ||
| description: The name of the process | ||
| - any2fasta: | ||
| type: string | ||
| description: The name of the tool | ||
| - "any2fasta -v 2>&1 | head -1 | sed 's/any2fasta //'": | ||
| 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,85 @@ | ||||||||||
| nextflow_process { | ||||||||||
|
|
||||||||||
| name "Test Process ANY2FASTA" | ||||||||||
| script "../main.nf" | ||||||||||
| process "ANY2FASTA" | ||||||||||
|
|
||||||||||
| tag "modules" | ||||||||||
| tag "modules_nfcore" | ||||||||||
| tag "any2fasta" | ||||||||||
|
|
||||||||||
| test("sarscov2 - fastq.gz") { | ||||||||||
|
|
||||||||||
| when { | ||||||||||
| process { | ||||||||||
| """ | ||||||||||
| input[0] = [ | ||||||||||
| [ id:'test', single_end:true ], | ||||||||||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), | ||||||||||
| ] | ||||||||||
| """ | ||||||||||
| } | ||||||||||
| } | ||||||||||
|
|
||||||||||
| then { | ||||||||||
| assert process.success | ||||||||||
| assertAll( | ||||||||||
| { assert snapshot( | ||||||||||
| process.out | ||||||||||
| ).match() } | ||||||||||
|
Comment on lines
+27
to
+29
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. You can use to clean up the snapshot using nft-utils. It is used to clean process and workflow outputs by removing the numbered keys. This will create snapshots that are more easy to read by humans.
Suggested change
|
||||||||||
| ) | ||||||||||
| } | ||||||||||
|
|
||||||||||
| } | ||||||||||
|
|
||||||||||
| test("sarscov2 - fasta") { | ||||||||||
|
|
||||||||||
| when { | ||||||||||
| process { | ||||||||||
| """ | ||||||||||
| input[0] = [ | ||||||||||
| [ id:'test', single_end:true ], | ||||||||||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true), | ||||||||||
| ] | ||||||||||
| """ | ||||||||||
| } | ||||||||||
| } | ||||||||||
|
|
||||||||||
| then { | ||||||||||
| assert process.success | ||||||||||
| assertAll( | ||||||||||
| { assert snapshot( | ||||||||||
| process.out | ||||||||||
| ).match() } | ||||||||||
|
Comment on lines
+51
to
+53
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.
Suggested change
|
||||||||||
| ) | ||||||||||
| } | ||||||||||
|
|
||||||||||
| } | ||||||||||
|
|
||||||||||
| test("sarscov2 - fastq.gz - stub") { | ||||||||||
|
|
||||||||||
| options "-stub" | ||||||||||
|
|
||||||||||
| when { | ||||||||||
| process { | ||||||||||
| """ | ||||||||||
| input[0] = [ | ||||||||||
| [ id:'test', single_end:true ], | ||||||||||
| file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), | ||||||||||
| ] | ||||||||||
| """ | ||||||||||
| } | ||||||||||
| } | ||||||||||
|
|
||||||||||
| then { | ||||||||||
| assert process.success | ||||||||||
| assertAll( | ||||||||||
| { assert snapshot( | ||||||||||
| process.out | ||||||||||
| ).match() } | ||||||||||
|
Comment on lines
+77
to
+79
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.
Suggested change
|
||||||||||
| ) | ||||||||||
| } | ||||||||||
|
|
||||||||||
| } | ||||||||||
|
|
||||||||||
| } | ||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,131 @@ | ||
| { | ||
| "sarscov2 - fastq.gz": { | ||
| "content": [ | ||
| { | ||
| "0": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": true | ||
| }, | ||
| "test.fasta:md5,f0c5c9110ce19e9ebbc9a6b6baf9e105" | ||
| ] | ||
| ], | ||
| "1": [ | ||
| [ | ||
| "ANY2FASTA", | ||
| "any2fasta", | ||
| "0.8.1" | ||
| ] | ||
| ], | ||
| "fasta": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": true | ||
| }, | ||
| "test.fasta:md5,f0c5c9110ce19e9ebbc9a6b6baf9e105" | ||
| ] | ||
| ], | ||
| "versions_any2fasta": [ | ||
| [ | ||
| "ANY2FASTA", | ||
| "any2fasta", | ||
| "0.8.1" | ||
| ] | ||
| ] | ||
| } | ||
| ], | ||
| "timestamp": "2026-03-20T22:41:21.33769732", | ||
| "meta": { | ||
| "nf-test": "0.9.4", | ||
| "nextflow": "25.10.4" | ||
| } | ||
| }, | ||
| "sarscov2 - fastq.gz - stub": { | ||
| "content": [ | ||
| { | ||
| "0": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": true | ||
| }, | ||
| "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
| ] | ||
| ], | ||
| "1": [ | ||
| [ | ||
| "ANY2FASTA", | ||
| "any2fasta", | ||
| "0.8.1" | ||
| ] | ||
| ], | ||
| "fasta": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": true | ||
| }, | ||
| "test.fasta:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
| ] | ||
| ], | ||
| "versions_any2fasta": [ | ||
| [ | ||
| "ANY2FASTA", | ||
| "any2fasta", | ||
| "0.8.1" | ||
| ] | ||
| ] | ||
| } | ||
| ], | ||
| "timestamp": "2026-03-20T22:41:37.656452506", | ||
| "meta": { | ||
| "nf-test": "0.9.4", | ||
| "nextflow": "25.10.4" | ||
| } | ||
| }, | ||
| "sarscov2 - fasta": { | ||
| "content": [ | ||
| { | ||
| "0": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": true | ||
| }, | ||
| "test.fasta:md5,6e9fe4042a72f2345f644f239272b7e6" | ||
| ] | ||
| ], | ||
| "1": [ | ||
| [ | ||
| "ANY2FASTA", | ||
| "any2fasta", | ||
| "0.8.1" | ||
| ] | ||
| ], | ||
| "fasta": [ | ||
| [ | ||
| { | ||
| "id": "test", | ||
| "single_end": true | ||
| }, | ||
| "test.fasta:md5,6e9fe4042a72f2345f644f239272b7e6" | ||
| ] | ||
| ], | ||
| "versions_any2fasta": [ | ||
| [ | ||
| "ANY2FASTA", | ||
| "any2fasta", | ||
| "0.8.1" | ||
| ] | ||
| ] | ||
| } | ||
| ], | ||
| "timestamp": "2026-03-20T22:41:29.533525971", | ||
| "meta": { | ||
| "nf-test": "0.9.4", | ||
| "nextflow": "25.10.4" | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| channels: | ||
| - conda-forge | ||
| - bioconda | ||
| dependencies: | ||
| - "bioconda::circlator=1.5.5" |
|
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. You can run nextflow lint -format -sort-declarations -spaces 4 -harshil-alignmenton 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
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. |
||
|
|
||
| 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. Can we move the output fasta out of that folder and emit just the fasta? What are other outputs of this module? |
||
| 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 | ||
| """ | ||
| } | ||
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.