mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 02:58:17 +00:00
add module for pasty (#2003)
* add module for pasty * run prettier * line up those commas * Update main.nf
This commit is contained in:
parent
eae945721d
commit
3ef618fed2
6 changed files with 121 additions and 0 deletions
36
modules/pasty/main.nf
Normal file
36
modules/pasty/main.nf
Normal file
|
@ -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
|
||||||
|
"""
|
||||||
|
}
|
52
modules/pasty/meta.yml
Normal file
52
modules/pasty/meta.yml
Normal file
|
@ -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/**
|
- modules/paraclu/**
|
||||||
- tests/modules/paraclu/**
|
- tests/modules/paraclu/**
|
||||||
|
|
||||||
|
pasty:
|
||||||
|
- modules/pasty/**
|
||||||
|
- tests/modules/pasty/**
|
||||||
|
|
||||||
pbbam/pbmerge:
|
pbbam/pbmerge:
|
||||||
- modules/pbbam/pbmerge/**
|
- modules/pbbam/pbmerge/**
|
||||||
- tests/modules/pbbam/pbmerge/**
|
- tests/modules/pbbam/pbmerge/**
|
||||||
|
|
13
tests/modules/pasty/main.nf
Normal file
13
tests/modules/pasty/main.nf
Normal file
|
@ -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 )
|
||||||
|
}
|
5
tests/modules/pasty/nextflow.config
Normal file
5
tests/modules/pasty/nextflow.config
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
process {
|
||||||
|
|
||||||
|
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||||
|
|
||||||
|
}
|
11
tests/modules/pasty/test.yml
Normal file
11
tests/modules/pasty/test.yml
Normal file
|
@ -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…
Reference in a new issue