Goodman-lab / DP5

Python workflow for DP5 and DP4 analysis of organic molecules
Other
175 stars 102 forks source link

IndexError: list index out of range #3

Closed danny305 closed 4 years ago

danny305 commented 4 years ago

Trying to process the 1H FID of ATP ATP_1H_FID.tar.gz and I get the following error.

File "/Users/danny/Documents/Codes/Python/Anslyn/Auto_NMR/NMars/H1/Proton_processing.py", line 1354, in multiproc_BIC_minimisation

higher_point = int((group[-1] + final_grouped_peaks[ind4 + 1][0]) / 2)
IndexError: list index out of range

Will spend sometime looking at it tomorrow but thought I would notify you guys since you guys understand this BIC minimization algorithm a lot better than I do.

I have also find other bugs here and there and have patched them to suit my needs. In particular with the solvent (D2O) and reference (TMS) signal removal. Would love to discuss/contribute.

HowarthA commented 4 years ago

Hi, Thanks for getting in touch, I'll have a look at the problem ASAP. Would you be able to send over your structure file and commit your changes to your DP4-AI repo so I can try and replicate this bug? Alex

danny305 commented 4 years ago

My research involves me processing NMR spectra from unknown origins and have ML models distinguish between molecules derived from living systems and molecules whom's origin does not depend on life. Thus, I need automated NMR processing without knowing the molecules present a priori and don't have a structured files available in my workflow.

So I essentially took the carbon and proton processing capability from your repo, and deleted everything else, and have been tweaking it to suit my needs. However, I have not touched any of the actual spectra processing (baseline, phasing, etc) algorithms. The tweaks I have made pertain to the integration and plotting aspects. I had to remove the dependency on the isomer and sdf file.

Here is everything for the ATP spectra, including the sdf file.
ATP_1H_fid_sdf.tar.gz By the way, all this play data I use I get from hmdb

HowarthA commented 4 years ago

Hi, I have added support for analysing spectra in DP4-AI as a standalone workflow option. I managed to run DP4-AI with your attached spectra and a structure for ATP without any issues. As DP4-AI is designed to work when provided with at least one structure file I will close this issue here. We are very interested to see what you do with the code in the future. Alex.