m2ms / fragalysis-frontend

The React, Redux frontend built by webpack
Other
1 stars 1 forks source link

Improve error message for failed sub-structure match on RHS upload #1495

Open mwinokan opened 2 weeks ago

mwinokan commented 2 weeks ago

I've been testing the RHS upload with an SDF of 354 compounds for CHIKV_Mac.

base_compounds_354.sdf.zip

The task fails, but 172 of the 354 compounds are loaded and visible in the frontend: task

The error is "RuntimeError: No sub-structure match found between the reference and probe mol".

Potentially it's an issue with the SDF, but it has worked previously, and the error is not very descriptive.

Traceback:

Traceback (most recent call last): File "/.venv/lib/python3.11/site-packages/celery/app/trace.py", line 453, in trace_task R = retval = fun(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^ File "/.venv/lib/python3.11/site-packages/sentry_sdk/integrations/celery.py", line 325, in _inner reraise(*exc_info) File "/.venv/lib/python3.11/site-packages/sentry_sdk/_compat.py", line 127, in reraise raise value File "/.venv/lib/python3.11/site-packages/sentry_sdk/integrations/celery.py", line 320, in _inner return f(*args, **kwargs) ^^^^^^^^^^^^^^^^^^ File "/.venv/lib/python3.11/site-packages/celery/app/trace.py", line 736, in __protected_call__ return self.run(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/code/viewer/tasks.py", line 106, in process_compound_set compound_set = save_mols.task() ^^^^^^^^^^^^^^^^ File "/code/viewer/cset_upload.py", line 673, in task _ = self.process_mol( ^^^^^^^^^^^^^^^^^ File "/code/viewer/cset_upload.py", line 547, in process_mol cpd = self.set_mol(mol, target, compound_set, filename, zfile, zfile_hashvals) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/code/viewer/cset_upload.py", line 450, in set_mol _, _, atom_map = Chem.rdMolAlign.GetBestAlignmentTransform(mol, kmol) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: No sub-structure match found between the reference and probe mol
kaliif commented 2 weeks ago

By worked previously you mean the exact same sdf was successfully loaded with the same LHS data?

mwinokan commented 2 weeks ago

Thanks @kaliif to clarify:

This exact SDF worked on an upload_1 of CHIKV that was made with a previous XCA version, possibly around April. I don't believe the fragment data has changed but perhaps it has.

A more detailed error that says which reference and computed molecules were incompatible would help a lot!

kaliif commented 2 weeks ago

Logging statements added but currently breaks on first fail, does not process the full list and report back all offending molecules; this feature needs a bit more work.

mwinokan commented 1 week ago

@mwinokan test CHIKV base upload again

mwinokan commented 1 week ago

Tested today with CHIKV_Mac on staging and this file: base_compounds_354_10sepmod.sdf.zip

The more descriptive error message is implemented correctly, so I will close this ticket. But there is definitely an issue with the resolution of compounds and poses for the RHS. I will create a new ticket for that