TCC (version 1.12.1)

getResult: Obtain the summaries of results after the differential expression analysis

Description

This function is generally used after the estimateDE function. It retrieves the summaries of differential expression (DE) results from TCC-class object. The retrieved information includes $p$-values, $q$-values, coordinates of M-A plot (i.e., M and A values), and so on.

Usage

getResult(tcc, sort = FALSE, ...)

Arguments

tcc
TCC-class object
sort
logical. If TRUE, the retrieved results are sorted in order of the stat$rank field in the TCC-class object. If FALSE, the results are retrieved by the original order.
...
further arguments for calculating the coordinates of M-A plot. See plot for details.

Value

A data frame object containing following fields:
gene_id
character vector indicating the id of the count unit, usually gene.
a.value
numeric vector of average expression level on log2 scale (i.e., A-value) for each gene across the compared two groups. It corresponds to the $x$ coordinate in the M-A plot.
m.value
numeric vector of fold-change on $\log_2$ scale (i.e., M-value) for each gene between the two groups compared. It corresponds to the $y$ coordinate in the M-A plot.
p.value
numeric vector of $p$-value.
q.value
numeric vector of $q$-value calculated based on the $p$-value using the p.adjust function with default parameter settings.
rank
numeric vector of gene rank in order of the $p$-values.
estimatedDEG
numeric vector consisting of 0 or 1 depending on whether each gene is classified as non-DEG or DEG. The threshold for classifying DEGs or non-DEGs is preliminarily given when performing estimateDE.

Examples

Run this code
# Obtaining DE results by an exact test in edgeR coupled with
# the DEGES/edgeR normalization factors.
data(hypoData)
group <- c(1, 1, 1, 2, 2, 2)
tcc <- new("TCC", hypoData, group)
tcc <- calcNormFactors(tcc, norm.method = "tmm", test.method = "edger",
                       iteration = 1, FDR = 0.1, floorPDEG = 0.05)
tcc <- estimateDE(tcc, test.method = "edger", FDR = 0.1)
result <- getResult(tcc, sort = TRUE)
head(result)

# Obtaining DE results by an negative binomial test in DESeq
# coupled with the iterative DEGES/DESeq normalization method.
tcc <- new("TCC", hypoData, group)
tcc <- calcNormFactors(tcc, norm.method = "deseq", test.method = "deseq",
                       iteration = 1, FDR = 0.1, floorPDEG = 0.05)
tcc <- estimateDE(tcc, test.method = "deseq", FDR = 0.1)
result <- getResult(tcc, sort = TRUE)
head(result)

Run the code above in your browser using DataLab