forked from nf-core/modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ADD MODULE: Famsa guidetree (nf-core#3691)
* famsa_guidetree module: add * famsa_guidetree module: add * Modify meta.yaml -> family to id * Remove white space * Fix report of famsa version * Remove trailing whitespace
- Loading branch information
Showing
6 changed files
with
131 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
|
||
process FAMSA_GUIDETREE { | ||
tag "$meta.id" | ||
label 'process_medium' | ||
|
||
conda "bioconda::famsa=2.2.2" | ||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | ||
'https://depot.galaxyproject.org/singularity/famsa:2.2.2--h9f5acd7_0': | ||
'biocontainers/famsa:2.2.2--h9f5acd7_0' }" | ||
|
||
input: | ||
tuple val(meta), path(fasta) | ||
|
||
output: | ||
tuple val(meta), path("*.dnd"), emit: tree | ||
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}" | ||
""" | ||
famsa -gt_export \\ | ||
$args \\ | ||
-t ${task.cpus} \\ | ||
${fasta} \\ | ||
${prefix}.dnd | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
famsa: \$( famsa -help 2>&1 | head -n 2 | tail -n 1 | sed 's/ version //g' ) | ||
END_VERSIONS | ||
""" | ||
|
||
stub: | ||
def args = task.ext.args ?: '' | ||
def prefix = task.ext.prefix ?: "${meta.id}" | ||
""" | ||
touch ${prefix}.dnd | ||
cat <<-END_VERSIONS > versions.yml | ||
"${task.process}": | ||
famsa: \$( famsa -help 2>&1 | head -n 2 | tail -n 1 | sed 's/ version //g' ) | ||
END_VERSIONS | ||
""" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/nf-core/modules/master/modules/yaml-schema.json | ||
name: "famsa_guidetree" | ||
description: Renders a guidetree in famsa | ||
keywords: | ||
- guide tree | ||
- msa | ||
- newick | ||
tools: | ||
- "famsa": | ||
description: "Algorithm for large-scale multiple sequence alignments" | ||
homepage: "https://github.com/refresh-bio/FAMSA" | ||
documentation: "https://github.com/refresh-bio/FAMSA" | ||
tool_dev_url: "https://github.com/refresh-bio/FAMSA" | ||
doi: "10.1038/srep33964" | ||
licence: "['GPL v3']" | ||
|
||
input: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'test']` | ||
- fasta: | ||
type: file | ||
description: Input sequences in FASTA format | ||
pattern: "*.{fa,fasta}" | ||
|
||
output: | ||
- meta: | ||
type: map | ||
description: | | ||
Groovy Map containing sample information | ||
e.g. `[ id:'test']` | ||
- tree: | ||
type: file | ||
description: Guide tree file in Newick format | ||
pattern: "*.{dnd}" | ||
|
||
- versions: | ||
type: file | ||
description: File containing software versions | ||
pattern: "versions.yml" | ||
|
||
authors: | ||
- "@luisas" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env nextflow | ||
|
||
nextflow.enable.dsl = 2 | ||
|
||
include { FAMSA_GUIDETREE } from '../../../../../modules/nf-core/famsa/guidetree/main.nf' | ||
|
||
workflow test_famsa_guidetree { | ||
|
||
input = [ | ||
[ id:'test' ], // meta map | ||
file(params.test_data['sarscov2']['illumina']['contigs_fasta'], checkIfExists: true) | ||
] | ||
|
||
FAMSA_GUIDETREE ( input ) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
process { | ||
|
||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" } | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
- name: famsa guidetree test_famsa_guidetree | ||
command: nextflow run ./tests/modules/nf-core/famsa/guidetree -entry test_famsa_guidetree -c ./tests/config/nextflow.config -c ./tests/modules/nf-core/famsa/guidetree/nextflow.config | ||
tags: | ||
- famsa/guidetree | ||
- famsa | ||
files: | ||
- path: output/famsa/test.dnd | ||
md5sum: f3ef8b16a7a16cb4548942ebf2e7bad6 | ||
- path: output/famsa/versions.yml |