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

Update to Biolink 2.1.0 #207

Closed
colleenXu opened this issue Jun 22, 2021 · 6 comments
Closed

Update to Biolink 2.1.0 #207

colleenXu opened this issue Jun 22, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@colleenXu
Copy link
Collaborator

colleenXu commented Jun 22, 2021

Translator has a compliance deadline of July 1st for "Biolink 2.0.2" for KPs/ARAs.

I'm not sure of all the code that needs to be changed, but this update probably involve changes to:


What does an update mean?

  • what do we do if our id resolution doesn't match with biolink model's id prefixes for that semantic type?
    • Happening to drug. How to handle this? Notice biolink definition, prefixes here
      • Could change some operations to drug (like drugcentral, drugbank based operations?) and leave others as small molecule
  • ChemicalSubstance deprecated. We probably want to use SmallMolecule instead. However, there's various things to consider:
    • This is a "simple" fix. However, we know that ChemicalSubstances currently includes chemical mixtures (like racemic mixes, compounds, drugs?)...
    • Chemical entity looks right but....it encompasses chemicals + molecular entities (genes/proteins) so it would be too broad...EDIT: Chris Bizon has noticed this and is wondering about change
  • registry-specific:
    • update some predicates in x-bte operations
    • Check node type/predicate: reactions fall under molecular activity, pathways under biological process
  • Will multiomics / text-mining provider need to use different Biolink node types or predicates?
    • Treatment vs Procedure (given the mixin Chemical or drug or treatment for future queries?)
    • Exposure / Outcome mixins
    • predicates like "affects risk for" vs "positively correlated with". (negatively correlated with doesn't have a corresponding predicate yet.)
@colleenXu
Copy link
Collaborator Author

colleenXu commented Jun 24, 2021

PRs to merge to move to v2.1.0:

[EDIT: 7/29 for biolink-model module fix]

BTE JS tool code updates (branch biolink_v2.1 for all):

After code in BTE JS tools is updated/deployed:

Merge these PRs for registry files or contact Ryan Roper (multiomics provider) to merge PRs. All on branches named biolink_v2.1

@colleenXu
Copy link
Collaborator Author

@newgene @andrewsu check how BTE is loading the biolink model (which yaml).

If it's loading something older/cached, we will want it to get the latest biolink model yaml off of master when we do the update to v2.0.

@andrewsu
Copy link
Member

@colleenXu
Copy link
Collaborator Author

colleenXu commented Jul 7, 2021

[UPDATE: this bug is fixed; there's another bug now...]

The Architecture call confirmed that we should move to v2.1.0.


@newgene to review BTE code to see where else we need to update. Notes for Chunlei below:

  • It looks like the biolink-model module crashes soon after BTE is started. This seems to happen when trying to parse the biolink v2.1.0 json (converted from YAML). Please investigate this.

I encountered this error after:

  • cd into packages and checking out the biolink v2.1.0 branches for query_graph_handler (biolinkv2.1-update) and biomedical_id_resolver (biolinkv2.1.0-updates-only).
  • I then ran npm run compile, and then npm run debug. The error was hit soon after the run started (I hadn't sent a query yet).

The error messages I get are below:

[nodemon] starting `node src/server.js`
  bte:biothings-explorer-trapi:EdgeReverse BioLink-model class is initiated. +0ms
/Users/jay/Desktop/bte-trapi-workspace/packages/biolink-model/built/object/entity_object.js:22
            this._id_prefixes = [...['UMLS'], ...idPrefixes];
                                                 ^

TypeError: idPrefixes is not iterable
    at Entity.set id_prefixes [as id_prefixes] (/Users/jay/Desktop/bte-trapi-workspace/packages/biolink-model/built/object/entity_object.js:22:50)
    at new Entity (/Users/jay/Desktop/bte-trapi-workspace/packages/biolink-model/built/object/entity_object.js:11:26)
    at BioLinkClassTree.addNewObjectToTree (/Users/jay/Desktop/bte-trapi-workspace/packages/biolink-model/built/tree/class_tree.js:18:53)
    at /Users/jay/Desktop/bte-trapi-workspace/packages/biolink-model/built/tree/base_tree.js:31:63
    at Array.map (<anonymous>)
    at BioLinkClassTree.construct (/Users/jay/Desktop/bte-trapi-workspace/packages/biolink-model/built/tree/base_tree.js:31:44)
    at BioLink.loadSync (/Users/jay/Desktop/bte-trapi-workspace/packages/biolink-model/built/index.js:28:34)
    at new BioLinkModel (/Users/jay/Desktop/bte-trapi-workspace/packages/@biothings-explorer/query_graph_handler/built/biolink.js:10:26)
    at Object.<anonymous> (/Users/jay/Desktop/bte-trapi-workspace/packages/@biothings-explorer/query_graph_handler/built/biolink.js:40:30)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)

  • See the linked PRs in my comment above. I have edits to the query graph handler (where the cached biolink model seems to be), ID resolver, and registry (smartapi files).

After discussion with @andrewsu, We want to map operations with ambiguous IDs (like MESH/UMLS) to SmallMolecule for now - even when that isn't always the most "accurate" semantic class for those IDs. This allows queries with SmallMolecule or ChemicalEntity to use those operations. [note: SEMMED api updates will use the new Biolink model version - see Sander for details]


See the deadline tracker here (probably need to be registered in ncats translator google permissions).

@colleenXu
Copy link
Collaborator Author

All PRs are merged; this update should be basically complete.

However, there may still be some tests/examples/README/saved-example-jsons that could be updated...

@colleenXu
Copy link
Collaborator Author

Closing issue:

I have reviewed tests/examples/README/saved-example-jsons in all the bte-trapi-workspace repos.

Note:

  • I didn't update some tests (like in api-response-transform module) since tests were then breaking and seemed not easy to fix...
  • the CHANGELOG of some repos is outdated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants