Name Mode Size
R 040000
data 040000
man 040000
src 040000
tests 040000
vignettes 040000
.Rbuildignore 100644 0 kb
.gitignore 100644 1 kb
.travis.yml 100644 1 kb
CONDUCT.md 100755 1 kb
DESCRIPTION 100755 1 kb
LICENSE 100755 1 kb
NAMESPACE 100755 2 kb
NEWS 100755 0 kb
NOTICE 100644 18 kb
README.md 100755 4 kb
_pkgdown.yml 100755 3 kb
README.md
[![Build Status](https://travis-ci.org/compbiomed/celda.svg?branch=master)](https://travis-ci.org/compbiomed/celda) [![Coverage Status](https://coveralls.io/repos/github/compbiomed/celda/badge.svg?branch=devel)](https://coveralls.io/github/compbiomed/celda?branch=devel) # celda: CEllular Latent Dirichlet Allocation "celda" stands for "**CE**llular **L**atent **D**irichlet **A**llocation", 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. To simulate two 300 (gene) x 100 (cell) count matrices from 3 different cell types with total reads per cell ranged from 5000 to 40000: one matrix being ture expression matrix (rmat), the other matrix being contamination count matrix (cmat) ``` sim.con = simulateObservedMatrix( C = 100, G = 300, K = 3, N.Range= c(5000, 40000), seed = 9124) true.contamination.percentage = colSums( sim.con$cmat ) / colSums( sim.con$cmat + sim.con$rmat ) str(sim.con) # rmat: simulated true expression (gene by cell) count matrix # cmat: simulated contamination (gene by cell) count matrix # N.by.C: total transcripts per cell # z: cell type label ``` Use DecontX to decompose the observed (contaminated) count matrix back into true expression matrix and a contamination matrix with specified cell label ``` observed.mat = sim.con$rmat + sim.con$cmat cell.label = sim.con$z new.counts = DecontX( omat = observed.mat, z = cell.label, max.iter = 200, seed = 123) str(new.counts) # Decontaminated matrix: new.counts$res.list$est.rmat # Percentage of contamination per cell: new.counts$res.list$est.conp ``` DecontX Performance check ``` estimated.contamination.percentage = new.counts$res.list$est.conp plot( true.contamination.percentage, estimated.contamination.percentage) ; abline(0,1) ``` ## 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.](https://groups.google.com/forum/#!forum/celda-list)