mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-14 13:43:09 +00:00
Add gappa/examineassign (#2079)
* Created gappa/examineassign from template * Test passing * Run only when taxonomy is set * Revert adding taxonomy to when * Add period after prefix * Fix test * Add some keywords * Add one more keyword
This commit is contained in:
parent
b6f18f8733
commit
46ad627a73
6 changed files with 140 additions and 0 deletions
41
modules/gappa/examineassign/main.nf
Normal file
41
modules/gappa/examineassign/main.nf
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
process GAPPA_EXAMINEASSIGN {
|
||||||
|
tag "$meta.id"
|
||||||
|
label 'process_medium'
|
||||||
|
|
||||||
|
conda (params.enable_conda ? "bioconda::gappa=0.8.0" : null)
|
||||||
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
|
'https://depot.galaxyproject.org/singularity/gappa:0.8.0--h9a82719_0':
|
||||||
|
'quay.io/biocontainers/gappa:0.8.0--h9a82719_0' }"
|
||||||
|
|
||||||
|
input:
|
||||||
|
tuple val(meta), path(jplace)
|
||||||
|
path taxonomy
|
||||||
|
|
||||||
|
output:
|
||||||
|
tuple val(meta), path("./.") , emit: examineassign
|
||||||
|
tuple val(meta), path("*profile.tsv") , emit: profile
|
||||||
|
tuple val(meta), path("*labelled_tree.newick"), emit: labelled_tree
|
||||||
|
tuple val(meta), path("*per_query.tsv") , emit: per_query, optional: true
|
||||||
|
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}"
|
||||||
|
"""
|
||||||
|
gappa \\
|
||||||
|
examine assign \\
|
||||||
|
$args \\
|
||||||
|
--threads $task.cpus \\
|
||||||
|
--jplace-path $jplace \\
|
||||||
|
--taxon-file $taxonomy \\
|
||||||
|
--file-prefix ${prefix}.
|
||||||
|
|
||||||
|
cat <<-END_VERSIONS > versions.yml
|
||||||
|
"${task.process}":
|
||||||
|
gappa: \$(echo \$(gappa --version 2>&1 | sed 's/v//' ))
|
||||||
|
END_VERSIONS
|
||||||
|
"""
|
||||||
|
}
|
55
modules/gappa/examineassign/meta.yml
Normal file
55
modules/gappa/examineassign/meta.yml
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
name: "gappa_examineassign"
|
||||||
|
description: assigns taxonomy to query sequences in phylogenetic placement output
|
||||||
|
keywords:
|
||||||
|
- phylogeny
|
||||||
|
- phylogenetic placement
|
||||||
|
- classification
|
||||||
|
- taxonomy
|
||||||
|
tools:
|
||||||
|
- "gappa":
|
||||||
|
description: "Genesis Applications for Phylogenetic Placement Analysis"
|
||||||
|
homepage: "https://github.com/lczech/gappa"
|
||||||
|
documentation: "https://github.com/lczech/gappa/wiki"
|
||||||
|
tool_dev_url: "https://github.com/lczech/gappa"
|
||||||
|
doi: "https://doi.org/10.1093/bioinformatics/btaa070"
|
||||||
|
licence: "['GPL v3']"
|
||||||
|
|
||||||
|
input:
|
||||||
|
- meta:
|
||||||
|
type: map
|
||||||
|
description: |
|
||||||
|
Groovy Map containing sample information
|
||||||
|
e.g. [ id:'test' ]
|
||||||
|
- jplace:
|
||||||
|
type: file
|
||||||
|
description: jplace file output from phylogenetic placement, e.g. EPA-NG, gzipped or not
|
||||||
|
pattern: "*.{jplace,jplace.gz}"
|
||||||
|
|
||||||
|
output:
|
||||||
|
- meta:
|
||||||
|
type: map
|
||||||
|
description: |
|
||||||
|
Groovy Map containing sample information
|
||||||
|
e.g. [ id:'test' ]
|
||||||
|
- examineassign:
|
||||||
|
type: directory
|
||||||
|
description: Execution directory
|
||||||
|
- profile:
|
||||||
|
type: file
|
||||||
|
description: profile tsv file
|
||||||
|
pattern: "*profile.tsv"
|
||||||
|
- labelled_tree:
|
||||||
|
type: file
|
||||||
|
description: labelled tree in newick format
|
||||||
|
pattern: "*labelled_tree.newick"
|
||||||
|
- per_query:
|
||||||
|
type: file
|
||||||
|
description: per query taxonomy assignments in tsv format
|
||||||
|
pattern: "*per_query.tsv"
|
||||||
|
- versions:
|
||||||
|
type: file
|
||||||
|
description: File containing software versions
|
||||||
|
pattern: "versions.yml"
|
||||||
|
|
||||||
|
authors:
|
||||||
|
- "@erikrikarddaniel"
|
|
@ -827,6 +827,10 @@ gamma/gamma:
|
||||||
- modules/gamma/gamma/**
|
- modules/gamma/gamma/**
|
||||||
- tests/modules/gamma/gamma/**
|
- tests/modules/gamma/gamma/**
|
||||||
|
|
||||||
|
gappa/examineassign:
|
||||||
|
- modules/gappa/examineassign/**
|
||||||
|
- tests/modules/gappa/examineassign/**
|
||||||
|
|
||||||
gappa/examinegraft:
|
gappa/examinegraft:
|
||||||
- modules/gappa/examinegraft/**
|
- modules/gappa/examinegraft/**
|
||||||
- tests/modules/gappa/examinegraft/**
|
- tests/modules/gappa/examinegraft/**
|
||||||
|
|
16
tests/modules/gappa/examineassign/main.nf
Normal file
16
tests/modules/gappa/examineassign/main.nf
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/usr/bin/env nextflow
|
||||||
|
|
||||||
|
nextflow.enable.dsl = 2
|
||||||
|
|
||||||
|
include { GAPPA_EXAMINEASSIGN } from '../../../../modules/gappa/examineassign/main.nf'
|
||||||
|
|
||||||
|
workflow test_gappa_examineassign {
|
||||||
|
|
||||||
|
input = [
|
||||||
|
[ id:'test' ], // meta map
|
||||||
|
file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/gappa/epa_result.jplace.gz', checkIfExists: true)
|
||||||
|
]
|
||||||
|
taxonomy = file('https://github.com/nf-core/test-datasets/raw/modules/data/delete_me/gappa/gappa_taxonomy.tsv', checkIfExists: true)
|
||||||
|
|
||||||
|
GAPPA_EXAMINEASSIGN ( input, taxonomy )
|
||||||
|
}
|
9
tests/modules/gappa/examineassign/nextflow.config
Normal file
9
tests/modules/gappa/examineassign/nextflow.config
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
process {
|
||||||
|
|
||||||
|
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||||
|
|
||||||
|
ext.args = "--per-query-results"
|
||||||
|
|
||||||
|
ext.when = { taxonomy }
|
||||||
|
|
||||||
|
}
|
15
tests/modules/gappa/examineassign/test.yml
Normal file
15
tests/modules/gappa/examineassign/test.yml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
- name: gappa examineassign test_gappa_examineassign
|
||||||
|
command: nextflow run ./tests/modules/gappa/examineassign -entry test_gappa_examineassign -c ./tests/config/nextflow.config -c ./tests/modules/gappa/examineassign/nextflow.config
|
||||||
|
tags:
|
||||||
|
- gappa
|
||||||
|
- gappa/examineassign
|
||||||
|
files:
|
||||||
|
- path: output/gappa/test.labelled_tree.newick
|
||||||
|
md5sum: 39de8a46303ea757f6eb94478db1ffe0
|
||||||
|
- path: output/gappa/test.per_query.tsv
|
||||||
|
md5sum: 16e1fbcc5f79588a0ed21e495cdd91ee
|
||||||
|
- path: output/gappa/test.profile.tsv
|
||||||
|
md5sum: ce604fa03604462358b69cfbff7c1593
|
||||||
|
- path: output/gappa/versions.yml
|
||||||
|
contains:
|
||||||
|
- "0.8.0"
|
Loading…
Reference in a new issue