Skip to content
No description, website, or topics provided.
R
Branch: master
Clone or download
Latest commit 478f373 Aug 31, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R More detailed help pages Aug 31, 2018
data Add examples to the package Oct 31, 2017
man More detailed help pages Aug 31, 2018
.Rbuildignore Initial commit Oct 18, 2017
.gitignore Initial commit Oct 18, 2017
DESCRIPTION Add examples to the package Oct 31, 2017
NAMESPACE Add examples to the package Oct 31, 2017
README.md Update readme Aug 31, 2018
descend.Rproj Initial commit Oct 18, 2017

README.md

descend

R package for DESCEND

DESCEND deconvolves the true gene expression distribution across cells for UMI scRNA-seq counts. It provides estimates of several distribution based statistics (five distribution measurements and the coefficients of covariates (such as batches or cell size)). Based on the estimation, DESCEND also can perform highly variable selection and differential testing of dispersion and burstiness measurements between two groups of cells with covariates adjustment.

Installation:

library(devtools)
install_github("jingshuw/descend")

Examples:

(for a Windows machine, add the argument: type = "PSOCK" to each of the function that needs parallization)

For a single cell population, DESCEND can be used to find highly variable genes (HVG).

 library(descend)
 data(zeisel)

 result <- runDescend(zeisel$count.matrix.small, 
                      scaling.consts = zeisel$library.size, n.cores = 3)

 hvg <- findHVG(result)

 hvg$HVG.genes
 result1 <- runDescend(zeisel$count.matrix.small, 
                       zeisel$ercc.matrix, ercc.trueMol = zeisel$trueMol,
                       Z0 = log(zeisel$cell.size),
                       n.cores = 3)
 
 ests <- getEstimates(result1)
 ests$CV

For two or more cell popluations, DESCEND can perform differential testing of several distribution measurements between any of the two cell groups with covariates adjustment.

  set.seed(1)

  result.multi <- descendMultiPop(zeisel$count.matrix.small,
                                  labels = zeisel$labels,
                                  scaling.consts = zeisel$library.size,
                                  Z0 = log(zeisel$cell.size), verbose = F, show.message = F,
                                  n.cores = 2)

  ##try 100 null genes first:
  detest.result <- deTest(result.multi, c("endothelial-mural", "pyramidal CA1"),
                          zeisel$count.matrix.small, zeisel$labels,
                          verbose = F, show.message = F,
                          N.genes.null = 100, n.cores = 2)
  
  ## 100 null genes may not get small enough p-values
  detest.result <- deTest.more(result.multi, detest.result, 
                               c("endothelial-mural", "pyramidal CA1"),
                               zeisel$count.matrix.small, labels = zeisel$labels, 
                               N.more.genes = 200, verbose = F, 
                               n.cores = 2)
  
  layout(matrix(1:4, nrow = 2))
  de.scores1 <- plotDeTest(result.multi, c("endothelial-mural", "pyramidal CA1"),
                          detest.result, measurement.name = "Gini", alpha = 0.05)
  de.scores2 <- plotDeTest(result.multi, c("endothelial-mural", "pyramidal CA1"),
                          detest.result, measurement.name = "Active Intensity", 
                          alpha = 0.05, log = "xy")
  de.scores3 <- plotDeTest(result.multi, c("endothelial-mural", "pyramidal CA1"),
                          detest.result, measurement.name = "Active Fraction", alpha = 0.1)
  de.scores4 <- plotDeTest(result.multi, c("endothelial-mural", "pyramidal CA1"),
                          detest.result, measurement.name = "Z0 Adjusted Active Fraction", alpha = 0.1)

More case study examples:

For Source code of how the case studies in the paper are performed with DESCEND, please check the repository jingshuw/DESCEND_manuscript_source_code

You can’t perform that action at this time.