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

[DO NOT CLOSE] 📝 Guide to add new ontology #33

Open
sunnyosun opened this issue Mar 13, 2024 · 0 comments
Open

[DO NOT CLOSE] 📝 Guide to add new ontology #33

sunnyosun opened this issue Mar 13, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation new ontology New ontology

Comments

@sunnyosun
Copy link
Member

sunnyosun commented Mar 13, 2024

Steps:

  1. Add new ontology source metadata to the sources.yaml file:
  2. Make sure you restart your notebook before proceeding. (If you installed lamindb, please run lamin close before restarting your notebook.)
  3. Run the corresponding API; for instance, if you add a new cell type, run:
    bionty.base.CellType(source=<source_name>, version=<new version>).df()
    
    • this will create the corresponding two files df_xxxxx.parquet and ontology_xxxx in your local bionty/base/_dynamic/ folder (inside your bionty repo).
    • Note: Certain ontologies need manual curation to create the parquet file, please check this list: https://bionty-assets-gczz.netlify.app/ingest/
    • If your ontology is on the list, please make a new notebook copy to document the curation process. This notebook should be added with a new PR in bionty-assets.
    • For ExperimentalFactor, you need to run bionty.base.entities._experimentalfactor.efo_to_df to create the DataFrame and save it to a parquet file named df_all__efo__<new version>__ExperimentalFactor.parquet.
      Run it as bt.base.entities._experimentalfactor.efo_to_df(efo.to_pronto(), "efo", include_id_prefixes={'efo': ['EFO', 'http://www.ebi.ac.uk/efo/']}), where efo is an ExperimentalFactor object with the new version.
  4. Ensure that the Source is registered:
    Load laminlabs/bionty-assets and run bionty.core.sync_all_sources_to_latest()
    Reload the instance via lamin load laminlabs/bionty-assets
  5. Register these two files in laminlabs/bionty-assets lamindb instance following this example.
    • Please also track your ingestion notebook following the above example.
    • Please DO NOT directly upload to s3://bionty-assets!!!
  6. Make a PR to bionty.
    • Please only update a single ontology in a PR:
      • Title: 🍱 New <entity_name> version: <source_name>-<version_name>
      • tag: new ontology
@sunnyosun sunnyosun added the documentation Improvements or additions to documentation label Mar 13, 2024
@sunnyosun sunnyosun pinned this issue Mar 13, 2024
@sunnyosun sunnyosun changed the title [DO NOT CLOSE] Guideline to update ontology versions [DO NOT CLOSE] Guideline to add new ontology Mar 13, 2024
@sunnyosun sunnyosun changed the title [DO NOT CLOSE] Guideline to add new ontology [DO NOT CLOSE] Guide to add new ontology Mar 13, 2024
@Zethson Zethson transferred this issue from laminlabs/bionty-base Aug 7, 2024
@Zethson Zethson pinned this issue Aug 7, 2024
@sunnyosun sunnyosun changed the title [DO NOT CLOSE] Guide to add new ontology [DO NOT CLOSE] 📝 Guide to add new ontology Aug 7, 2024
@sunnyosun sunnyosun added the new ontology New ontology label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation new ontology New ontology
Projects
None yet
Development

No branches or pull requests

1 participant