Plot Residue level error rates to identify points where modelling is poor

plotResidueResolution(rex_params, nrow = 1, interval = NULL)

Arguments

rex_params

An object of class RexParams

nrow

The number of rows in the facet (to seperate timepoints)

interval

The interval to plot (Residues)

Value

Returns a ggplot object

Examples

require(RexMS)
require(dplyr)
require(ggplot2)

data("BRD4_apo")

BRD4_apo <- BRD4_apo %>% filter(End < 100)
numTimepoints <- length(unique(BRD4_apo$Exposure))
Timepoints <- unique(BRD4_apo$Exposure)
numPeptides <- length(unique(BRD4_apo$Sequence))

rex_test <- rex(HdxData = DataFrame(BRD4_apo),
               numIter = 10,
               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_test <- RexProcess(HdxData = DataFrame(BRD4_apo),
                      params = rex_test,
                      range = 5:10,
                      thin = 1, whichChains = c(1,2))

gg1 <- plotResidueResolution(rex_params = rex_test, nrow = 5)
                                                                   
print(gg1)
#> Warning: Removed 115 rows containing missing values or values outside the scale range
#> (`geom_point()`).
#> Warning: Removed 2 rows containing missing values or values outside the scale range
#> (`geom_line()`).