prune.Mu {phyclust} | R Documentation |
This function prune the center sequences Mu where the sites will be reset as GAPs if all members within the same cluster are all GAPs.
prune.Mu(X, X.class, Mu, code.type = .code.type[1])
X |
numerical data matrix with N rows/sequences and L columns/sites. |
X.class |
class ids indicated for all sequences. |
Mu |
a center sequence with length L. |
code.type |
either "NUCLEOTIDE" (default) or "SNP". |
For each cluster indicated by X.class
, this function will prune
Mu
and reset the sites as GAPs if all members within cluster
are all GAPs. Mu
are usually the returning values of
phyclust()
.
A pruned Mu
will be returned.
Wei-Chen Chen wccsnow@gmail.com
Phylogenetic Clustering Website: http://snoweye.github.io/phyclust/
## Not run: library(phyclust, quiet = TRUE) X <- seq.data.toy$org X[, 5] <- .nucleotide$nid[.nucleotide$code == "-"] ret <- phyclust(X, 2) Mu.GAPs <- prune.Mu(X, ret$class.id, ret$Mu) ret$Mu[, 5] Mu.GAPs[, 5] # Replace by GAPs. ## End(Not run)