View source: R/TRESS_DMRtest.R
| TRESS_DMRtest | R Documentation | 
This function conducts statistical test for each candidate DMR based on user specified contrast of coefficients in design.
TRESS_DMRtest(DMR, contrast, nullModel = "standN")
DMR | 
 A list at least containing IP/input ratio,
the coefficients estimate,
variance-covariance estimate.
This can be obtained from the ouput of   | 
contrast | 
 A contrast for all coefficients in the design. It can be either a (p+1) vector or a m-by-(p+1) matrix, where p is the number of columns in the design. m depends on the number of relationships that users want to test.  | 
nullModel | 
 A character to specify a method to calculate p-value based on the statistics. It can be "standN", "2mix" and "trunN" for standard normal, two-component mixed gaussian and truncated normal respectively. Defult is "standN".  | 
The hypothesis for each of candidate DMR i is of the form:
H_0: C^TR_i = 0 vs. H_1: C^TR_i \neq 0
where C is a contrast of all coefficients in model design;
R_i is coefficient vector for DMR i.
If the C is a vector, then TRESS performs Wald test;
if the C is a matrix, then TRESS conducts F-test.
This function returns a dataframe containing the testing results for specified contrast. The columns are
baseMean | 
 Averaged methylation level cross all samples.  | 
logOR | 
 Estimated value of contrast:   | 
lorSE | 
 Standard error of   | 
stat | 
 Test statistics.  | 
pvalue | 
 P-values from statistical tests.  | 
padj | 
 Benjamini-Hochberg procedure adjusted p-values.  | 
Zhenxing Guo <zhenxing.guo@emory.edu>
Zhenxing Guo, Andrew M. Shafik, Peng Jin, Hao Wu. (2022) Differential RNA Methylation Analysis for MeRIP-seq Data under General Experimental Design. Bioinformatics, 38 (20), 4705-4712. https://academic.oup.com/bioinformatics/article/38/20/4705/6692302?login=true
# A toy example
data(DMR_M3vsWT) # data from TRESS
variable = data.frame(predictor = rep(c("WT", "M3"), c(2, 2)))
model = ~1+predictor
DMR.fit = CallDMRs.paramEsti(
    counts = DMR_M3vsWT$Counts,
    sf = DMR_M3vsWT$sf,
    variable = variable,
    model = model
    )
DMR.test = TRESS_DMRtest(DMR = DMR.fit, contrast = c(0, 1))
head(DMR.test, 3)
head(DMR_M3vsWT$Regions[which(DMR.test$padj < 0.05), ], 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.