xchem / fragalysis-loader

Django backend loader for fragalysis app
Apache License 2.0
1 stars 4 forks source link

ComputedSet inspiration fragments are lost when loader is run #42

Open reskyner opened 4 years ago

reskyner commented 4 years ago

When the loader is run to update the data for an existing target, the links to inspiration fragments in the ComputedMolecule computed_inspirations field are lost.

Potential solution

  1. When updating the data, for each compound, find its relevant id in the Molecule table (potential problem when compounds are renamed)
  2. When updating the specific compound, swap out the old id for the new id in the computed_inspirations field
duncanpeacock commented 3 years ago

This problem re-occurred during testing of: (https://github.com/m2ms/fragalysis-frontend/issues/407). This will solution will be tried in the new upload target API in the fragalysis backend

If the solution works, then it can also be incorporated here in the loader - or if the new loader API is really good, maybe we won't need to!

duncanpeacock commented 3 years ago

A fix for this problem in the new data loader is described in the fragalysis backend issue: https://github.com/duncanpeacock/fragalysis-backend/issues/21 The fix in the code for the fragalysis-backend needs to be also made in the loader code.