Functions for differential analysis of HDX-MS data

processDifferential(HdxData, params, whichChain = 1, num_montecarlo = 5000)

Arguments

HdxData

A data frame containing the HDX-MS data for which you want to perform the differential analysis. Typically this dataframe contains the apo data.

params

An object of class RexParams containing a fitted ReX model typically to the differential of interest (e.g. ligand binding)

whichChain

A numeric value indicating the chain to use. Default is 1.

num_montecarlo

A numeric value indicating the number of montecarlo samples to use for the error analysis. Default is 5000.

Value

An object of class RexDifferential containing the results of the differential analysis

Examples


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))

# Note change of dataset to compare with apo
rex_diff <- processDifferential(HdxData = DataFrame(BRD4_apo),
                               params = rex_example,
                               whichChain = 1,
                               num_montecarlo = 5000)