spectR | R Documentation |
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.
spectR(phylo, meth=c("standard"),zero_bound=FALSE)
phylo |
an object of type 'phylo' (see ape documentation) |
meth |
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) |
zero_bound |
if false, eigenvalues less than one are discarded |
Note that the eigengap should in principle be computed with the "standard" option
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 |
peak_height |
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 |
E Lewitus
Lewitus, E., Morlon, H., Characterizing and comparing phylogenies from their Laplacian spectrum, bioRxiv doi: http://dx.doi.org/10.1101/026476
plot_spectR
, JSDtree
, BICompare
data(Cetacea)
spectR(Cetacea,meth="standard",zero_bound=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.