Learn R Programming

rphast (version 1.0)

likelihood.msa: MSA Likelihood

Description

Likelihood of an alignment given a tree model

Usage

likelihood.msa(x, tm, features=NULL, by.column=FALSE)

Arguments

x
An object of class msa representing the multiple alignment
tm
An object of class tm representing the tree and model of substitution
features
A features object. If non-null, compute likelihoods for each feature rather than the whole alignment.
by.column
Logical indicating whether to get likelihoods for each alignment column. If FALSE, returns total likelihood. Ignored if features is not NULL.

Value

  • Either the likelihood of the entire alignment (if by.column==FALSE && is.null(features), or a numeric vector giving the likelihood of each feature (if !is.null(features)), or a numeric vector giving the likelihood of each column (if by.column==TRUE).

See Also

phyloFit, tm