mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-14 13:43:09 +00:00
Adding gappa/examineheattree (#2084)
* Adding gappa/examineheattree * Update modules/gappa/examineheattree/meta.yml Co-authored-by: Daniel Straub <42973691+d4straub@users.noreply.github.com> * Check versions.yml for md5 sum instead Co-authored-by: Daniel Straub <42973691+d4straub@users.noreply.github.com>
This commit is contained in:
parent
58ee946ca6
commit
0857e6c60f
6 changed files with 156 additions and 0 deletions
45
modules/gappa/examineheattree/main.nf
Normal file
45
modules/gappa/examineheattree/main.nf
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
process GAPPA_EXAMINEHEATTREE {
|
||||||
|
tag "$meta.id"
|
||||||
|
label 'process_low'
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
|
output:
|
||||||
|
tuple val(meta), path("*.newick") , emit: newick , optional: true
|
||||||
|
tuple val(meta), path("*.nexus") , emit: nexus , optional: true
|
||||||
|
tuple val(meta), path("*.phyloxml") , emit: phyloxml, optional: true
|
||||||
|
tuple val(meta), path("*.svg") , emit: svg , optional: true
|
||||||
|
tuple val(meta), path("*.colours.txt"), emit: colours
|
||||||
|
tuple val(meta), path("*.log") , emit: log
|
||||||
|
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 \\
|
||||||
|
heat-tree \\
|
||||||
|
--threads $task.cpus \\
|
||||||
|
--file-prefix ${prefix}. \\
|
||||||
|
--jplace-path $jplace \\
|
||||||
|
$args \\
|
||||||
|
--log-file ${prefix}.log
|
||||||
|
|
||||||
|
grep '^ *At' ${prefix}.log > ${prefix}.colours.txt
|
||||||
|
|
||||||
|
cat <<-END_VERSIONS > versions.yml
|
||||||
|
"${task.process}":
|
||||||
|
gappa: \$(echo \$(gappa --version 2>&1 | sed 's/v//' ))
|
||||||
|
END_VERSIONS
|
||||||
|
"""
|
||||||
|
}
|
64
modules/gappa/examineheattree/meta.yml
Normal file
64
modules/gappa/examineheattree/meta.yml
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
name: "gappa_examineheattree"
|
||||||
|
description: colours a phylogeny with placement densities
|
||||||
|
keywords:
|
||||||
|
- phylogeny
|
||||||
|
- phylogenetic placement
|
||||||
|
- heattree
|
||||||
|
- visualisation
|
||||||
|
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' ]
|
||||||
|
- versions:
|
||||||
|
type: file
|
||||||
|
description: File containing software versions
|
||||||
|
pattern: "versions.yml"
|
||||||
|
- newick:
|
||||||
|
type: file
|
||||||
|
description: phylogenetic tree file in newick format
|
||||||
|
pattern: "*.newick"
|
||||||
|
- nexus:
|
||||||
|
type: file
|
||||||
|
description: coloured phylogenetic tree file in nexus format
|
||||||
|
pattern: "*.nexus"
|
||||||
|
- phyloxml:
|
||||||
|
type: file
|
||||||
|
description: coloured phylogenetic tree file in phyloxml format
|
||||||
|
pattern: "*.phyloxml"
|
||||||
|
- svg:
|
||||||
|
type: file
|
||||||
|
description: coloured phylogenetic tree file in svg format
|
||||||
|
pattern: "*.svg"
|
||||||
|
- colours:
|
||||||
|
type: file
|
||||||
|
description: colours used in plot
|
||||||
|
pattern: "*.colours.txt"
|
||||||
|
- log:
|
||||||
|
type: file
|
||||||
|
description: log file from the run
|
||||||
|
pattern: "*.log"
|
||||||
|
|
||||||
|
authors:
|
||||||
|
- "@erikrikarddaniel"
|
|
@ -835,6 +835,10 @@ gappa/examinegraft:
|
||||||
- modules/gappa/examinegraft/**
|
- modules/gappa/examinegraft/**
|
||||||
- tests/modules/gappa/examinegraft/**
|
- tests/modules/gappa/examinegraft/**
|
||||||
|
|
||||||
|
gappa/examineheattree:
|
||||||
|
- modules/gappa/examineheattree/**
|
||||||
|
- tests/modules/gappa/examineheattree/**
|
||||||
|
|
||||||
gatk/indelrealigner:
|
gatk/indelrealigner:
|
||||||
- modules/gatk/indelrealigner/**
|
- modules/gatk/indelrealigner/**
|
||||||
- tests/modules/gatk/indelrealigner/**
|
- tests/modules/gatk/indelrealigner/**
|
||||||
|
|
15
tests/modules/gappa/examineheattree/main.nf
Normal file
15
tests/modules/gappa/examineheattree/main.nf
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/usr/bin/env nextflow
|
||||||
|
|
||||||
|
nextflow.enable.dsl = 2
|
||||||
|
|
||||||
|
include { GAPPA_EXAMINEHEATTREE } from '../../../../modules/gappa/examineheattree/main.nf'
|
||||||
|
|
||||||
|
workflow test_gappa_examineheattree {
|
||||||
|
|
||||||
|
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)
|
||||||
|
]
|
||||||
|
|
||||||
|
GAPPA_EXAMINEHEATTREE ( input )
|
||||||
|
}
|
10
tests/modules/gappa/examineheattree/nextflow.config
Normal file
10
tests/modules/gappa/examineheattree/nextflow.config
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
process {
|
||||||
|
|
||||||
|
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||||
|
|
||||||
|
withName: '.*EXAMINEHEATTREE.*' {
|
||||||
|
ext.args = "--write-newick-tree --write-nexus-tree --write-phyloxml-tree --write-svg-tree"
|
||||||
|
prefix = { "${meta.id}.heat-tree." }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
18
tests/modules/gappa/examineheattree/test.yml
Normal file
18
tests/modules/gappa/examineheattree/test.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
- name: "gappa examineheattree"
|
||||||
|
command: nextflow run ./tests/modules/gappa/examineheattree -entry test_gappa_examineheattree -c ./tests/config/nextflow.config -c ./tests/modules/gappa/examineheattree/nextflow.config
|
||||||
|
tags:
|
||||||
|
- "gappa"
|
||||||
|
- "gappa/examineheattree"
|
||||||
|
files:
|
||||||
|
- path: output/gappa/test.tree.newick
|
||||||
|
md5sum: f055e11c9b44b6d3afb502aba99d9579
|
||||||
|
- path: output/gappa/test.tree.nexus
|
||||||
|
md5sum: e1cfdcb63f3a751677d0e78fb6b9230a
|
||||||
|
- path: output/gappa/test.tree.phyloxml
|
||||||
|
md5sum: ea35b07e4fd8d174fd6b2f204629cc4e
|
||||||
|
- path: output/gappa/test.tree.svg
|
||||||
|
- path: output/gappa/test.colours.txt
|
||||||
|
md5sum: 7704cd341c8693981253ba6d740c1061
|
||||||
|
- path: output/gappa/test.log
|
||||||
|
- path: output/gappa/versions.yml
|
||||||
|
md5sum: 1cfb752399307413b475438ab1997731
|
Loading…
Reference in a new issue