spectR: Spectral density plot of a phylogeny

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/spectR.R

Description

Computes the spectra of eigenvalues for the modified graph Laplacian of a phylogenetic tree, identifies the spectral gap, then convolves the eigenvalues with a Gaussian kernel, and plots them alongside all eigenvalues ranked in descending order.

Usage

1
spectR(phylo, method=c("standard"))

Arguments

phylo

an object of type 'phylo' (see ape documentation)

method

the method used to compute the spectral density, which can either be "standard" or "normal". If set to "standard", computes the unnormalized version of the spectral density. If set to "normal", computes the spectral density normalized to the degree matrix (see the associated paper for an explanation)

Details

Note that the eigengap should in principle be computed with the "standard" option

Value

a list with the following components:

eigenvalues

the vector of eigenvalues

principal_eigenvalue

the largest (or principal) eigenvalue of the spectral density profile

asymmetry

the skewness of the spectral density profile

peakedness1

the kurtosis of the spectral density profile

peakedness2

the largest y-axis value of the spectral density profile

eigengap

the position of the largest difference between eigenvalues, giving the number of modalities in the tree

Author(s)

E Lewitus

References

Lewitus, E., Morlon, H., Characterizing and comparing phylogenies from their Laplacian spectrum, bioRxiv doi: http://dx.doi.org/10.1101/026476

See Also

plot_spectR, JSDtree, BICompare

Examples

1
2
data(Cetacea)
spectR(Cetacea,method="standard")

RPANDA documentation built on May 29, 2017, 3:34 p.m.

Search within the RPANDA package
Search all R packages, documentation and source code