Learn R Programming

orthGS (version 0.1.6)

mltree: Build Up a ML Tree

Description

Given an alignment builds an ML tree.

Usage

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

Value

a ML optimized tree (and parameters)

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.

See Also

gapless_msa

Examples

Run this code
# 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:
if (FALSE) {
a <- msa(sequences=c("RAPGT", "KMPGT", "ESGGT"), ids = letters[1:3])$ali
mltree(a)$tree
}

Run the code above in your browser using DataLab