diffexpnb {RaceID} | R Documentation |
Function for differential expression analysis
Description
This function performs differential expression analysis between two sets of single cell transcriptomes. The inference is based on a noise model or relies on the DESeq2
approach.
Usage
diffexpnb(
x,
A,
B,
DESeq = FALSE,
method = "pooled",
norm = FALSE,
vfit = NULL,
locreg = FALSE,
...
)
Arguments
x |
expression data frame with genes as rows and cells as columns. Gene IDs should be given as row names and cell IDs should be given as column names. This can be a reduced expression table only including the features (genes) to be used in the analysis. This input has to be provided if |
A |
vector of cell IDs corresponding column names of |
B |
vector of cell IDs corresponding column names of |
DESeq |
logical value. If |
method |
either "per-condition" or "pooled". If DESeq is not used, this parameter determines, if the noise model is fitted for each set separately ("per-condition") or for the pooled set comprising all cells in |
norm |
logical value. If |
vfit |
function describing the background noise model. Inference of differentially expressed genes can be performed with a user-specified noise model describing the expression variance as a function of the mean expression. Default value is |
locreg |
logical value. If |
... |
additional arguments to be passed to the low level function |
Value
If DESeq
equals TRUE
, the function returns the output of DESeq2. In this case list of the following two components is returned:
cds |
object returned by the DESeq2 function |
res |
data frame containing the results of the DESeq2 analysis. |
Otherwise, a list of three components is returned:
vf1 |
a data frame of three columns, indicating the mean |
vf2 |
a data frame of three columns, indicating the mean |
res |
a data frame with the results of the differential gene expression analysis with the structure of the |
Examples
sc <- SCseq(intestinalDataSmall)
sc <- filterdata(sc)
sc <- compdist(sc)
sc <- clustexp(sc)
sc <- findoutliers(sc)
A <- names(sc@cpart)[sc@cpart %in% c(1,2)]
B <- names(sc@cpart)[sc@cpart %in% c(3)]
y <- diffexpnb(getfdata(sc,n=c(A,B)), A=A, B=B )