m2ms / fragalysis-frontend

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

CentroidRes missing from extended table (b/e?) #1505

Open phraenquex opened 2 months ago

phraenquex commented 2 months ago

In this snapshot, the CentroidRes is not showing up in the extended table.

https://fragalysis.xchem.diamond.ac.uk/viewer/react/projects/47/19

Sounds like an API or F/E parsing issue?

Green for now.

matej-vavrek commented 2 months ago

"CentroidRes" column on F/E part is populated by centroid_res property of matched canon site to canon_site_conf property of an observation and if there is not a match then it is blank.

In this situation, for example an observation with 597 id and "Ax0486a" code has 72 canon_site_conf but there is not any canon site with 72 id

kaliif commented 2 months ago

@matej-vavrek canon_site and canon_site_conf are different objects, canon_site_conf has a foreign key to canon_site, in the API it's the canon_site attribute.

matej-vavrek commented 2 months ago

@kaliif, I am not sure if I am following this right, so observation's canon_site_conf points to api/canon_site_conf and that's canon_site points to api/canon_site?

i.e. first call to api/canon_site_conf to match $observation.canon_site_conf with $canon_site_conf.id and then second call to api/canon_site to match $canon_site_conf.canon_site with $canon_site.id and $canon_site.centroid_res is what we are looking for?

kaliif commented 2 months ago

@kaliif, I am not sure if I am following this right, so observation's canon_site_conf points to api/canon_site_conf and that's canon_site points to api/canon_site?

i.e. first call to api/canon_site_conf to match $observation.canon_site_conf with $canon_site_conf.id and then second call to api/canon_site to match $canon_site_conf.canon_site with $canon_site.id and $canon_site.centroid_res is what we are looking for?

@matej-vavrek correct, yes

matej-vavrek commented 2 months ago

@phraenquex, it should be on staging now. Could you verify it, please?

phraenquex commented 2 months ago

@matej-vavrek it looks right now - but we'll need an upload that uses @kaliif's loader fixes - so waiting for @mwinokan to confirm that such an upload has happened.

mwinokan commented 2 months ago

@phraenquex I have re-uploaded Flavi_Ns5_RdRp and the CentroidRes is populated in the table. I do now have some questions about the spec. Currently:

Screenshot 2024-09-09 at 09 14 16

Category Box Tooltip Table
CanonicalSite Upload name Alias + Upload name
ConformerSite Upload name Upload name
CrystalformSite Upload name Upload name
Crystalform Upload name Upload name
Quatassembly Upload name Upload name
CentroidRes N/A LongCode
LongCode N/A LongCode
  1. Hovering over the colourful site boxes shows the original upload name of the generated tags. E.g. Zika_NS5A-x0411+A+1104+1, shouldn't we show the alias assigned by the curator instead?
  2. The table only shows the original upload name and alias pair for the CanonicalSites tags, the other categories either show the only show the upload name. Should we have a toggle to decide between showing the alias or upload name for the observation table view?
phraenquex commented 2 months ago

The CentroidRes now looks right - so we can close this ticket. Thanks!

@mwinokan can you move your questions into a new ticket, let's call it "Observations panel tweaks". (I have things to add too.)