getPCA | R Documentation |
Selects the 500 most variable genes in the SCE, performs PCA based on them and stores the values in the reducedDims slot of the SCE object.
getPCA(inSCE, useAssay = "logcounts", reducedDimName = "PCA")
inSCE |
Input SCtkExperiment object. Required |
useAssay |
Indicate which assay to use for PCA. Default is "counts" |
reducedDimName |
Store the PCA data with this name. The default is PCA. The toolkit will store data with the pattern <ASSAY>_<ALGORITHM>. |
A SCtkE object with the specified reducedDim and pcaVariances updated
data("mouseBrainSubsetSCE") #add a CPM assay assay(mouseBrainSubsetSCE, "cpm") <- apply(assay(mouseBrainSubsetSCE, "counts"), 2, function(x) { x / (sum(x) / 1000000) }) mouseBrainSubsetSCE <- getPCA(mouseBrainSubsetSCE, useAssay = "cpm", reducedDimName = "PCA_cpm") reducedDims(mouseBrainSubsetSCE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.