| dist_mat | R Documentation |
This utility function calculates distance based on a user defined measure and optionally filters probes by leading log fold change.
dist_mat(dat, dist, p, top, filter_method, center, robust = FALSE)
dat |
Omic data matrix. |
dist |
Distance measure to be used. |
p |
Power of the Minkowski distance. |
top |
Optional number (if > 1) or proportion (if < 1) of top probes to be used for distance calculations. |
filter_method |
String specifying whether to apply a |
center |
Center each probe prior to computing distances? |
robust |
Use robust probe centering? |
Data are optionally centered by probe and samplewise distance calculated using one of the following methods:
"euclidean", "maximum", "manhattan", and
"minkowski" are all documented in the dist
function. bioplotr relies on a lower level implementation via
Rfast::Dist to speed up computations.
"cosine" and "canberra" are implemented and documented
in wordspace::dist.matrix.
"pearson", "kendall", and "spearman" correspond
to various forms of correlation distance, generally defined as 1 – the
absolute value of the correlation coefficient. See
cor for more details.
"bray", "kulczynski", "jaccard", "gower",
"altGower", "morisita", "horn", "mountford",
"raup", "binomial", "chao", "cao", and
"mahalanobis" are all available and documented in the
vegan::vegdist function. These are designed for use with
ecological data, e.g. a matrix of microbial OTU counts.
"bhattacharyya", "hellinger", "kullback_leibler",
and "MI" are information theoretic distance metrics. The former
three are implemented in Rfast::Dist. See
bioDist::MIdist for details on the latter.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.