R/scanpyFunctions.R
runScanpyPCA.Rd
runScanpyPCA Computes PCA on the input sce object and stores the calculated principal components within the sce object
runScanpyPCA(
inSCE,
useAssay = "scanpyScaledData",
reducedDimName = "scanpyPCA",
nPCs = 50,
method = c("arpack", "randomized", "auto", "lobpcg"),
use_highly_variable = TRUE,
seed = 12345
)
(sce) object on which to compute PCA
Assay containing scaled counts to use in PCA. Default
"scanpyScaledData"
.
Name of new reducedDims object containing Scanpy PCA.
Default scanpyPCA
.
numeric value of how many components to compute. Default
50
.
selected method to use for computation of pca.
One of 'arpack'
, 'randomized'
, 'auto'
or 'lobpcg'
.
Default "arpack"
.
boolean value of whether to use highly variable genes only. By default uses them if they have been determined beforehand.
Specify numeric value to set as a seed. Default 12345
.
Updated SingleCellExperiment
object which now contains the
computed principal components
data(scExample, package = "singleCellTK")
if (FALSE) {
sce <- runScanpyNormalizeData(sce, useAssay = "counts")
sce <- runScanpyFindHVG(sce, useAssay = "scanpyNormData", method = "seurat")
sce <- runScanpyScaleData(sce, useAssay = "scanpyNormData")
sce <- runScanpyPCA(sce, useAssay = "scanpyScaledData")
}