mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
add module for ssuisero (#1329)
* add module for ssuisero * Update main.nf * Update meta.yml Co-authored-by: Sateesh <33637490+sateeshperi@users.noreply.github.com>
This commit is contained in:
parent
55bee0b02e
commit
9e0abcc443
6 changed files with 120 additions and 0 deletions
44
modules/ssuissero/main.nf
Normal file
44
modules/ssuissero/main.nf
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
def VERSION = '1.0.1' // Version information not provided by tool on CLI
|
||||||
|
|
||||||
|
process SSUISSERO {
|
||||||
|
tag "$meta.id"
|
||||||
|
label 'process_low'
|
||||||
|
|
||||||
|
conda (params.enable_conda ? "bioconda::ssuissero=1.0.1" : null)
|
||||||
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
|
'https://depot.galaxyproject.org/singularity/ssuissero%3A1.0.1--hdfd78af_0':
|
||||||
|
'quay.io/biocontainers/ssuissero:1.0.1--hdfd78af_0' }"
|
||||||
|
|
||||||
|
input:
|
||||||
|
tuple val(meta), path(fasta)
|
||||||
|
|
||||||
|
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}"
|
||||||
|
def is_compressed = fasta.getName().endsWith(".gz") ? true : false
|
||||||
|
def fasta_name = fasta.getName().replace(".gz", "")
|
||||||
|
"""
|
||||||
|
if [ "$is_compressed" == "true" ]; then
|
||||||
|
gzip -c -d $fasta > $fasta_name
|
||||||
|
fi
|
||||||
|
|
||||||
|
SsuisSero.sh \\
|
||||||
|
-i $fasta_name \\
|
||||||
|
-o ./ \\
|
||||||
|
-s $prefix \\
|
||||||
|
-x fasta \\
|
||||||
|
-t $task.cpus
|
||||||
|
|
||||||
|
cat <<-END_VERSIONS > versions.yml
|
||||||
|
"${task.process}":
|
||||||
|
ssuissero: $VERSION
|
||||||
|
END_VERSIONS
|
||||||
|
"""
|
||||||
|
}
|
43
modules/ssuissero/meta.yml
Normal file
43
modules/ssuissero/meta.yml
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
name: ssuissero
|
||||||
|
description: Serotype prediction of Streptococcus suis assemblies
|
||||||
|
keywords:
|
||||||
|
- bacteria
|
||||||
|
- fasta
|
||||||
|
- streptococcus
|
||||||
|
tools:
|
||||||
|
- ssuissero:
|
||||||
|
description: Rapid Streptococcus suis serotyping pipeline for Nanopore Data
|
||||||
|
homepage: https://github.com/jimmyliu1326/SsuisSero
|
||||||
|
documentation: https://github.com/jimmyliu1326/SsuisSero
|
||||||
|
tool_dev_url: https://github.com/jimmyliu1326/SsuisSero
|
||||||
|
doi: ""
|
||||||
|
licence: ['MIT']
|
||||||
|
|
||||||
|
input:
|
||||||
|
- meta:
|
||||||
|
type: map
|
||||||
|
description: |
|
||||||
|
Groovy Map containing sample information
|
||||||
|
e.g. [ id:'test', single_end:false ]
|
||||||
|
- fasta:
|
||||||
|
type: file
|
||||||
|
description: Assembly in FASTA format
|
||||||
|
pattern: "*.{fasta,fasta.gz,fa,fa.gz,fna,fna.gz,faa,faa.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: Tab-delimited serotype prediction
|
||||||
|
pattern: "*.{tsv}"
|
||||||
|
|
||||||
|
authors:
|
||||||
|
- "@rpetit3"
|
|
@ -1537,6 +1537,10 @@ sratools/prefetch:
|
||||||
- modules/sratools/prefetch/**
|
- modules/sratools/prefetch/**
|
||||||
- tests/modules/sratools/prefetch/**
|
- tests/modules/sratools/prefetch/**
|
||||||
|
|
||||||
|
ssuissero:
|
||||||
|
- modules/ssuissero/**
|
||||||
|
- tests/modules/ssuissero/**
|
||||||
|
|
||||||
staphopiasccmec:
|
staphopiasccmec:
|
||||||
- modules/staphopiasccmec/**
|
- modules/staphopiasccmec/**
|
||||||
- tests/modules/staphopiasccmec/**
|
- tests/modules/staphopiasccmec/**
|
||||||
|
|
15
tests/modules/ssuissero/main.nf
Normal file
15
tests/modules/ssuissero/main.nf
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/usr/bin/env nextflow
|
||||||
|
|
||||||
|
nextflow.enable.dsl = 2
|
||||||
|
|
||||||
|
include { SSUISSERO } from '../../../modules/ssuissero/main.nf'
|
||||||
|
|
||||||
|
workflow test_ssuissero {
|
||||||
|
|
||||||
|
input = [
|
||||||
|
[ id:'test', single_end:false ], // meta map
|
||||||
|
file(params.test_data['haemophilus_influenzae']['genome']['genome_fna_gz'], checkIfExists: true)
|
||||||
|
]
|
||||||
|
|
||||||
|
SSUISSERO ( input )
|
||||||
|
}
|
5
tests/modules/ssuissero/nextflow.config
Normal file
5
tests/modules/ssuissero/nextflow.config
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
process {
|
||||||
|
|
||||||
|
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||||
|
|
||||||
|
}
|
9
tests/modules/ssuissero/test.yml
Normal file
9
tests/modules/ssuissero/test.yml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
- name: ssuissero test_ssuissero
|
||||||
|
command: nextflow run tests/modules/ssuissero -entry test_ssuissero -c tests/config/nextflow.config
|
||||||
|
tags:
|
||||||
|
- ssuissero
|
||||||
|
files:
|
||||||
|
- path: output/ssuissero/test_serotyping_res.tsv
|
||||||
|
md5sum: 559dd2ca386eeb58f3975e3204ce9d43
|
||||||
|
- path: output/ssuissero/versions.yml
|
||||||
|
md5sum: be29b478690b2047e0413ffe01c85e1e
|
Loading…
Reference in a new issue