getAlpha: return the fitted value for the transcription rate.

Description Usage Arguments Value Examples

View source: R/accessFunctions.R

Description

return the fitted value for the transcription rate.

Usage

1
getAlpha(obj, by.factor = NULL, full = TRUE)

Arguments

obj

the MpraObject to extract from, must be after model fitting

by.factor

return a matrix of values, corresponding to the estimated rates of transcription under different values of a factor included in the design. Value must be of these options: NULL: (default) return only the intercept term, a single baseline rate for each enhancer "all": will return the corresponding transcription rates for all values included in the model factor name: must be a factor included in the RNA annotations and the rna design. Will return the corresponding rates for all values of the given factor

full

if true, return rate of the full model (default), otherwise of the reduced model (only applies if an LRT-based analysis was used)

Value

the estimate for transcription rate as fitted by the model

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data <- simulateMPRA(tr = rep(2,10), da=c(rep(0,5), rep(1,5)), 
                     nbatch=2, nbc=15)
obj <- MpraObject(dnaCounts = data$obs.dna, 
                  rnaCounts = data$obs.rna, 
                  colAnnot = data$annot)
obj <- estimateDepthFactors(obj, lib.factor = "batch", which.lib = "both")
obj <- analyzeComparative(obj, dnaDesign = ~ batch + barcode + condition, 
                              rnaDesign = ~ condition, reducedDesign = ~ 1)
## get alpha estimate for the two conditions
alpha <- getAlpha(obj, by.factor="condition")

YosefLab/MPRAnalyze documentation built on Nov. 14, 2020, 2:35 a.m.