FASTTREE

build phylogenetic trees using fasttree. Documentation found at http://www.microbesonline.org/fasttree/

URL:

Example

This wrapper can be used in the following way:

rule fasttree:
    input:
        alignment="{sample}.fa",  # Input alignment file
    output:
        tree="{sample}.nwk",  # Output tree file
    log:
        "logs/muscle/{sample}.log",
    params:
        extra="",  # Additional arguments
    wrapper:
        "v1.1.0/bio/fasttree"

Note that input, output and log file paths can be chosen freely.

When running with

snakemake --use-conda

the software dependencies will be automatically deployed into an isolated environment before execution.

Software dependencies

  • fasttree==2.1.10

Input/Output

Input:

  • Alignment FASTA or interleaved phylip file

Output:

  • Newick formatted tree file

Notes

  • fasttree can only be run with a single thread.

Authors

  • Nikos Tsardakas Renhuldt

Code

__author__ = "Nikos Tsardakas Renhuldt"
__copyright__ = "Copyright 2021, Nikos Tsardakas Renhuldt"
__email__ = "nikos.tsardakas_renhuldt@tbiokem.lth.se"
__license__ = "MIT"


from snakemake.shell import shell
import os

log = snakemake.log_fmt_shell(stdout=False, stderr=True)
extra = snakemake.params.get("extra", "")

shell(
    "fasttree "
    "{extra} "
    "{snakemake.input.alignment} "
    "> {snakemake.output.tree} "
    "{log}"
)