salilab / bayesian_hdx

Support code for HDX data reduction
GNU Lesser General Public License v2.1
3 stars 3 forks source link

NameError: global name 'delscore' is not defined #2

Closed r78v10a07 closed 5 years ago

r78v10a07 commented 5 years ago

I've got an error while trying to run your example code on OpenSuSe Leap 15 using python 2.7

The command:

(venv-2.7) perseo:examples> export PYTHONPATH=../pyext/src/
(venv-2.7) perseo:examples> python workbench_executable.py HDXWorkbench_example/Data_Export_HDX_Workbench.csv HDXWorkbench_example_out/

The error:

Calculating overlaps and casting to gridsize 10
Traceback (most recent call last):
  File "workbench_executable.py", line 143, in <module>
    outfile_prefix="Macro", outdir=outputdir)
  File "/home/veraalva/workplace/bayesian_hdx/bayesian_hdx/pyext/src/sampling.py", line 358, in simulated_annealing
    save_results=save_all, outdir=outdir, outfile_prefix=outfile_prefix, noclobber=noclobber)
  File "/home/veraalva/workplace/bayesian_hdx/bayesian_hdx/pyext/src/sampling.py", line 402, in do_mc_sampling
    score=exp_model_sector_MC_step(s, exp_model, exp_model.frags, temp, sigma, error_model, sample_sigma)
  File "/home/veraalva/workplace/bayesian_hdx/bayesian_hdx/pyext/src/sampling.py", line 488, in exp_model_sector_MC_step
    elif randn < numpy.exp(-(delscore)/1):#temp):
NameError: global name 'delscore' is not defined

My python env:

backports.functools-lru-cache==1.5
cycler==0.10.0
kiwisolver==1.0.1
matplotlib==2.2.3
numpy==1.16.1
pyparsing==2.3.1
python-dateutil==2.8.0
pytz==2018.9
scipy==1.2.1
six==1.12.0
subprocess32==3.5.3
tkBasic==0.2
saltzberg commented 5 years ago

Thanks for this. Fixed with bc033dcb680ea466c3d0f65871cc0b213610f69e.