ekirving / qpbrute

Heuristic search algorithm for fitting qpGraph models
MIT License
9 stars 3 forks source link

qpBayes can't install library(fitR) #20

Closed MY0NEMA closed 5 months ago

MY0NEMA commented 1 year ago

hej!

I was trying to run qpBayes on my data running qpBrute via conda environment. but I end up with this error:

multiprocess.pool.RemoteTraceback: """ Traceback (most recent call last): File "/proj/snic2020-2-19/private/herring/users/myonema/Conda/env-qpbrute/lib/python3.8/site-packages/multiprocess/pool.py", line 125, in worker result = (True, func(*args, *kwds)) File "/proj/snic2020-2-19/private/herring/users/myonema/Conda/env-qpbrute/lib/python3.8/site-packages/multiprocess/pool.py", line 48, in mapstar return list(map(args)) File "/proj/snic2020-2-19/private/herring/users/myonema/Conda/env-qpbrute/lib/python3.8/site-packages/pathos/helpers/mp_helper.py", line 15, in func = lambda args: f(*args) File "/proj/snic2020-2-19/private/herring/users/myonema/Conda/env-qpbrute/lib/python3.8/site-packages/qpbrute/qpbayes.py", line 212, in model_likelihood run_cmd( File "/proj/snic2020-2-19/private/herring/users/myonema/Conda/env-qpbrute/lib/python3.8/site-packages/qpbrute/utils.py", line 67, in run_cmd raise RuntimeError(f"ERROR: '{err}'; RETCODE:{proc.returncode}\n" + " ".join(cmd)) RuntimeError: ERROR: 'b'Error in library(fitR) : there is no package called \xe2\x80\x98fitR\xe2\x80\x99\nCalls: quiet -> suppressMessages -> withCallingHandlers\nExecution halted\n''; RETCODE:1 Rscript /proj/snic2020-2-19/private/herring/users/myonema/Conda/env-qpbrute/lib/python3.8/site-packages/qpbrute/rscript/model_likelihood.R run1 3a58d7938286 run1/dstats/run1.csv 2 5 2000000 1100000 """

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/proj/snic2020-2-19/private/herring/users/myonema/Conda/env-qpbrute/bin/qpBayes", line 8, in sys.exit(qpbayes()) File "/proj/snic2020-2-19/private/herring/users/myonema/Conda/env-qpbrute/lib/python3.8/site-packages/qpbrute/qpbayes.py", line 372, in qpbayes calculate_bayes_factors( File "/proj/snic2020-2-19/private/herring/users/myonema/Conda/env-qpbrute/lib/python3.8/site-packages/qpbrute/qpbayes.py", line 291, in calculate_bayes_factors qpb.calculate_bayes_factors() File "/proj/snic2020-2-19/private/herring/users/myonema/Conda/env-qpbrute/lib/python3.8/site-packages/qpbrute/qpbayes.py", line 196, in calculate_bayes_factors pool.map(self.model_likelihood, self.graphs) The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/proj/snic2020-2-19/private/herring/users/myonema/Conda/env-qpbrute/bin/qpBayes", line 8, in sys.exit(qpbayes()) File "/proj/snic2020-2-19/private/herring/users/myonema/Conda/env-qpbrute/lib/python3.8/site-packages/qpbrute/qpbayes.py", line 372, in qpbayes calculate_bayes_factors( File "/proj/snic2020-2-19/private/herring/users/myonema/Conda/env-qpbrute/lib/python3.8/site-packages/qpbrute/qpbayes.py", line 291, in calculate_bayes_factors qpb.calculate_bayes_factors() File "/proj/snic2020-2-19/private/herring/users/myonema/Conda/env-qpbrute/lib/python3.8/site-packages/qpbrute/qpbayes.py", line 196, in calculate_bayes_factors pool.map(self.model_likelihood, self.graphs) File "/proj/snic2020-2-19/private/herring/users/myonema/Conda/env-qpbrute/lib/python3.8/site-packages/pathos/multiprocessing.py", line 137, in map calculate_bayes_factors( File "/proj/snic2020-2-19/private/herring/users/myonema/Conda/env-qpbrute/lib/python3.8/site-packages/qpbrute/qpbayes.py", line 291, in calculate_bayes_factors qpb.calculate_bayes_factors() File "/proj/snic2020-2-19/private/herring/users/myonema/Conda/env-qpbrute/lib/python3.8/site-packages/qpbrute/qpbayes.py", line 196, in calculate_bayes_factors pool.map(self.model_likelihood, self.graphs) File "/proj/snic2020-2-19/private/herring/users/myonema/Conda/env-qpbrute/lib/python3.8/site-packages/pathos/multiprocessing.py", line 137, in map return _pool.map(star(f), zip(*args)) # chunksize File "/proj/snic2020-2-19/private/herring/users/myonema/Conda/env-qpbrute/lib/python3.8/site-packages/multiprocess/pool.py", line 364, in map return self._map_async(func, iterable, mapstar, chunksize).get() File "/proj/snic2020-2-19/private/herring/users/myonema/Conda/env-qpbrute/lib/python3.8/site-packages/multiprocess/pool.py", line 771, in get raise self._value RuntimeError: ERROR: 'b'Error in library(fitR) : there is no package called \xe2\x80\x98fitR\xe2\x80\x99\nCalls: quiet -> suppressMessages -> withCallingHandlers\nExecution halted\n''; RETCODE:1 Rscript /proj/snic2020-2-19/private/herring/users/myonema/Conda/env-qpbrute/lib/python3.8/site-packages/qpbrute/rscript/model_likelihood.R run1 3a58d7938286 run1/dstats/run1.csv 2 5 2000000 1100000

I tried to install the R package in the environment using:

library(remotes) install_github("sbfnk/fitR", dependencies = TRUE)

but it also throws: Downloading GitHub repo sbfnk/fitR@HEAD Error in utils::download.file(url, path, method = method, quiet = quiet, : download from 'https://api.github.com/repos/sbfnk/fitR/tarball/HEAD' failed

can anyone help to fix it?

thanks + cheers, myo

ekirving commented 9 months ago

Sorry for the long delay in replying to your issue.

Did you find a workaround for your problem? I've just tried to install fitR and it works fine for me.