MISO icon indicating copy to clipboard operation
MISO copied to clipboard

Issue with psi values in miso files

Open ryanabo opened this issue 9 years ago • 2 comments

When using the function summarize_miso I am receiving the following error:

File "/data/ccgd/opt/bin/summarize_miso", line 9, in load_entry_point('misopy==0.5.3', 'console_scripts', 'summarize_miso')() File "/data/ccgd/opt/lib/python2.7/site-packages/misopy/summarize_miso.py", line 93, in main use_compressed=use_compressed) File "/data/ccgd/opt/lib/python2.7/site-packages/misopy/samples_utils.py", line 315, in summarize_sampler_results print "WARNING: Skipping %s -- mishaped file" %(samples_filename) NameError: global name 'samples_filename' is not defined

When I dug into it more, it appears that the corresponding miso file that was being summarized contains two comma-delimited values for a majority of the rows, but a single row contains three values (see below). This results in the dimension of the array being less than two in the samples_utils.py and triggers the warning message seen in the error statement. The error is due to an undefined variable for the warning message, but the reason it prints this message seems to also be an issue.

0.9721,0.0279 -215.10 0.9699,0.0301 -215.14 0.8255,0.1745 -223.78 0.9575,0.4,0.0206 -214.96 0.8791,0.1209 -226.03 0.9301,0.0699 -221.67 0.9523,0.0477 -215.49 0.9744,0.0256 -215.06

ryanabo avatar Oct 11 '15 02:10 ryanabo

I have run into the same issue with samples_filename being undefined in version 0.5.3 and have circumvented the issue by using a defined variable in its place. However this bug should be addressed.

sepidehparhami avatar Jul 19 '17 22:07 sepidehparhami

I believe this is already fixed in the github version but will be incorporated into next release.

yarden avatar Jul 20 '17 22:07 yarden