Hi MixOmics team,
I asssisted the MixOmics workshop in Perth. I have been going through the TimeOmics section of the workshop (just running the code with the datasets/functions provided) and I have been getting a number of errors with the provided functions; specifically wrapper.filter.splines, get_MSE.
Here is the error for wrapper.filter.splines (same happens with get_MSE)
filter.splineC ← wrapper.filter.splines(as.data.frame(babyC.clr), babyC.pspline)
Error: Join columns must be unique.
x Problem at position 2.
Runrlang::last_error()
to see where the error occurred.
Called from: signal_abort(cnd)
Going through the code, it looks like the error is in line 39 of the wrapper.filter.splines function
result ← result %>% left_join(BP.res, by = c(“molecule”, “molecule”))
which seems to work when
result ← result %>% left_join(BP.res, by = c(“molecule”))
In the case of get_MSE, the bug is in this chunk of code
res <- left_join(X1, X2, by = c("molecule" = "molecule", "time"="time")) %>%
na.omit() %>% # filter pred time that are not included in raw_data
mutate(error = (Yi-Y_hat)^2) %>%
group_by(molecule, model_used) %>%
summarise(MSE = mean(error))
Again, there is a bug in the “by” argument of left_joint()
Working on these funcions, I have been able to reproduce the results up to the PCA on spline profiles. However, it looks like the functions for clustering spline profiles do not work with my output files and I am getting a lot of errors again.
I am just wondering if you could please help with this or just sharing the debugged functions.
Many thanks in advance.
cheers,
Jose