ococrook / RexMS

Residue-level analysis of HDX-MS
https://ococrook.github.io/RexMS/
6 stars 0 forks source link

[BUG] Error with RexProcess when first residue is not 1 #4

Open nlgittens opened 1 month ago

nlgittens commented 1 month ago

This one had been puzzling me for a while: RexProcess function will not work unless the starting residue is 1, giving the following error message:

`data("BRD4_apo") BRD4_apo$Start <- BRD4_apo$Start + 10 BRD4_apo$End <- BRD4_apo$End + 10 BRD4_apo <- DataFrame(BRD4_apo) BRD4_apo <- cleanHDX(res = BRD4_apo, clean = TRUE) BRD4_apo <- data.frame(BRD4_apo) %>% filter(End < 100) BRD4_apo <- DataFrame(BRD4_apo) numTimepoints <- length(unique(BRD4_apo$Exposure)) Timepoints <- unique(BRD4_apo$Exposure) numPeptides <- length(unique(BRD4_apo$Sequence))

set.seed(1) rex_test <- rex(HdxData = BRD4_apo, numIter = 10, R = max(BRD4_apo$End), density = "laplace", numtimepoints = numTimepoints, timepoints = Timepoints, seed = 1L, tCoef = c(0, rep(1, numTimepoints - 1)), phi = 1, BPPARAM = SerialParam())

rex_test <- RexProcess(HdxData = DataFrame(BRD4_apo), params = rex_test, range = 1:10, thin = 1, whichChains = c(1,2))` Error in dimnames(x) <- dn : length of 'dimnames' [2] not equal to array extent

This didn't seem to be a problem when running on a local PC, but when I compiled everything to run on hpc, I started getting this error. So wondering if it might be a version issue in one of my packages? I can provide the sessionInfo if that's useful. Manually working through RexProcess didn't seem to provide any clues because then the function worked.

ococrook commented 1 month ago

I think this works - maybe check the version as this was a bug previously

ococrook commented 1 month ago

image

Shifting by 10, there is no data until 10 and then we get an uptake so I think it works

nlgittens commented 1 month ago

I was confused because I am on RexMS_0.99.4 - is this not the latest?