Skip Navigation
Text:
Increase font size
Decrease font size

SMNN: Batch Effect Correction for Single-cell RNA-seq data via Supervised Mutual Nearest Neighbor Detection

Getting Started with SMNN

To get started, one can download the SMNN R package from here, and then use the following command to install the package:
   install.packages("local_path/SMNN/", repos = NULL, type = "sources")

Alternatively, SMNN can be directly installed from GitHub yycunc/SMNN following the instructions.

Once installed, one can use the following command lines to load the package library as well as the data used in our toy example:
   library("SMNN")
   data("data_SMNN")



R Markdown for a Toy Example

The current implementation of SMNN encompasses two major steps: one optional clustering step and the other batch effect correction step. In the first step, SMNN takes the expression matrix as input, and performs clustering using Seurat v. 3.0 (Butler et al., 2018). Corresponding clusters/cell types are then matched across batches based on marker genes specified by users. This entire clustering step can be by-passed by feeding SMNN cell cluster labels. With cell cluster label information, SMNN searches mutual nearest neighbors within each cell type, and performs batch effect correction using the SMNNcorrect function.
   In this tutorial, we will perform batch effect correction using SMNN in a toy example containing two batches. The first batch contains 400 cells from three cell types, namely fibroblasts, macrophages and endothelial cells. And the second batches has 500 cells from the same three cell types. Both two batches contain 3000 genes.

A guided walkthrough of the two analyses are provided by R markdown tutorial.