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

Extend and improve ontology usage throughout the code #452

Open
garrettjstevens opened this issue Sep 24, 2024 · 1 comment
Open

Extend and improve ontology usage throughout the code #452

garrettjstevens opened this issue Sep 24, 2024 · 1 comment
Assignees

Comments

@garrettjstevens
Copy link
Contributor

garrettjstevens commented Sep 24, 2024

Currently we have an OntologyManager (packages/jbrowse-plugin-apollo/src/OntologyManager) that loads ontologies and allows things like the feature type autocomplete to use correct values for the ontology (see packages/jbrowse-plugin-apollo/src/components/OntologyTermAutocomplete.tsx).

There are some things that need to be improved w.r.t. our usage of the OntologyManager:

  • Currently the OntologyManager only is in the front end. This was originally so that even if you used "Open local GFF3 file" to open and assembly and there was no Apollo collaboration server backend, the OntologyManager (and autocomplete, etc.) would still work. However, this means that if there are any Checks that run when features are imported to the collaboration server, they don't have access to the ontologies. Do we need an OntologyManager in both the front and back end?
  • There are quite a few places where we do comparisons like if (feature.type === 'gene') where we should use something like ontologyStore.getTermsWithLabelOrSynonym from the OntologyManager to match all equivalent terms (e.g. be able to match 'pseudogene' and 'protein_coding_gene' as well).
  • Loading the ontologies in the front end can take a while (SO typically takes ~5 minutes for me). If we keep using the current system, we should find some way to indicate that the process is running and things like autocomplete might not work until it's done. Luckily indexedDb is persisted, so users should only have to load the ontologies once per browser. Split into new issue Provide feedback that an ontology is being loaded #457.
@garrettjstevens
Copy link
Contributor Author

Due to the problems @dariober has found introducing a lot more asynchronous code, I've tried a new branch that uses MST to react to the ontology synonyms being loaded, so the surrounding code doesn't have to be asynchronous. See here: 452_reactive_sync_ontology

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready
Development

No branches or pull requests

2 participants