View source: R/seuratFunctions.R
runSeuratPCA | R Documentation |
runSeuratPCA Computes PCA on the input sce object and stores the calculated principal components within the sce object
runSeuratPCA(
inSCE,
useAssay = "seuratNormData",
useFeatureSubset = "hvf",
scale = TRUE,
reducedDimName = "seuratPCA",
nPCs = 20,
seed = 12345,
verbose = TRUE
)
inSCE |
(sce) object on which to compute PCA |
useAssay |
Assay containing scaled counts to use in PCA. Default
|
useFeatureSubset |
Subset of feature to use for dimension reduction. A
character string indicating a |
scale |
Logical scalar, whether to standardize the expression values
using |
reducedDimName |
Name of new reducedDims object containing Seurat PCA.
Default |
nPCs |
numeric value of how many components to compute. Default
|
seed |
Random seed for reproducibility of results.
Default |
verbose |
Logical value indicating if informative messages should
be displayed. Default is |
For features used for computation, it can be controlled by features
or
useFeatureSubset
. When features
is specified, the scaling and
dimensionality reduction will only be processed with these features. When
features
is NULL
but useFeatureSubset
is specified, will
use the features that the HVG list points to. If both parameters are
NULL
, the function will see if any Seurat's variable feature detection
has been ever performed, and use them if found. Otherwise, all features are
used.
Updated SingleCellExperiment
object which now contains the
computed principal components
data(scExample, package = "singleCellTK")
## Not run:
sce <- runSeuratNormalizeData(sce, useAssay = "counts")
sce <- runSeuratFindHVG(sce, useAssay = "counts")
sce <- setTopHVG(sce, method = "vst", featureSubsetName = "hvf")
sce <- runSeuratScaleData(sce, useAssay = "counts")
sce <- runSeuratPCA(sce, useAssay = "counts")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.