svdgram {EnvNJ} | R Documentation |
Compute Phylogenetic Trees Using an n-Gram and SVD Approach
Description
Computes phylogenetic trees using an n-gram and SVD approach.
Usage
svdgram(matrix, rank, species, SVS = TRUE)
Arguments
matrix |
either a dataframe or a matrix where each row represents a property of a protein (for instance, the frequencies of tetrapeptides) and each column represents a different protein (or species). |
rank |
a numeric array providing the ranks that want to be used to approach the data matrix using SVD. |
species |
character array providing the species' names. |
SVS |
logical. When the matrix passed as argument correspond to the peptide-protein matrix and SVS is set to TRUE, then the function will compute a matrix where the columns are the Species Vector Sums. Alternatively, if the matrix passed as argument is already a matrix where the columns encode for species, SVS should be set to FALSE. |
Details
When the matrix passed as argument is a matrix of peptide-protein, the function implement the method described by Stuart et al. 2002 (see references).
Value
An object of class multiPhylo containing a tree for each rank value required.
References
Stuart et al. Bioinformatics 2002; 18:100-108.
See Also
ngraMatrix()
Examples
a <- ngraMatrix(bovids[, 1:4], k = 2)[[2]][, -1]
species <- names(a)
svdgram(matrix = a, rank = 4, species = species, SVS = FALSE)