intermine / bluegenes-go-concept-relation

MIT License
0 stars 5 forks source link

filtering data according to selected ontology term #9

Closed Sakshisrivastava413 closed 4 years ago

Sakshisrivastava413 commented 4 years ago

Objective: A filter panel to query the data according to the selected ontology term. #8

  1. Created radio buttons showing ontology namespace as its value
  2. Updated query as per the filter
    {
    path: 'goAnnotation.ontologyTerm.namespace',
    op: '=',
    value: ontology,
    code: 'D'
    }
  3. Added animated loading & handled case of no data found
  4. Added visualization title

(Screenshot for reference) ontology-filter

Sakshisrivastava413 commented 4 years ago

Yes, the things you mentioned also came in my mind. I also thought not to hardcode the ontology namespaces but in go-term-viz the namespaces were hardcoded, so I thought we might need only those 3 of them. For avoiding the re-run of query and saving the state once, I think filtering is better on DB instead of doing it on frontend since it won't much much sense and can give a bad UX. What do you think?

heralden commented 4 years ago

For avoiding the re-run of query and saving the state once, I think filtering is better on DB instead of doing it on frontend since it won't much much sense and can give a bad UX.

I think this would be true if we were talking about larger amounts of data, but in this case it's at most 100 items and usually much less (although I haven't run this query enough, so I may be wrong). With today's webapps being increasingly focused on the clientside, I do think it makes sense as it's pretty common to basically have a database on the client (pretty much all React+Redux apps do this). In this case, we gain some real advantages as well: flexibility (not hardcoding) and performance (a single request).

I don't understand how it relates to UX though, as it's an implementation detail.

If this ends up working well, I do think we should create an issue for this in go-term-viz as well.

Sakshisrivastava413 commented 4 years ago

Yes, you are right then. I assumed that we have large amount of data, say 10,000 items. I understood the changes and will work on the improvements.

Sakshisrivastava413 commented 4 years ago

Changes: Removed the ontology filter from the query. Showing the ontology list by filtering the distinct namespaces from the query instead of hardcoding the ontologies. Created a map according to the available ontologies and passed data to the GeneOntologyNetwork to create cytoscape graph config as per the selected ontology.

heralden commented 4 years ago

I had to rename controls.js to Controls.js as otherwise it wouldn't build on Unix-likes, as they're case-sensitive.