You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running PAPI on a custom tracts input file and I'm getting the following error:
Running inference in scipy-optimize mode
Traceback (most recent call last):
File "/tigress/VONHOLDT/Simona/bin/papi/src/inference.py", line 262, in <module>
MAPestimate_scipy = estimate_MAP(d_tracts,typ=args.typ,err=args.err,tau=args.tau)
File "/tigress/VONHOLDT/Simona/bin/papi/src/inference.py", line 217, in estimate_MAP
res = scipy.optimize.minimize(
File "/tigress/VONHOLDT/Simona/miniconda3/envs/papi/lib/python3.8/site-packages/scipy/optimize/_minimize.py", line 617, in minimize
return _minimize_lbfgsb(fun, x0, args, jac, bounds,
File "/tigress/VONHOLDT/Simona/miniconda3/envs/papi/lib/python3.8/site-packages/scipy/optimize/lbfgsb.py", line 306, in _minimize_lbfgsb
sf = _prepare_scalar_function(fun, x0, jac=jac, args=args, epsilon=eps,
File "/tigress/VONHOLDT/Simona/miniconda3/envs/papi/lib/python3.8/site-packages/scipy/optimize/optimize.py", line 261, in _prepare_scalar_function
sf = ScalarFunction(fun, x0, args, grad, hess,
File "/tigress/VONHOLDT/Simona/miniconda3/envs/papi/lib/python3.8/site-packages/scipy/optimize/_differentiable_functions.py", line 76, in __init__
self._update_fun()
File "/tigress/VONHOLDT/Simona/miniconda3/envs/papi/lib/python3.8/site-packages/scipy/optimize/_differentiable_functions.py", line 166, in _update_fun
self._update_fun_impl()
File "/tigress/VONHOLDT/Simona/miniconda3/envs/papi/lib/python3.8/site-packages/scipy/optimize/_differentiable_functions.py", line 73, in update_fun
self.f = fun_wrapped(self.x)
File "/tigress/VONHOLDT/Simona/miniconda3/envs/papi/lib/python3.8/site-packages/scipy/optimize/_differentiable_functions.py", line 70, in fun_wrapped
return fun(x, *args)
File "/tigress/VONHOLDT/Simona/bin/papi/src/inference.py", line 218, in <lambda>
fun=lambda params, D: -lik_func(params,d_tracts,tau),
File "/tigress/VONHOLDT/Simona/bin/papi/src/inference.py", line 77, in lik_func
l = md.computeLoglikelihood_binomial(D_flat,params[:2],alpha) + md.computeLoglikelihood_cnsPM(D_dicts,params)
File "/projects/VONHOLDT/Simona/bin/papi/src/models.py", line 176, in computeLoglikelihood_cnsPM
assert len(D) == 22
AssertionError
Could someone help me understanding what the error means?
Moreover, I have to specify the -tau even though it is written that will be automatically set as 7 is not specified, otherwise I get another error:
Running inference in scipy-optimize mode
Traceback (most recent call last):
File "/tigress/VONHOLDT/Simona/bin/papi/src/inference.py", line 262, in <module>
MAPestimate_scipy = estimate_MAP(d_tracts,typ=args.typ,err=args.err,tau=args.tau)
File "/tigress/VONHOLDT/Simona/bin/papi/src/inference.py", line 217, in estimate_MAP
res = scipy.optimize.minimize(
File "/tigress/VONHOLDT/Simona/miniconda3/envs/papi/lib/python3.8/site-packages/scipy/optimize/_minimize.py", line 617, in minimize
return _minimize_lbfgsb(fun, x0, args, jac, bounds,
File "/tigress/VONHOLDT/Simona/miniconda3/envs/papi/lib/python3.8/site-packages/scipy/optimize/lbfgsb.py", line 306, in _minimize_lbfgsb
sf = _prepare_scalar_function(fun, x0, jac=jac, args=args, epsilon=eps,
File "/tigress/VONHOLDT/Simona/miniconda3/envs/papi/lib/python3.8/site-packages/scipy/optimize/optimize.py", line 261, in _prepare_scalar_function
sf = ScalarFunction(fun, x0, args, grad, hess,
File "/tigress/VONHOLDT/Simona/miniconda3/envs/papi/lib/python3.8/site-packages/scipy/optimize/_differentiable_functions.py", line 76, in __init__
self._update_fun()
File "/tigress/VONHOLDT/Simona/miniconda3/envs/papi/lib/python3.8/site-packages/scipy/optimize/_differentiable_functions.py", line 166, in _update_fun
self._update_fun_impl()
File "/tigress/VONHOLDT/Simona/miniconda3/envs/papi/lib/python3.8/site-packages/scipy/optimize/_differentiable_functions.py", line 73, in update_fun
self.f = fun_wrapped(self.x)
File "/tigress/VONHOLDT/Simona/miniconda3/envs/papi/lib/python3.8/site-packages/scipy/optimize/_differentiable_functions.py", line 70, in fun_wrapped
return fun(x, *args)
File "/tigress/VONHOLDT/Simona/bin/papi/src/inference.py", line 218, in <lambda>
fun=lambda params, D: -lik_func(params,d_tracts,tau),
File "/tigress/VONHOLDT/Simona/bin/papi/src/inference.py", line 76, in lik_func
alpha=100/tau
TypeError: unsupported operand type(s) for /: 'int' and 'NoneType'
Many thanks!!
The text was updated successfully, but these errors were encountered:
Hi all, for the first error I figure it out the trigger was the wrong chromosome number. I am working with a bird species with 46 chromosomes. Putting assert len(D) == 46 in papi/src/models.py script solves the problem.
Hello,
I'm running PAPI on a custom tracts input file and I'm getting the following error:
Command used:
python src/inference.py --inputfile ../3_PAPI_inputs/PAPI_input_tracts.txt -ind 1 --outfile ind1_papi_output --mode scipy-optimize --typ full -tau 7
Fist line of the input file (ind1):
ind1_tracts.txt
Could someone help me understanding what the error means?
Moreover, I have to specify the -tau even though it is written that will be automatically set as 7 is not specified, otherwise I get another error:
Many thanks!!
The text was updated successfully, but these errors were encountered: