uym2 / TreeShrink

Implementation of the TreeShrink problem
https://uym2.github.io/TreeShrink/
GNU General Public License v3.0
36 stars 11 forks source link

Error in running example dataset #34

Open FrancisNge opened 2 years ago

FrancisNge commented 2 years ago

Hi there,

I seem to have the same problem as others but I'm not sure what the issue is. I've tried using different R versions (v3.5, v4.0) to double check as your FQ&A mentions that TreeShrink might not be compatible with R v4.

My python version is 3.9.7

But I have this issue despite changing the R versions on my PC. I've also tried your pre-release (v1.3.8b) version (to clarify, this uses Python's Scipy?), but am still having issues.

Any help would be appreciated thanks. The error log is as below. Francis

(base) Francis-Mac21:treeshrink-1.3.7-py39_0 FrancisNge$ run_treeshrink.py -t test_data/mm10.trees Launching TREESHRINK version 1.3.7 TREESHRINK was called as follow /Users/FrancisNge/opt/anaconda3/bin/run_treeshrink.py -t test_data/mm10.trees There are only 10 gene trees in the dataset. TreeShrink will run in 'All-genes' mode 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 Solving k-shrink with k = 7 Solving k-shrink with k = 7 Solving k-shrink with k = 7 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 "/Users/FrancisNge/opt/anaconda3/bin/run_treeshrink.py", line 345, in main() File "/Users/FrancisNge/opt/anaconda3/bin/run_treeshrink.py", line 246, in main threshold = float(check_output(["Rscript",normpath(join(libdir,"R_scripts","find_threshold_lkernel.R")),libdir,filename,q]).lstrip().rstrip()[5:]) File "/Users/FrancisNge/opt/anaconda3/lib/python3.9/subprocess.py", line 424, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/Users/FrancisNge/opt/anaconda3/lib/python3.9/subprocess.py", line 528, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['Rscript', '/Users/FrancisNge/opt/anaconda3/lib/python3.9/site-packages/R_scripts/find_threshold_lkernel.R', '/Users/FrancisNge/opt/anaconda3/lib/python3.9/site-packages', '/var/folders/zz/z1n1jf9s7k5_q8l1rsm9szjh0000gn/T/tmpa3uvmhmq/all_genes.dat', '0.05']' returned non-zero exit status 1.

miferg commented 1 year ago

I used the anaconda command to install treeshrink (1.3.7 was installed). After that I installed R (4.2) and ran the script with the test data. It gives me the same error.

miferg commented 1 year ago

I installed it from the github repository and then it worked (version 1.3.9).

FrancisNge commented 1 year ago

Thanks I cloned the GitHub repository and it is working now!