ekirving/qpbrute

qpBayes RuntimeError

Closed this issue · 7 comments

Hi Evan,

Happy new year.

Sorry to start the year off with GitHub errors again. I'm having issues running qpBayes, even for the sim1 files. I'm on qpbrute v0.2.

Attached are the (successful) log from the qpBrute run and unsuccessful qpBayes run and associated error code.

qpBayes_error_2021-01-02.txt
sim1.log
sim1.bayes.log

Thanks for reporting this issue, and happy new year to you also.

Your error is happening inside the R script that calculates the Bayes factor for the model, but the script is not returning an error message to indicate what the problem is.

Line 24 in qpBayes_error_2021-01-02.txt indicates the command that is failing. Can you please run this manually on the command line (from the same folder where you ran qpBayes) and let me know what happens?

Thanks for your advice. It seems that the entire rscipt folder is absent, which is strange since I installed it with the yaml file provided.

Rscript /home/user/anaconda3/envs/qpbrutev02/lib/python3.8/site-packages/qpbrute/rscript/model_likelihood.R sim1 204a55b9d2f0 sim1/dstats/sim1.csv 2 5 2000000 1100000
Fatal error: cannot open file '/home/user/anaconda3/envs/qpbrutev02/lib/python3.8/site-packages/qpbrute/rscript/model_likelihood.R': No such file or directory

user@user:~/anaconda3/envs/qpbrutev02/lib/python3.8/site-packages/qpbrute$ ls consts.py __pycache__ qpbrute.py utils.py __init__.py qpbayes.py qpcluster.py

Yes, the rscript folder was indeed missing from the package manifest. Sorry about that.

I've pushed a fix to github, which you can install by running:

pip install --upgrade --no-deps --force-reinstall git+git://github.com/ekirving/qpbrute.git

Thanks Evan!

I'm still facing errors though, with the following error when I run the R script independently


(qpbrutev02) user@user:/media/user/a5f0fbb0-d1f8-497a-8642-a3f31ff08fd3/dbssyck/4_qpbrute-master_releasev0.2/qpbrute$ Rscript /home/user/anaconda3/envs/qpbrutev02/lib/python3.8/site-packages/qpbrute/rscript/model_likelihood.R sim1 204a55b9d2f0 sim1/dstats/sim1.csv 2 5 2000000 1100000
Error: package ‘adaptivetau’ could not be loaded
Execution halted

That's odd. I'm not using adaptivetau, but it appears to be a dependency for one of the packages I am using, which conda should have recognised.

Can you please try opening R and loading the library manually? (i.e. library("adaptivetau"))

If that throws an error, then try installing the package directly (i.e. install.packages("adaptivetau"))

It works now! Thank you so much again for your help.

You're welcome! Glad to hear it's running smoothly.