runScanpyPCA: runScanpyPCA Computes PCA on the input sce object and stores...

View source: R/scanpyFunctions.R

runScanpyPCAR Documentation

runScanpyPCA Computes PCA on the input sce object and stores the calculated principal components within the sce object

Description

runScanpyPCA Computes PCA on the input sce object and stores the calculated principal components within the sce object

Usage

runScanpyPCA(
  inSCE,
  useAssay = "scanpyScaledData",
  reducedDimName = "scanpyPCA",
  nPCs = 50,
  method = c("arpack", "randomized", "auto", "lobpcg"),
  use_highly_variable = TRUE,
  seed = 12345
)

Arguments

inSCE

(sce) object on which to compute PCA

useAssay

Assay containing scaled counts to use in PCA. Default "scanpyScaledData".

reducedDimName

Name of new reducedDims object containing Scanpy PCA. Default scanpyPCA.

nPCs

numeric value of how many components to compute. Default 50.

method

selected method to use for computation of pca. One of 'arpack', 'randomized', 'auto' or 'lobpcg'. Default "arpack".

use_highly_variable

boolean value of whether to use highly variable genes only. By default uses them if they have been determined beforehand.

seed

Specify numeric value to set as a seed. Default 12345.

Value

Updated SingleCellExperiment object which now contains the computed principal components

Examples

data(scExample, package = "singleCellTK")
## Not run: 
sce <- runScanpyNormalizeData(sce, useAssay = "counts")
sce <- runScanpyFindHVG(sce, useAssay = "scanpyNormData", method = "seurat")
sce <- runScanpyScaleData(sce, useAssay = "scanpyNormData")
sce <- runScanpyPCA(sce, useAssay = "scanpyScaledData")

## End(Not run)

compbiomed/singleCellTK documentation built on Oct. 27, 2024, 3:26 a.m.