| clustdiffgenes {RaceID} | R Documentation | 
Inference of differentially expressed genes in a cluster
Description
This functions computes differentially expressed genes in a (set of) cluster(s) by comparing to all remaining cells outside of the cluster (or a given background set of clusters) based on a negative binomial model of gene expression
Usage
clustdiffgenes(object, cl, bgr = NULL, pvalue = 0.01)
Arguments
| object | 
 | 
| cl | A valid set of cluster numbers from the final cluster partition stored in the  | 
| bgr | Ordered vector of cluster numbers to be used as background set. If  | 
| pvalue | Positive real number smaller than one. This is the p-value cutoff for the inference of differential gene expression. Default is 0.01. | 
Value
A list of two components. The first component dg contains a a data.frame of differentially expressed genes ordered by p-value in increasing order, with four columns:
| mean.ncl | mean expression across cells outside of cluster  | 
| mean.cl | mean expression across cells within cluster  | 
| fc | fold-change of mean expression in cluster  | 
| pv | inferred p-value for differential expression. | 
| padj | Benjamini-Hochberg corrected FDR. | 
The second component de contains the conventional output of diffexpnb, where set B corresponds to all clusters in cl and B to the background set (all clusters in bgr or not in cl). This component can be used for plotting by plotdiffgenesnb.
Examples
sc <- SCseq(intestinalDataSmall)
sc <- filterdata(sc)
sc <- compdist(sc)
sc <- clustexp(sc)
sc <- findoutliers(sc)
x <- clustdiffgenes(sc,1)
head(x$dg[x$dg$fc>1,])