tn_test icon indicating copy to clipboard operation
tn_test copied to clipboard

post-clustering differential expression test

TN test

The code in this repository accompanies the experiments performed in the paper Valid post-clustering differential analysis for single-cell RNA-Seq by Zhang, Kamath, and Tse.

Installation

The TN test package can be installed via pip:

pip install truncated_normal

Import the package by adding the following line of code to your Python script:

from truncated_normal import truncated_normal as tn

Examples

For a tutorial on using the TN test module and framework for your own projects, please refer to tntest_tutorial.ipynb. We were able to install all required R and Python packages and run all of our experiments in this Docker image.

We also provide the following notebooks for reproducing results in the paper (figure_utils.py contains code used for running simulations and generating plots):

  • seurat_pbmc.ipynb: R notebook for loading the PBMC dataset and clustering it with Seurat. Please see the Seurat PBMC tutorial for more information
  • experiments_synthetic_normal.ipynb: Python 3 notebook with TN test experiments performed on synthetic data
  • experiments_pbmc3k.ipynb: Python 3 notebook with TN test experiments performed on PBMC data processed by seurat_pbmc.ipynb
  • experiments_kolodziejczyk.ipynb: Python 3 notebook with TN test experiments performed on the mESC dataset published by Kolodzieczyk et al. (paper, data)
  • experiments_zeisel.ipynb: Python 3 notebook with TN test experiments performed on the mouse brain cell dataset published by Zeisel et al. (paper, data)
  • Please see the linear_separability directory for experiments showing that several published single-cell datasets are linearly separable

Method

method