-
Notifications
You must be signed in to change notification settings - Fork 661
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add module for stecfinder * make prettier * Update modules/nf-core/stecfinder/main.nf --------- Co-authored-by: Simon Pearce <24893913+SPPearce@users.noreply.github.com>
- Loading branch information
Showing
6 changed files
with
135 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
process STECFINDER { | ||
tag "$meta.id" | ||
label 'process_low' | ||
|
||
conda "bioconda::stecfinder=1.1.0" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/stecfinder:1.1.0--pyhdfd78af_0': | ||
'biocontainers/stecfinder:1.1.0--pyhdfd78af_0' }" | ||
|
||
input: | ||
tuple val(meta), path(seqs) | ||
|
||
output: | ||
tuple val(meta), path("*.tsv"), emit: tsv | ||
path "versions.yml" , emit: versions | ||
|
||
when: | ||
task.ext.when == null || task.ext.when | ||
|
||
script: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
""" | ||
stecfinder \\ | ||
-i $seqs \\ | ||
$args \\ | ||
-t $task.cpus > ${prefix}.tsv | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
stecfinder: \$(echo \$(stecfinder --version 2>&1) | sed 's/^.*STECFinder version: //;' ) | ||
END_VERSIONS | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: "stecfinder" | ||
description: Serotype STEC samples from paired-end reads or assemblies | ||
keywords: | ||
- serotype | ||
- Escherichia coli | ||
- fastq | ||
- fasta | ||
tools: | ||
- "stecfinder": | ||
description: "Cluster informed Shigatoxin producing E. coli (STEC) serotyping tool from Illumina reads and assemblies" | ||
homepage: "https://github.com/LanLab/STECFinder" | ||
documentation: "https://github.com/LanLab/STECFinder" | ||
tool_dev_url: "https://github.com/LanLab/STECFinder" | ||
doi: "10.3389/fcimb.2021.772574" | ||
licence: "['GPL v3']" | ||
|
||
input: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. [ id:'test', single_end:false ] | ||
- seqs: | ||
type: file | ||
description: Illumina paired-end reads or an assembly | ||
pattern: "*.{fastq.gz,fasta.gz,fna.gz}" | ||
|
||
output: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. [ id:'test', single_end:false ] | ||
- versions: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
- tsv: | ||
type: file | ||
description: A tab-delimited report of results | ||
pattern: "*.tsv" | ||
|
||
authors: | ||
- "@rpetit3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env nextflow | ||
|
||
nextflow.enable.dsl = 2 | ||
|
||
include { STECFINDER } from '../../../../modules/nf-core/stecfinder/main.nf' | ||
include { STECFINDER as STECFINDER_READS } from '../../../../modules/nf-core/stecfinder/main.nf' | ||
|
||
workflow test_stecfinder_fasta { | ||
|
||
input = [ | ||
[ id:'test', single_end:false ], // meta map | ||
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) | ||
] | ||
|
||
STECFINDER ( input ) | ||
} | ||
|
||
workflow test_stecfinder_reads { | ||
|
||
input = [ | ||
[ id:'test', single_end:false ], // meta map | ||
[ file(params.test_data['sarscov2']['illumina']['test_1_fastq_gz'], checkIfExists: true), | ||
file(params.test_data['sarscov2']['illumina']['test_2_fastq_gz'], checkIfExists: true) ], | ||
] | ||
|
||
STECFINDER_READS ( input ) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
process { | ||
|
||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } | ||
|
||
withName: STECFINDER_READS { | ||
ext.args = '-r' | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
- name: stecfinder test_stecfinder_fasta | ||
command: nextflow run ./tests/modules/nf-core/stecfinder -entry test_stecfinder_fasta -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/stecfinder/nextflow.config | ||
tags: | ||
- stecfinder | ||
files: | ||
- path: output/stecfinder/test.tsv | ||
md5sum: c17e1e69728b48c06c47a7d10086f1da | ||
- path: output/stecfinder/versions.yml | ||
|
||
- name: stecfinder test_stecfinder_reads | ||
command: nextflow run ./tests/modules/nf-core/stecfinder -entry test_stecfinder_reads -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/stecfinder/nextflow.config | ||
tags: | ||
- stecfinder | ||
files: | ||
- path: output/stecfinder/test.tsv | ||
md5sum: f0a5c4e3509bc8bd03f09aa21c31c526 | ||
- path: output/stecfinder/versions.yml |