mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 02:58:17 +00:00
Add gappa/examinegraft (#2035)
This commit is contained in:
parent
bf09fdf892
commit
b444b084fa
6 changed files with 113 additions and 0 deletions
37
modules/gappa/examinegraft/main.nf
Normal file
37
modules/gappa/examinegraft/main.nf
Normal file
|
@ -0,0 +1,37 @@
|
|||
process GAPPA_EXAMINEGRAFT {
|
||||
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
|
||||
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 \\
|
||||
graft \\
|
||||
$args \\
|
||||
--threads $task.cpus \\
|
||||
--file-prefix ${prefix}. \\
|
||||
--jplace-path $jplace
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
gappa: \$(echo \$(gappa --version 2>&1 | sed 's/v//' ))
|
||||
END_VERSIONS
|
||||
"""
|
||||
}
|
41
modules/gappa/examinegraft/meta.yml
Normal file
41
modules/gappa/examinegraft/meta.yml
Normal file
|
@ -0,0 +1,41 @@
|
|||
name: "gappa_examinegraft"
|
||||
description: grafts query sequences from phylogenetic placement on the reference tree
|
||||
keywords:
|
||||
- sort
|
||||
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"
|
||||
|
||||
authors:
|
||||
- "@erikrikarddaniel"
|
|
@ -811,6 +811,10 @@ gamma/gamma:
|
|||
- modules/gamma/gamma/**
|
||||
- tests/modules/gamma/gamma/**
|
||||
|
||||
gappa/examinegraft:
|
||||
- modules/gappa/examinegraft/**
|
||||
- tests/modules/gappa/examinegraft/**
|
||||
|
||||
gatk/indelrealigner:
|
||||
- modules/gatk/indelrealigner/**
|
||||
- tests/modules/gatk/indelrealigner/**
|
||||
|
|
15
tests/modules/gappa/examinegraft/main.nf
Normal file
15
tests/modules/gappa/examinegraft/main.nf
Normal file
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { GAPPA_EXAMINEGRAFT } from '../../../../modules/gappa/examinegraft/main.nf'
|
||||
|
||||
workflow test_gappa_examinegraft {
|
||||
|
||||
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_EXAMINEGRAFT ( input )
|
||||
}
|
5
tests/modules/gappa/examinegraft/nextflow.config
Normal file
5
tests/modules/gappa/examinegraft/nextflow.config
Normal file
|
@ -0,0 +1,5 @@
|
|||
process {
|
||||
|
||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
|
||||
}
|
11
tests/modules/gappa/examinegraft/test.yml
Normal file
11
tests/modules/gappa/examinegraft/test.yml
Normal file
|
@ -0,0 +1,11 @@
|
|||
- name: gappa examinegraft test_gappa_examinegraft
|
||||
command: nextflow run ./tests/modules/gappa/examinegraft -entry test_gappa_examinegraft -c ./tests/config/nextflow.config -c ./tests/modules/gappa/examinegraft/nextflow.config
|
||||
tags:
|
||||
- gappa
|
||||
- gappa/examinegraft
|
||||
files:
|
||||
- path: output/gappa/test.epa_result.newick
|
||||
md5sum: 97e54b6a9576a78b774fd63a050e5474
|
||||
- path: output/gappa/versions.yml
|
||||
contains:
|
||||
- "0.8.0"
|
Loading…
Reference in a new issue