calculateJSD | 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,
assay.type = assay_name,
assay_name = exprs_values,
exprs_values = "counts",
transposed = FALSE,
...
)
runJSD(x, BPPARAM = SerialParam(), chunkSize = nrow(x))
x |
a numeric matrix or a
|
... |
optional arguments not used. |
assay.type |
a single |
assay_name |
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.