You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I encountered some issues yesterday whilst implementing this package and would suggest a few changes/fixes:
PolySTest_unpaired failed for me originally, until I replaced in rp_unpaired the row save(RPparOut, tData, trefData, file = "/tmp/t.csv") with save(RPparOut, tData, trefData, file = paste0(getwd(), "/tmp.csv")); I assume the former is a Linux format path? As far as I can tell this file is anyway not being read so it does not make sense that the function should break if it is present. Maybe change the file name to something clearer, e.g. "rp_unpaired_output.csv"?
PolySTest_paired failed until I made 2 changes to permtest_paired:
I had to insert tMAData <- as.matrix(tMAData)RealStats <- PolySTest::StatsForPermutTest(tMAData, Paired = TRUE), otherwise the latter line failed because tMAData is a data.frame.
I also had to change sample(y, NumReps) * sample(c(1, -1), NumReps, replace = TRUE) to sample(unlist(y), NumReps) * sample(c(1, -1), NumReps, replace = TRUE)
NumThreads <- get_numthreads() only works if SHINY_THREADS is set, otherwise it returns 1 even though often people have a large number of available threads, there should be a safe higher amount to use, so you could instead use something like NumThreads <- max(c(round(parallel::detectCores()*0.95)-1, 1)).
More of a comment than a bug: t should be more explicit that a column named "Condition" is required by PolySTest_unpaired (or maybe this can be avoided? It doesn't seem to be required for PolySTest_paired).
Just a general comment: the paired permutations test seems exceedingly slow, maybe this can be improved?
Activity