Skip to content

micca tree :: FastTree error #17

@EricDeveaud

Description

@EricDeveaud

Hello while testing micca I encounter the following problem.

see:

/tmp/micca2/bin/micca tree -i ~tests/datas/micca/sample_data -o tree.tree  --fasttree-gtr
Error:   FastTree protein_alignment > tree
  FastTree < protein_alignment > tree
  FastTree -out tree protein_alignment
  FastTree -nt nucleotide_alignment > tree
  FastTree -nt -gtr < nucleotide_alignment > tree
  FastTree < nucleotide_alignment > tree
FastTree accepts alignments in fasta or phylip interleaved formats

while looking at tp/_fasttree.py, noticed that when FastTree specific options is provided via
--fasttree-gtr or --fasttree-fastest, the relevant option for FatsTree is APPENDED to the command line.
thus generate something like that

fasttree -nt alignementfile -gtr

but fasttree is pretty picky with the order of options // argument. -gtr or -fastest option must precede inputfile
should be something like that

fasttree -nt -gtr alignementfile
 fasttree -gtr -nt alignementfile

changing tp/_fasttree.py
from

    params = ["-nt", input_fn]
    if gtr:
        params.append("-gtr")
    if fastest:
        params.append("-fastest")

to

    params = ["-nt", input_fn]
    if gtr:
        params.insert(0, "-gtr")
    if fastest:
        params.insert(0, "-fastest")

solved the problem

regards

Eric

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions