Learn R Programming

RaceID (version 0.3.9)

clustdiffgenes: 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)

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 cl.

mean.cl

mean expression across cells within cluster cl.

fc

fold-change of mean expression in cluster cl versus the remaining cells.

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.

Arguments

object

SCseq class object.

cl

A valid set of cluster numbers from the final cluster partition stored in the cpart slot of the SCseq object.

bgr

Ordered vector of cluster numbers to be used as background set. If NULL then all clusters not in cl are used as background set.

pvalue

Positive real number smaller than one. This is the p-value cutoff for the inference of differential gene expression. Default is 0.01.

Examples

Run this code
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,])

Run the code above in your browser using DataLab