mltree {orthGS} | R Documentation |
Given an alignment builds an ML tree.
mltree(msa, df = TRUE, gapl = TRUE, model = "WAG")
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) |
The function makes a NJ tree and then improvove it using an optimization procedure based on ML.
a ML optimized tree (and parameters)
gapless_msa
# 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)