phyclust (version 0.1-24)

prune.Mu: Prune the Center Sequences Mu

Description

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.

Usage

prune.Mu(X, X.class, Mu, code.type = .code.type[1])

Arguments

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".

Value

A pruned Mu will be returned.

Details

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().

References

Phylogenetic Clustering Website: https://snoweye.github.io/phyclust/

See Also

phyclust.

Examples

Run this code
# 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.
# }

Run the code above in your browser using DataLab