File: smooth_via_pca.Rd

package info (click to toggle)
r-cran-sctransform 0.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 600 kB
  • sloc: cpp: 323; sh: 13; makefile: 2
file content (41 lines) | stat: -rw-r--r-- 1,003 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/denoise.R
\name{smooth_via_pca}
\alias{smooth_via_pca}
\title{Smooth data by PCA}
\usage{
smooth_via_pca(
  x,
  elbow_th = 0.025,
  dims_use = NULL,
  max_pc = 100,
  do_plot = FALSE,
  scale. = FALSE
)
}
\arguments{
\item{x}{A data matrix with genes as rows and cells as columns}

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

\item{dims_use}{Directly specify PCs to use, e.g. 1:10}

\item{max_pc}{Maximum number of PCs computed}

\item{do_plot}{Plot PC sdev and sdev drop}

\item{scale.}{Boolean indicating whether genes should be divided by standard deviation after centering and prior to PCA}
}
\value{
Smoothed data
}
\description{
Perform PCA, identify significant dimensions, and reverse the rotation using only significant dimensions.
}
\examples{
\donttest{
vst_out <- vst(pbmc)
y_smooth <- smooth_via_pca(vst_out$y, do_plot = TRUE)
}

}