TreeShrink
TreeShrink copied to clipboard
Can R v4 be used?
Hello, Can we use R v4.0? I've just tried running the test data with R 4.0.1 and I get the error below. What version would you recommend? I'm using Python 2.7.16. Thanks
Paul
...
Solving k-shrink with k = 7
Solving k-shrink with k = 7
Solving k-shrink with k = 7
Solving k-shrink with k = 7
Solving k-shrink with k = 7
Solving k-shrink with k = 7
Solving k-shrink with k = 7
TreeShrink will run in 'Per-species' mode ...
During startup - Warning messages:
1: Setting LC_COLLATE failed, using "C"
2: Setting LC_TIME failed, using "C"
3: Setting LC_MESSAGES failed, using "C"
4: Setting LC_MONETARY failed, using "C"
Error in rank(x, ties.method = "min", na.last = "keep") :
unimplemented type 'list' in 'greater'
Calls: threshold ... as.vector -> xtfrm -> xtfrm.default -> as.vector -> rank
Execution halted
Traceback (most recent call last):
File "/usr/local/bin/run_treeshrink.py", line 4, in
Hi again, I managed to roll back to R v3.6.3 and the error went away and I got output with the test data so I think it was an R version issue. Best wishes
Paul
Hi Paul,
Thanks for letting us know about the issue. I will soon update TreeShrink to work with R v4.
Best, Uyen
It seems that the only "update" needed is just switching to an updated BMS package. Currently, the easiest quick fix is to install BMS system-wide and remove the lib.loc argument in require, such that it would pick up the default library location and not TREESHRINK-*.egg/Rlib/:
$ diff /usr/local/lib/python3*/dist-packages/TREESHRINK-*.egg/R_scripts/find_threshold_lkernel.R{.bak,}
7,8d6
< #libpath = paste(args[1],"/Rlib",sep="")
< libpath = file.path(args[1],"Rlib")
12c10
< suppressMessages(require(BMS,lib.loc=libpath))
---
> suppressPackageStartupMessages(require(BMS))