Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Annotation filter GO class (direct) not working #718

Open
raymond91125 opened this issue May 2, 2024 · 4 comments
Open

Annotation filter GO class (direct) not working #718

raymond91125 opened this issue May 2, 2024 · 4 comments

Comments

@raymond91125
Copy link

To reproduce:
https://amigo.geneontology.org/amigo/term/GO:0008746
click on GO class (direct) shows Total annotations: 103
(89) NAD(P)+ transhydrogenase activity
(9) NAD(P)+ transhydrogenase (AB-specific) activity
(5) NAD(P)+ transhydrogenase (B-specific) activity
click on any line shows Total annotations: 0

@cmungall
Copy link
Member

cmungall commented May 2, 2024

Confirmed.

I think there is something in the strings that are causing issues - I thought at first parentheses, but the ones under here work:

https://amigo.geneontology.org/amigo/term/GO:0016671

But some like alcohol dehydrogenase (NAD ) activity, zinc-dependent don't
https://amigo.geneontology.org/amigo/term/GO:0016616

very odd...

@kltm
Copy link
Member

kltm commented May 15, 2024

I talked a little with @pkalita-lbl about proximate places to look for the issue. While adding a fix (encoding/decoding), there may also be consequences in the UI filters and bookmarking, in addition to the "main" issue of the query to the Solr server.

There are some oddities that have slipped into the code over the years in response to years of LBL testing (e.g. https://github.com/geneontology/amigo/issues?q=is%3Aissue+XSS+is%3Aclosed); the bug may be a consequence of that (or just a regular "oops" on my part). Either way, a fix should be XSS-safe.

The problem code is probably in the bbop-manager-golr package, at https://github.com/berkeleybop/bbop-manager-golr/blob/master/lib/manager.js . A possible place to start might be https://github.com/berkeleybop/bbop-manager-golr/blob/da53ce470ad6672b356f2ff0a8abf2bb3d3682fe/lib/manager.js#L945 which uses encodeURI(). One way to approach this would be by the tests in that package, although that may practically be a slow way forward.

@kltm
Copy link
Member

kltm commented May 15, 2024

The JS code is old, baroque, and quirky (ooo--prototype!). If any problems or confusions come up, it's probably faster to drag me in than directly wrestle with whatever was in my head at the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants