Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

smooth_via_pca

Smooth data by PCA


Description

Perform PCA, identify significant dimensions, and reverse the rotation using only significant dimensions.

Usage

smooth_via_pca(
  x,
  elbow_th = 0.025,
  dims_use = NULL,
  max_pc = 100,
  do_plot = FALSE,
  scale. = FALSE
)

Arguments

x

A data matrix with genes as rows and cells as columns

elbow_th

The fraction of PC sdev drop that is considered significant; low values will lead to more PCs being used

dims_use

Directly specify PCs to use, e.g. 1:10

max_pc

Maximum number of PCs computed

do_plot

Plot PC sdev and sdev drop

scale.

Boolean indicating whether genes should be divided by standard deviation after centering and prior to PCA

Value

Smoothed data

Examples

vst_out <- vst(pbmc)
y_smooth <- smooth_via_pca(vst_out$y, do_plot = TRUE)

sctransform

Variance Stabilizing Transformations for Single Cell UMI Data

v0.3.2
GPL-3 | file LICENSE
Authors
Christoph Hafemeister [aut, cre] (<https://orcid.org/0000-0001-6365-8254>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.