m2ms / fragalysis-frontend

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

Green release - test and fix RHS upload #1218

Open Waztom opened 9 months ago

Waztom commented 9 months ago

@alanbchristie or @kaliif need to debug and test uploading data to the RHS. Much quicker for someone who is actively developing Fragalysis V2 (has dev env setup etc).

This feels like a ticket in its own right due to the unknowns - we can discuss who best to tackle this at our meeting. Progress on the red release can not continue without @matej-vavrek having access to RHS data.

I can not troubleshoot because of the 500 internal server error and do not have a Fragalysis V2 dev environment setup.

alanbchristie commented 9 months ago

Agreed - actively trying to resolve the 500 error. Uploads take place but the django.urls.exceptions.NoReverseMatch exception (which is causing the 500 error) is eluding us atm.

Waztom commented 9 months ago

@alanbchristie has an idea of what is wrong re 500 internal server request!

Will send you a MPro RHS data example to test.

alanbchristie commented 9 months ago

The 500 error was caused by a lack of viewer namespace in the django URL references. The old HTML template code...

var taskUrl = "{% url 'validate_task' validate_task_id=validate_task_id %}";

Is replaced by this...

var taskUrl = "{% url 'viewer:validate_task' validate_task_id=validate_task_id %}";

And redirect() calls like redirect('upload_cset') needed to be redirect('viewer:upload_cset')

A build that fixes this is available but testing now relies on a valid file for the XCA-based Mpro target we have.

alanbchristie commented 9 months ago

Uploads now correctly fail on the staging stack with validation errors if the reference molecule does not exist (previously a Protein code, now a SiteObservation code)

alanbchristie commented 9 months ago

Upload of SDF appears to work without error now. The underlying ComputedSet and ComputedMolecule tables are different. There are no Protein or Molecule tables, only the SiteObservation table for now ... so this might need additional work on the f/e?

Support for PDB upload has not been added.

Waztom commented 9 months ago

@matej-vavrek please review Alan's comments re DB models related to the uploaded compounds in the computed set. PDBs are not supported yet.

alanbchristie commented 9 months ago

To test the RHS I used the file MPro_WillPoole_CReM.sdf and globally renamed the <ref_mols> and <ref_pdb> properties in in the file from x0434_0 to x2097_A (as x0434_0 is not present in the Mpro XCA set I have). There was no thought on the reference, I simply needed to change it so that the upload would not complain about the missing reference.

CAUTION: My choice of x2097_A may not be appropriate as it was simply chosen to get the upload to work without error.