View source: R/CallDMRs.paramEsti.R
CallDMRs.paramEsti | R Documentation |
TRESS models the read counts in candidate DMR using hierarchical negative binomial distribution, with methylation level of each DMR linked to multi-factors in the design by a linear framework. This function conducts model fitting, parameter estimation, and the variance-covariance matrix computation.
CallDMRs.paramEsti(counts, sf,
model, variable,
shrkPhi = TRUE,
addsuedo = FALSE)
counts |
A dataframe containing read counts in each candidate DMR across all samples. |
sf |
A numerical vector of size factors for all samples. |
variable |
A dataframe containing condition information of all samples. |
model |
A formula to specify which factor in "variable" to be included in model fitting. |
shrkPhi |
A logical value indicating whether conducting shringkage estimate for dispersion parameter. Default is TRUE. |
addsuedo |
A logical value indicating whether or not adding a psuedo count of 5 on raw read counts. Default is FALSE. |
This function returns a list containing:
Ratio |
A dataframe containing the IP/input ratio from all samples. |
loglik |
A numerical vector containing the log-likelihood of all DMRs. |
Coef |
A matrix containing estimates of coefficients in the design. |
Cov |
A list of variance-covariance matrix estimates for all DMRs. |
# A toy example
data(DMR_M3vsWT) # data from TRESS
variable = data.frame(predictor = rep(c("WT", "M3"), c(2, 2)))
model = ~1+predictor
DMRfit = CallDMRs.paramEsti(
counts = DMR_M3vsWT$Counts,
sf = DMR_M3vsWT$sf,
variable = variable,
model = model
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.