mltree {orthGS}R Documentation

Build Up a ML Tree

Description

Given an alignment builds an ML tree.

Usage

mltree(msa, df = TRUE, gapl = TRUE, model = "WAG")

Arguments

msa

input alignment.

df

logical. When TRUE msa should be a dataframe, when FALSE msa should be a string giving the path to a fasta file containing the alignment.

gapl

logical, when TRUE a gapless alignment is used.

model

allows to choose an amino acid models (see the function phangorn::as.pml)

Details

The function makes a NJ tree and then improvove it using an optimization procedure based on ML.

Value

a ML optimized tree (and parameters)

See Also

gapless_msa

Examples

# Example 1:
mltree(matrix(c("R","K","E","A","M","S","P","P","G"), nrow=3,
       dimnames = list(letters[1:3], 1:3)))$tree
# Example 2:
## Not run: 
a <- msa(sequences=c("RAPGT", "KMPGT", "ESGGT"), ids = letters[1:3])$ali
mltree(a)$tree

## End(Not run)

[Package orthGS version 0.1.6 Index]