calculateJSD {mia} | R Documentation |
This function calculates the Jensen-Shannon Divergence (JSD) in a
SummarizedExperiment
object.
## S4 method for signature 'ANY' calculateJSD(x, ...) ## S4 method for signature 'SummarizedExperiment' calculateJSD( x, abund_values = exprs_values, exprs_values = "counts", transposed = FALSE, ... ) runJSD(x, BPPARAM = SerialParam(), chunkSize = nrow(x))
x |
a numeric matrix or a
|
... |
optional arguments not used. |
abund_values |
a single |
exprs_values |
a single |
transposed |
Logical scalar, is x transposed with cells in rows? |
BPPARAM |
A
|
chunkSize |
an integer scalar, defining the size of data send
to the individual worker. Only has an effect, if |
a sample-by-sample distance matrix, suitable for NMDS, etc.
Susan Holmes susan@stat.stanford.edu. Adapted for phyloseq by Paul J. McMurdie. Adapted for mia by Felix G.M. Ernst
Jensen-Shannon Divergence and Hilbert space embedding. Bent Fuglede and Flemming Topsoe University of Copenhagen, Department of Mathematics http://www.math.ku.dk/~topsoe/ISIT2004JSD.pdf
http://en.wikipedia.org/wiki/Jensen-Shannon_divergence
data(enterotype) library(scater) jsd <- calculateJSD(enterotype) class(jsd) head(jsd) enterotype <- runMDS(enterotype, FUN = calculateJSD, name = "JSD", exprs_values = "counts") head(reducedDim(enterotype)) head(attr(reducedDim(enterotype),"eig")) attr(reducedDim(enterotype),"GOF")