mltree: Build Up a ML Tree

View source: R/ancillary.R

mltreeR 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 improve it using an optimization procedure based on ML.

Value

a ML optimized tree (and parameters)

See Also

gapless_msa

Examples

## Not run: a <- msa(sequences=c("RAPGT", "KMPGT", "ESGGT"), ids = letters[1:3])$ali
rownames(a) <- letters[1:3]
tr <- mltree(a)$tree
## End(Not run)

orthGS documentation built on June 8, 2025, 12:37 p.m.