add module for seroba (#1816)

* add module for seroba

* fix lint

* Update modules/seroba/run/meta.yml

Co-authored-by: Sébastien Guizard <sguizard@ed.ac.uk>

* Update modules/seroba/run/main.nf

Co-authored-by: Sébastien Guizard <sguizard@ed.ac.uk>
master
Robert A. Petit III 2 years ago committed by GitHub
parent 0a59baf293
commit e3e61068c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,39 @@
process SEROBA_RUN {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::seroba=1.0.2" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/seroba:1.0.2--pyhdfd78af_1':
'quay.io/biocontainers/seroba:1.0.2--pyhdfd78af_1' }"
input:
tuple val(meta), path(reads)
output:
tuple val(meta), path("${prefix}/${prefix}.tsv") , emit: tsv
tuple val(meta), path("${prefix}/detailed_serogroup_info.txt"), optional: true, emit: txt
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
"""
seroba \\
runSerotyping \\
$reads \\
$prefix \\
$args
# Avoid name collisions
mv ${prefix}/pred.tsv ${prefix}/${prefix}.tsv
cat <<-END_VERSIONS > versions.yml
"${task.process}":
seroba: \$(seroba version)
END_VERSIONS
"""
}

@ -0,0 +1,47 @@
name: "seroba_run"
description: Determine Streptococcus pneumoniae serotype from Illumina paired-end reads
keywords:
- fastq
- serotype
- Streptococcus pneumoniae
tools:
- "seroba":
description: "SeroBA is a k-mer based pipeline to identify the Serotype from Illumina NGS reads for given references."
homepage: "https://sanger-pathogens.github.io/seroba/"
documentation: "https://sanger-pathogens.github.io/seroba/"
tool_dev_url: "https://github.com/sanger-pathogens/seroba"
doi: "10.1099/mgen.0.000186"
licence: "['GPL v3']"
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- reads:
type: file
description: Input Illunina paired-end FASTQ files
pattern: "*.{fq.gz,fastq.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: The predicted serotype in tab-delimited format
pattern: "*.tsv"
- txt:
type: file
description: A detailed description of the predicted serotype
pattern: "*.txt"
authors:
- "@rpetit3"

@ -2183,6 +2183,10 @@ seqwish/induce:
- modules/seqwish/induce/**
- tests/modules/seqwish/induce/**
seroba/run:
- modules/seroba/run/**
- tests/modules/seroba/run/**
sexdeterrmine:
- modules/sexdeterrmine/**
- tests/modules/sexdeterrmine/**

@ -0,0 +1,15 @@
#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
include { SEROBA_RUN } from '../../../../modules/seroba/run/main.nf'
workflow test_seroba_run {
input = [ [ id:'test', single_end:false ], // meta map
[ file("https://github.com/nf-core/test-datasets/raw/bacass/ERR044595_1M_1.fastq.gz", checkIfExists: true),
file("https://github.com/nf-core/test-datasets/raw/bacass/ERR044595_1M_2.fastq.gz", checkIfExists: true) ]
]
SEROBA_RUN ( input )
}

@ -0,0 +1,5 @@
process {
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
}

@ -0,0 +1,8 @@
- name: seroba run test_seroba_run
command: nextflow run ./tests/modules/seroba/run -entry test_seroba_run -c ./tests/config/nextflow.config -c ./tests/modules/seroba/run/nextflow.config
tags:
- seroba
- seroba/run
files:
- path: output/seroba/test/test.tsv
md5sum: 28b2ce33df270172e6a39db4429e684b
Loading…
Cancel
Save