add module for legsta (#1319)

This commit is contained in:
Robert A. Petit III 2022-02-18 17:42:18 -07:00 committed by GitHub
parent 439763bf2c
commit 425939a108
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 108 additions and 0 deletions

33
modules/legsta/main.nf Normal file
View file

@ -0,0 +1,33 @@
process LEGSTA {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::legsta=0.5.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/legsta%3A0.5.1--hdfd78af_2':
'quay.io/biocontainers/legsta:0.5.1--hdfd78af_2' }"
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}"
"""
legsta \\
$args \\
$seqs > ${prefix}.tsv
cat <<-END_VERSIONS > versions.yml
"${task.process}":
legsta: \$(echo \$(legsta --version 2>&1) | sed 's/^.*legsta //; s/ .*\$//;')
END_VERSIONS
"""
}

42
modules/legsta/meta.yml Normal file
View file

@ -0,0 +1,42 @@
name: legsta
description: Typing of clinical and environmental isolates of Legionella pneumophila
keywords:
- bacteria
- legionella
tools:
- legsta:
description: In silico Legionella pneumophila Sequence Based Typing
homepage: https://github.com/tseemann/legsta
documentation: https://github.com/tseemann/legsta
tool_dev_url: https://github.com/tseemann/legsta
doi: ""
licence: ['GPL v3']
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- seqs:
type: file
description: FASTA, GenBank or EMBL formatted files
pattern: "*.{fasta,gbk,embl}"
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 summary of the results
pattern: "*.{tsv}"
authors:
- "@rpetit3"

View file

@ -892,6 +892,10 @@ leehom:
- modules/leehom/**
- tests/modules/leehom/**
legsta:
- modules/legsta/**
- tests/modules/legsta/**
lima:
- modules/lima/**
- tests/modules/lima/**

View file

@ -0,0 +1,15 @@
#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
include { LEGSTA } from '../../../modules/legsta/main.nf'
workflow test_legsta {
input = [
[ id:'test', single_end:false ], // meta map
file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true)
]
LEGSTA ( input )
}

View file

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

View file

@ -0,0 +1,9 @@
- name: legsta test_legsta
command: nextflow run tests/modules/legsta -entry test_legsta -c tests/config/nextflow.config
tags:
- legsta
files:
- path: output/legsta/test.tsv
md5sum: c493bdd19335de4828aa8b4e3ce7e1f8
- path: output/legsta/versions.yml
md5sum: d16c5f6fd68d2bcc2c71954e3342aabe