mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-21 18:58:16 +00:00
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>
This commit is contained in:
parent
0a59baf293
commit
e3e61068c1
6 changed files with 118 additions and 0 deletions
39
modules/seroba/run/main.nf
Normal file
39
modules/seroba/run/main.nf
Normal file
|
@ -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
|
||||
"""
|
||||
}
|
47
modules/seroba/run/meta.yml
Normal file
47
modules/seroba/run/meta.yml
Normal file
|
@ -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/**
|
||||
|
|
15
tests/modules/seroba/run/main.nf
Normal file
15
tests/modules/seroba/run/main.nf
Normal file
|
@ -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 )
|
||||
}
|
5
tests/modules/seroba/run/nextflow.config
Normal file
5
tests/modules/seroba/run/nextflow.config
Normal file
|
@ -0,0 +1,5 @@
|
|||
process {
|
||||
|
||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
|
||||
}
|
8
tests/modules/seroba/run/test.yml
Normal file
8
tests/modules/seroba/run/test.yml
Normal file
|
@ -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…
Reference in a new issue