| pbDS | R Documentation | 
pbDS tests for DS after aggregating single-cell 
measurements to pseudobulk data, by applying bulk RNA-seq DE methods, 
such as edgeR, DESeq2 and limma.
pbDS(
  pb,
  method = c("edgeR", "DESeq2", "limma-trend", "limma-voom", "DD"),
  design = NULL,
  coef = NULL,
  contrast = NULL,
  min_cells = 10,
  filter = c("both", "genes", "samples", "none"),
  treat = FALSE,
  verbose = TRUE,
  BPPARAM = SerialParam(progressbar = verbose)
)
pbDD(
  pb,
  design = NULL,
  coef = NULL,
  contrast = NULL,
  min_cells = 10,
  filter = c("both", "genes", "samples", "none"),
  verbose = TRUE,
  BPPARAM = SerialParam(progressbar = verbose)
)
| pb | a  | 
| method | a character string. | 
| design | For methods  | 
| coef | passed to  | 
| contrast | a matrix of contrasts to test for
created with  | 
| min_cells | a numeric. Specifies the minimum number of cells in a given cluster-sample required to consider the sample for differential testing. | 
| filter | character string specifying whether to filter on genes, samples, both or neither. | 
| treat | logical specifying whether empirical Bayes moderated-t 
p-values should be computed relative to a minimum fold-change threshold. 
Only applicable for methods  | 
| verbose | logical. Should information on progress be reported? | 
| BPPARAM | a  | 
a list containing
a data.frame with differential testing results,
 a DGEList object of length nb.-clusters, and
 the design matrix, and contrast or coef used.
Helena L Crowell & Mark D Robinson
Crowell, HL, Soneson, C, Germain, P-L, Calini, D, Collin, L, Raposo, C, Malhotra, D & Robinson, MD: On the discovery of population-specific state transitions from multi-sample multi-condition single-cell RNA sequencing data. bioRxiv 713412 (2018). doi: https://doi.org/10.1101/713412
# simulate 5 clusters, 20% of DE genes
data(example_sce)
    
# compute pseudobulk sum-counts & run DS analysis
pb <- aggregateData(example_sce)
res <- pbDS(pb, method = "limma-trend")
names(res)
names(res$table)
head(res$table$stim$`B cells`)
# count nb. of DE genes by cluster
vapply(res$table$stim, function(u) 
  sum(u$p_adj.loc < 0.05), numeric(1))
# get top 5 hits for ea. cluster w/ abs(logFC) > 1
library(dplyr)
lapply(res$table$stim, function(u)
  filter(u, abs(logFC) > 1) %>% 
    arrange(p_adj.loc) %>% 
    slice(seq_len(5)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.