/celda-1

Primary LanguageRMIT LicenseMIT

Build Status Coverage Status

celda: CEllular Latent Dirichlet Allocation

"celda" stands for "CEllular Latent Dirichlet Allocation", which is a suite of Bayesian hierarchical models and supporting functions to perform gene and cell clustering for count data generated by single cell RNA-seq platforms. This algorithm is an extension of the Latent Dirichlet Allocation (LDA) topic modeling framework that has been popular in text mining applications. Celda has advantages over other clustering frameworks:

  1. Celda can simultaneously cluster genes into transcriptional states and cells into subpopulations
  2. Celda uses count-based Dirichlet-multinomial distributions so no additional normalization is required for 3' DGE single cell RNA-seq
  3. These types of models have shown good performance with sparse data.

Installation Instructions

To install the most recent release of celda (used in the preprint version of the celda paper) via devtools:

library(devtools)
install_github("compbiomed/celda@v0.6")

The most up-to-date (but potentially less stable) version of celda can similarly be installed with:

install_github("compbiomed/celda")

NOTE On OSX, devtools::install_github() requires installation of libgit2. This can be installed via homebrew:

brew install libgit2

Examples and vignettes

Vignettes are available in the package.

An analysis example using celda with RNASeq via vignette('celda-analysis')

Decontamination with DecontX

Highly expressed genes from various cells clusters will be expressed at low levels in other clusters in droplet-based systems due to contamination. DecontX will decompose an observed count matrix into a decontaminated expression matrix and a contamination matrix. The only other parameter needed is a vector of cell cluster labels.

new.counts = DecontX( omat = counts, z = cell.label) 
# Decontaminated matrix: new.counts$res.list$est.rmat
# Percentage of contamination per cell: new.counts$res.list$est.conp

New Features and announcements

The v0.4 release of celda represents a useable implementation of the various celda clustering models. Please submit any usability issues or bugs to the issue tracker at https://github.com/compbiomed/celda

You can discuss celda, or ask the developers usage questions, in our Google Group.