Description Usage Arguments Details Value Examples
This function calculates p-values (or the related statistics) for
identifying differentially expressed genes (DEGs) from a
TCC-class object.
estimateDE
internally calls a specified method
implemented in other R packages.
1 2 3 4 5 6 7 8 9 | estimateDE(tcc, test.method, FDR, paired,
full, reduced, # for DESeq2
design, contrast, # for edgeR, DESeq2, voom
coef, # for edgeR, voom
group, cl, # for baySeq
samplesize, # for baySeq, SAMseq
logged, floor, # for WAD
...
)
|
tcc |
TCC-class object. |
test.method |
character string specifying a method for identifying
DEGs: one of |
FDR |
numeric value (between 0 and 1) specifying the threshold for determining DEGs. |
paired |
logical. If |
full |
a formula for creating full model described in
DESeq2. The right hand side can involve any column of |
reduced |
a formula for creating reduced model described in DESeq2.
The right hand side can involve any column of |
design |
the argument is used in edgeR, voom (limma) and DESeq2.
For edgeR and voom, it should be the numeric matrix giving the
design matrix for the generalized linear model.
See the |
contrast |
the argument is used in edgeR and DESeq2.
For edgeR, numeric vector specifying a contrast of the linear model
coefficients to be tested equal to zero.
See the |
coef |
integer or character vector indicating which coefficients
of the linear model are to be tested equal to zero.
See the |
group |
numeric or character string identifying the columns in
the |
cl |
|
samplesize |
integer specifying the sample size for estimating the
prior parameters if |
logged |
logical. If |
floor |
numeric scalar (> 0) specifying the floor value for
taking logarithm. The default is |
... |
further paramenters. |
estimaetDE
function is generally used after performing the
calcNormFactors
function that calculates normalization factors.
estimateDE
constructs a statistical model for differential expression
(DE) analysis with the calculated normalization factors and returns the
p-values (or the derivatives). The individual functions in other
packages are internally called according to the specified
test.method
parameter.
test.method = "edger"
There are two approaches (i.e., exact test and GLM) to identify DEGs
in edgeR. The two approches are implmented in TCC. As a default,
the exact test approach is used for two-group data,
and GLM approach is used for multi-group or multi-factor data.
However, if design
and the one of coef
or
contrast
are given, the GLM approach will be used for
two-group data.
If the exact test approach is used,
estimateCommonDisp
,
estimateTagwiseDisp
, and
exactTest
are internally called.
If the GLM approach is used,
estimateGLMCommonDisp
,
estimateGLMTrendedDisp
,
estimateGLMTagwiseDisp
,
glmFit
, and
glmLRT
are internally called.
test.method = "deseq2"
estimateDispersions
, and
nbinomWaldTest
are internally called for
identifying DEGs.
However, if full
and reduced
are given,
the nbinomLRT
will be used.
test.method = "bayseq"
getPriors.NB
and
getLikelihoods
in baySeq are internally
called for identifying DEGs.
If paired = TRUE
,
getPriors
and
getLikelihoods
in baySeq are used.
test.method = "voom"
voom
, lmFit
, and
eBayes
in limma are internally called
for identifying DEGs.
test.method = "wad"
The WAD
implemented in TCC is used for identifying
DEGs. Since WAD
outputs test statistics instead of
p-values, the tcc$stat$p.value
and
tcc$stat$q.value
are NA
.
Alternatively, the test statistics are stored in
tcc$stat$testStat
field.
A TCC-class
object containing following fields:
stat$p.value |
numeric vector of p-values. |
stat$q.value |
numeric vector of q-values calculated
based on the p-values using the |
stat$testStat |
numeric vector of test statistics if
|
stat$rank |
gene rank in order of the p-values or test statistics. |
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 as the
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Analyzing a simulation data for comparing two groups
# (G1 vs. G2) with biological replicates
# The DE analysis is performed by an exact test in edgeR coupled
# with the DEGES/edgeR normalization factors.
# For retrieving the summaries of DE results, we recommend to use
# the getResult function.
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)
head(tcc$stat$p.value)
head(tcc$stat$q.value)
head(tcc$estimatedDEG)
result <- getResult(tcc)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.