SSW: Seurat Standard Workflow (SSW)

Description Usage Arguments Examples

View source: R/SSW.R

Description

Run Seurat Standard Workflow.

- Normalization
- Feature Selection (Highly variable genes, HVGs)
- Data scaling
- PCA
- Construct SNN graph
- Unsupervised Clustering
- Non-linear dimension reduction (tSNE, UMAP)

By default, we compute 50 PCs and use the 1~50 PCs as input dimension. To use an optimized dimensionality parameter, run JackStraw or ElbowPlot to determine the dimensionality of the dataset and supply to 'dims'.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
SSW(
  object,
  assay = NULL,
  nfeatures = 2000,
  PC_features = NULL,
  npcs = 50,
  dims = 1:50,
  k.param = 20,
  algorithm = 1,
  resolution = 0.3,
  perplexity = 30,
  verbose = TRUE
)

Arguments

object

A Seurat object.

assay

"RNA" or "integrated".

nfeatures

Number of HVGs selected.

PC_features

If supplied, run PCA on these features.

npcs

Number of PCs to compute.

dims

Chosen dimensionality of the data. Used in SNN-graph construction and Non-linear dimension reduction.

k.param

Defines k for the k-nearest neighbor algorithm. Supplied to FindNeighbors.

algorithm

Algorithm for modularity optimization (1 = original Louvain algorithm; 2 = Louvain algorithm with multilevel refinement; 3 = SLM algorithm; 4 = Leiden algorithm). Leiden requires the leidenalg python. Supplied to Findclusters.

resolution

Value of the resolution parameter, use a value above (below) 1.0 if you want to obtain a larger (smaller) number of communities. Supplied to Findclusters.

perplexity

Perplexity used in RunTSNE.

verbose

Print output.

Examples

1
2
## pbmc_small is too small, must set perplexity to lower value
pbmc_small <- SSW(pbmc_small, perplexity = 10)

RuiyuRayWang/scWidgets documentation built on Dec. 18, 2021, 11:54 a.m.