add module for pasty (#2003)

* add module for pasty

* run prettier

* line up those commas

* Update main.nf
master
Robert A. Petit III 2 years ago committed by GitHub
parent eae945721d
commit 3ef618fed2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,36 @@
process PASTY {
tag "$meta.id"
label 'process_single'
conda (params.enable_conda ? "bioconda::pasty=1.0.0" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/pasty:1.0.0--hdfd78af_0':
'quay.io/biocontainers/pasty:1.0.0--hdfd78af_0' }"
input:
tuple val(meta), path(fasta)
output:
tuple val(meta), path("${prefix}.tsv") , emit: tsv
tuple val(meta), path("${prefix}.blastn.tsv") , emit: blast
tuple val(meta), path("${prefix}.details.tsv"), emit: details
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}"
"""
pasty \\
$args \\
--prefix $prefix \\
--assembly $fasta
cat <<-END_VERSIONS > versions.yml
"${task.process}":
pasty: \$(echo \$(pasty --version 2>&1) | sed 's/^.*pasty, version //;' )
END_VERSIONS
"""
}

@ -0,0 +1,52 @@
name: "pasty"
description: Serogroup Pseudomonas aeruginosa assemblies
keywords:
- bacteria
- serogroup
- fasta
- assembly
tools:
- "pasty":
description: "A tool for in silico serogrouping of Pseudomonas aeruginosa isolates"
homepage: "https://github.com/rpetit3/pasty"
documentation: "https://github.com/rpetit3/pasty"
tool_dev_url: "https://github.com/rpetit3/pasty"
doi: ""
licence: "['Apache-2.0']"
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- fasta:
type: file
description: An assembly in FASTA format
pattern: "*.{fasta,fasta.gz,fna,fna.gz,fa,fa.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 file with the predicted serogroup
pattern: "*.tsv"
- blast:
type: file
description: A tab-delimited file of all blast hits
pattern: "*.blastn.tsv"
- details:
type: file
description: A tab-delimited file with details for each serogroup
pattern: "*.details.tsv"
authors:
- "@rpetit3"

@ -1707,6 +1707,10 @@ paraclu:
- modules/paraclu/**
- tests/modules/paraclu/**
pasty:
- modules/pasty/**
- tests/modules/pasty/**
pbbam/pbmerge:
- modules/pbbam/pbmerge/**
- tests/modules/pbbam/pbmerge/**

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

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

@ -0,0 +1,11 @@
- name: pasty test_pasty
command: nextflow run ./tests/modules/pasty -entry test_pasty -c ./tests/config/nextflow.config -c ./tests/modules/pasty/nextflow.config
tags:
- pasty
files:
- path: output/pasty/test.blastn.tsv
md5sum: 45de2825f0bb3cc8fe9f2b7c419f66f2
- path: output/pasty/test.details.tsv
md5sum: d6822beea048a27af839087dfc14a536
- path: output/pasty/test.tsv
md5sum: edbae35d3edc17283ea73f7f3eb22087
Loading…
Cancel
Save