Learn R Programming

phangorn (version 1.5-0)

splitsNetwork: Phylogenetic Network

Description

splitsNetwork estimates a splits graph from a distance matrix.

Usage

splitsNetwork(dm, gamma=.1, lambda=1e-6, weight=NULL)

Arguments

dm
A distance matrix.
gamma
penalty value for the L1 constraint.
lambda
penalty value for the L2 constraint.
weight
a vector of weights.

Value

  • splitsNetwork returns a matrix. The first column contains the indices of the splits, the second column an unconstrained fit without penalty terms and the third column the constrained fit.

Details

splitsNetwork fits phylogenetic networks using L1, L2 and non-negativity constraints. The function minimizes the penalized least squares $$\beta = min \sum(dm - X\beta)^2 + \lambda \|\beta \|^2_2$$ with respect to $$\|\beta \|_1 <= \gamma,="" \beta="">= 0$$ where X is a design matrix constructed with designSplits. External edges are fitted without constraints.

References

K. P. Schliep (2009). Some Applications of statistical phylogenetics (PhD Thesis)

See Also

distanceHadamard, designTree

Examples

Run this code
data(yeast)
dm = dist.ml(yeast)
fit = splitsNetwork(dm)
net = as.networx(fit)
plot(net)
write.nexus.splits(fit)

Run the code above in your browser using DataLab