Skip to content
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

add module for stecfinder #2702

Merged
merged 4 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
34 changes: 34 additions & 0 deletions modules/nf-core/stecfinder/main.nf
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':
'quay.io/biocontainers/stecfinder:1.1.0--pyhdfd78af_0' }"
SPPearce marked this conversation as resolved.
Show resolved Hide resolved

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
"""
}
44 changes: 44 additions & 0 deletions modules/nf-core/stecfinder/meta.yml
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"
4 changes: 4 additions & 0 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3704,6 +3704,10 @@ star/starsolo:
- modules/nf-core/star/starsolo/**
- tests/modules/nf-core/star/starsolo/**

stecfinder:
- modules/nf-core/stecfinder/**
- tests/modules/nf-core/stecfinder/**

stitch:
- modules/nf-core/stitch/**
- tests/modules/nf-core/stitch/**
Expand Down
27 changes: 27 additions & 0 deletions tests/modules/nf-core/stecfinder/main.nf
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 )
}
9 changes: 9 additions & 0 deletions tests/modules/nf-core/stecfinder/nextflow.config
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'
}

}
17 changes: 17 additions & 0 deletions tests/modules/nf-core/stecfinder/test.yml
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
Loading