Lucy-Forrest-Lab / HDXer

HDXer is a package to compute Hydrogen-Deuterium exchange data from biomolecular simulations, compare to experiment, and perform ensemble refinement to fit a structrual ensemble to the experimental data
BSD 3-Clause "New" or "Revised" License
17 stars 6 forks source link

reweighting error #2

Open rupeshagarwal opened 2 years ago

rupeshagarwal commented 2 years ago

I have been running this function with the correct paramters reweight_object.run(gamma=basegamma, data_folders=folders, kint_file=rates, exp_file=expt, times=times, restart_interval=100, out_prefix=f'reweighting_gamma1x10^{exponent}')_ and I keep getting this error. Traceback (most recent call last): File "/Users/ragarwal/Downloads/HDXer/HDXer/reweighting_functions.py", line 49, in files_to_array return np.stack(datalist, axis=0) File "<__array_function__ internals>", line 180, in stack File "/Users/ragarwal/miniconda3/envs/HDXER_ENV/lib/python3.8/site-packages/numpy/core/shape_base.py", line 426, in stack raise ValueError('all input arrays must have the same shape') ValueError: all input arrays must have the same shape

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 1, in File "/Users/ragarwal/Downloads/HDXer/HDXer/reweighting.py", line 970, in run self.setup_no_runobj(self.runparams['data_folders'], File "/Users/ragarwal/Downloads/HDXer/HDXer/reweighting.py", line 96, in setup_no_runobj _contacts, _hbonds, _sorted_resids = read_contacts_hbonds(folderlist, File "/Users/ragarwal/Downloads/HDXer/HDXer/reweighting_functions.py", line 118, in read_contacts_hbonds map(lambda x, y: x[y], [files_to_array(curr_cfiles) for curr_cfiles in contactfiles], filters)) File "/Users/ragarwal/Downloads/HDXer/HDXer/reweighting_functions.py", line 118, in map(lambda x, y: x[y], [files_to_array(curr_cfiles) for curr_cfiles in contactfiles], filters)) File "/Users/ragarwal/Downloads/HDXer/HDXer/reweighting_functions.py", line 54, in files_to_array raise ValueError("Error in stacking files read with np.loadtxt - are they all the same length?") ValueError: Error in stacking files read with np.loadtxt - are they all the same length?

I checked the files and they all are of the same length.

rtb1c13 commented 2 years ago

Hi @rupeshagarwal that error can arise for a number of reasons, but fundamentally is linked to the reading-in of the contacts & H-bond files generated by the initial calc_hdx step. Here are a few things to check:

If that doesn't fix it and you're able to share a minimal example of your data that reproduces the problem I'd be happy to take a look, just let me know?