Skip Navigation
Increase font size
Decrease font size

iSMNN: Batch Effect Correction for Single-cell RNA-seq data via Iterative Supervised Mutual Nearest Neighbor Refinement

Getting Started with iSMNN

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

Alternatively, iSMNN can be directly installed from GitHub yycunc/iSMNN 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:

R Markdown for a Toy Example

The current implementation of iSMNN encompasses two major steps: one optional cluster harmonizing step and the other batch effect correction step. In the first step, the clusters/cell type labels are matched/harmonized across multiple scRNA-seq batches using unifiedClusterLabelling function from SMNN package (Yang et al., 2020). This entire clustering step can be by-passed by feeding iSMNN cell cluster labels. With cell cluster label information, iSMNN iteratively searches mutual nearest neighbors within each harmonized cell type, and performs batch effect correction using the iSMNN function.
   In this tutorial, we will perform batch effect correction using iSMNN 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.