processTREuncertainty.Rd
Function to obtain uncertainty estimates for the total relative error (TRE)
processTREuncertainty(
HdxData,
params,
whichChain = 1,
whichSamples = seq.int(50),
num_montecarlo = 5000
)
A data frame containing the HDX-MS data for which you want to perform the differential analysis. Typically this dataframe contains the apo data.
An object of class RexParams
containing a fitted ReX model
typically to the differential of interest (e.g. ligand binding)
A numeric value indicating the chain to use. Default is 1.
A numeric vector indicating which samples to use. Default is seq.int(50).
A numeric value indicating the number of montecarlo samples to use for the error analysis. Default is 5000.
An array of the total relative error (TRE) for each residue at each timepoint represnting uncertainty in the distribution
require(RexMS)
require(dplyr)
data(BRD4_apo)
data(BRD4_ibet)
BRD4_apo <- BRD4_apo %>% filter(End < 100)
BRD4_ibet <- BRD4_ibet %>% filter(End < 100)
numTimepoints <- length(unique(BRD4_apo$Exposure))
Timepoints <- unique(BRD4_apo$Exposure)
numPeptides <- length(unique(BRD4_apo$Sequence))
rex_example <- rex(HdxData = DataFrame(BRD4_ibet),
numIter = 100,
R = max(BRD4_apo$End),
numtimepoints = numTimepoints,
timepoints = Timepoints,
seed = 1L,
tCoef = c(0, rep(1, 5)),
BPPARAM = SerialParam())
#> Fold 1 ... Fold 2 ... Fold 3 ... Fold 4 ... Fold 5 ...
#>
|
| | 0%
#> Fold 1 ... Fold 2 ... Fold 3 ... Fold 4 ... Fold 5 ...
#>
|
| | 0%
rex_example <- RexProcess(HdxData = DataFrame(BRD4_ibet),
params = rex_example,
range = 50:100,
thin = 1,
whichChains = c(1,2))
rex_TRE_uncertainty <- processTREuncertainty(HdxData = DataFrame(BRD4_apo),
params = rex_example,
whichChain = 1,
num_montecarlo = 5000)