pcaVariances<- | R Documentation |
Set PCA variances
pcaVariances(x, ...) <- value
x |
SCtkE object |
... |
other parameters |
value |
PCA variances DataFrame() |
A SCtkExperiment object with the pcaVariances slot set.
data("mouseBrainSubsetSCE") pcaVariances(mouseBrainSubsetSCE) #getPCA() sets the pcaVariances newSCE <- getPCA(mouseBrainSubsetSCE, useAssay = "counts") #alternatively, set the pcaVariances directly pca <- prcomp(assay(mouseBrainSubsetSCE, "logcounts")) percentVar <- pca$sdev ^ 2 / sum(pca$sdev ^ 2) pcaVariances(mouseBrainSubsetSCE) <- DataFrame(percentVar)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.