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

feat: add function to fetch curated ontology term lists #141

Merged
merged 3 commits into from
Mar 22, 2024

Conversation

nayib-jose-gloria
Copy link
Collaborator

Reason for Change

Changes

  • added uberon_development_stage_list.json ontology asset from https://github.com/chanzuckerberg/single-cell-curation/blob/main/scripts/compute_mappings/compute_ancestor_mapping.py#L107. Used in FE filters to narrow scope of development stage ancestors to look at. No such curated equivalent exists for other ontologies that define development stages (HsapDv, MmusDv) so named it to specify uberon development stage terms.
  • added function to load into memory curated list JSONs packaged with the library, and an Enum to limit the input to this function to only those curated lists we support
  • updated is_valid_term_id function to optionally take an ontology name to check for the term ID in. By default, checks for the term in the ontology parsed from the term ID. cellxgene-schema CLI does a few "is this term both valid and in this specific ontology" checks, so this is a small util for that consumer

Testing steps

  • Integration with FE Filters in a PR

Copy link
Collaborator

@Bento007 Bento007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the lists packaged with API. If we update the list, would that be a patch updates?

@nayib-jose-gloria
Copy link
Collaborator Author

Are the lists packaged with API. If we update the list, would that be a patch updates?

We had agreed not to update unless there was a schema version update to go with it, so it'd be a minor bump to include the new schema version ontologies

@nayib-jose-gloria nayib-jose-gloria merged commit 5c7db62 into main Mar 22, 2024
5 checks passed
@nayib-jose-gloria nayib-jose-gloria deleted the nayib/add-integration-utils branch March 22, 2024 20:39
This was referenced Mar 22, 2024
Bento007 pushed a commit that referenced this pull request Mar 25, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>python-api: 0.2.0</summary>

##
[0.2.0](python-api-v0.1.2...python-api-v0.2.0)
(2024-03-25)


### Features

* add function to fetch curated ontology term lists
([#141](#141))
([5c7db62](5c7db62))
* set-up docsite
([#99](#99))
([b7591bc](b7591bc))


### Misc

* enable code coverage
([#143](#143))
([c52c436](c52c436))
* use trusted publisher to publish pypi package.
([#137](#137))
([5fc917b](5fc917b))


### BugFixes

* make constant.py private
([46d04a4](46d04a4))
* typos
([76ae9fa](76ae9fa))
</details>

<details><summary>ontology-assets: 0.2.0</summary>

##
[0.2.0](ontology-assets-v0.1.0...ontology-assets-v0.2.0)
(2024-03-25)


### Features

* add function to fetch curated ontology term lists
([#141](#141))
([5c7db62](5c7db62))


### Misc

* update ontology decendant mappings
([#142](#142))
([fb23618](fb23618))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Bento007 pushed a commit that referenced this pull request Apr 9, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>assets: 0.4.0</summary>

##
[0.4.0](assets-v0.3.0...assets-v0.4.0)
(2024-04-09)


### Features

* add function to fetch curated ontology term lists
([#141](#141))
([5c7db62](5c7db62))
* fetch ontology term descriptions, if available
([#181](#181))
([0120377](0120377))
* load GH Release Assets for schema version in memory
([#72](#72))
([58bad0a](58bad0a))
* refactor ancestry mapping to include distance from descendant node +
implement functions to support curated list term mapping
([#96](#96))
([7fc3562](7fc3562))
* refer to ontology source filenames in ontology_info and return that in
get_ontology_download_url
([#106](#106))
([ff9d826](ff9d826))
* **release:** generate descendant mapping for tissues and cells
([#100](#100))
([841fddf](841fddf))
* remove all-ontology.json.gz
([83fefd6](83fefd6))
* split all_ontology into individual files.
([#93](#93))
([ead59e5](ead59e5))
* upload assets on release
([#56](#56))
([84a1c5d](84a1c5d))


### Misc

* deprecate older version of cellxgene schema
([#172](#172))
([186e762](186e762))
* move curated lists to ontology-assets
([#48](#48))
([77916df](77916df))
* moving the generated artifacts
([c03c8e3](c03c8e3))
* release main
([#130](#130))
([0b37dc8](0b37dc8))
* release main
([#146](#146))
([4ca76f0](4ca76f0))
* release main
([#185](#185))
([9b2fe53](9b2fe53))
* release main
([#74](#74))
([e748fe9](e748fe9))
* release tsmith/release-assets
([63b782d](63b782d))
* release tsmith/release-assets
([#57](#57))
([6a6b02a](6a6b02a))
* update ontology decendant mappings
([#117](#117))
([48451af](48451af))
* update ontology decendant mappings
([#142](#142))
([fb23618](fb23618))
* update ontology decendant mappings
([#162](#162))
([12def74](12def74))
* update ontology descendant mappings
([#167](#167))
([5d3d097](5d3d097))
* update ontology descendant mappings
([#180](#180))
([65ca10f](65ca10f))


### BugFixes

* lint errors
([f5e4583](f5e4583))
* Schema format and validation fixes.
([#113](#113))
([0465ee7](0465ee7))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants