{"id":15696160,"url":"https://github.com/cmungall/linkml-phenopackets","last_synced_at":"2025-08-30T10:39:40.355Z","repository":{"id":43047257,"uuid":"400670432","full_name":"cmungall/linkml-phenopackets","owner":"cmungall","description":"EXPERIMENTAL rendering of phenopackets in linkml","archived":false,"fork":false,"pushed_at":"2024-07-03T17:04:05.000Z","size":11906,"stargazers_count":8,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-08T20:41:39.937Z","etag":null,"topics":["human-phenotype-ontology","linkml","metadata","monarchinitiative","phenopackets","phenotypes","rdf","semweb"],"latest_commit_sha":null,"homepage":"https://cmungall.github.io/linkml-phenopackets/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cmungall.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-28T01:02:22.000Z","updated_at":"2024-12-17T16:10:21.000Z","dependencies_parsed_at":"2024-10-24T02:09:13.076Z","dependency_job_id":"026ceabe-e950-4f4b-bed8-de70110981f3","html_url":"https://github.com/cmungall/linkml-phenopackets","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cmungall/linkml-phenopackets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmungall%2Flinkml-phenopackets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmungall%2Flinkml-phenopackets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmungall%2Flinkml-phenopackets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmungall%2Flinkml-phenopackets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cmungall","download_url":"https://codeload.github.com/cmungall/linkml-phenopackets/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cmungall%2Flinkml-phenopackets/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272839656,"owners_count":25001861,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["human-phenotype-ontology","linkml","metadata","monarchinitiative","phenopackets","phenotypes","rdf","semweb"],"created_at":"2024-10-03T19:08:01.007Z","updated_at":"2025-08-30T10:39:40.332Z","avatar_url":"https://github.com/cmungall.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Phenopackets EXPERIMENTAL linkml schema\n\nBrowse the autogenerated schema documentation here:\n\n * [https://cmungall.github.io/linkml-phenopackets/](https://cmungall.github.io/linkml-phenopackets/)\n\nNote the linkml markdown rendering is still incomplete, for a full schema, see\n\n * [src/phenopackets/schema](src/phenopackets/schema)\n\n## What is this repo and how was it made?\n\nThis is an experiment in rendering the [phenopackets](https://phenopacket-schema.readthedocs.io/) in LinkML.\nIt is NOT the official GA4GH phenopackets schema.\n\nThe intent is to demonstrate some of the tooling and integrative capabilities of LinkML over Protobuf, in particular:\n\n- Additional validation not possible in Protobuf, including:\n    - required fields\n    - ontology constraints\n- Generation of python classes and tooling\n- Export/Import phenopackets from to and from RDF\n- Semantic annotation of schemas\n- Cross-schema integration\n\nThe LinkML schema is generated using a script [proto2linkml](util/proto2linkml.pl) that converts from the Protobuf source. This makes\nuse of specific *conventions* in the Protobuf source, such as the use of particular controlled\nkeywords in `//` comments. As such, this code is *not* generalizable to other protobuf schemas.\n\nNote we intentionally don't use out of band-info. Currently some records in the protobuf are undefined,\nso they will be undefined in the LinkML. We have not done additional curation based on the `.rst` docs,\nit comes from protobuf.\n\n## Ontology Enhancements\n\nThe file [cv_terms.yaml](https://github.com/cmungall/linkml-phenopackets/blob/main/src/phenopackets/schema/cv_terms.yaml)\nis hand-curated, rather than derived from the YAML. It is based on: [recommended ontologies](https://phenopacket-schema.readthedocs.io/en/latest/recommended-ontologies.html)\nfrom the official phenopackets repo. It makes use of *dynamic enums* which allows for more advanced\nontology checking; for example:\n\n* Uberon anatomy terms must be found under the \"anatomical entity branch\"\n* HPO abnormality terms must be found under the \"phenotypic abnormality branch\"\n\netc\n\nWe also include [constants.yaml](https://github.com/cmungall/linkml-phenopackets/blob/main/src/phenopackets/schema/constants.yaml)\nwhich is a direct transform from the phenopackets-tools repo.\n\n## How to use this repo\n\nYou can browse the [schema docs](https://cmungall.github.io/linkml-phenopackets/) which are generated from the LinkML\nschema.\n\nYou can also explore the schema in the [schema](src/phenopackets/schema) directory.\n\nAs part of the build process, we also validate and convert all canonical Phenopacket examples into YAML, JSON,\nand RDF.\n\n* [examples/](examples/) - converted examples\n\nYou can also use the generated python classes in combination with the linkml-runtime. Note that we have NOT\nreleased this to PyPI to avoid confusion with official Phenopackets libraries, so to run this you will need to clone\nthe repo and install it locally.\n\n```bash\npoetry install\n```\n\nThere will also be demonstrator Jupyter notebooks here:\n\n- [notebooks](src/docs/notebooks) directory\n\n## Validation\n\nUse `p3 validate` to validate objects. This goes beyond what can be done with JSON-Schema alone, and\nincludes ontology validation using OAK and CURIE validation using BioRegistry.\n\nSee [this notebook](https://github.com/cmungall/linkml-phenopackets/blob/main/src/docs/notebooks/Updating-Packets-Using-Ontology.ipynb)\n\n## Repairing ontology terms\n\nPhenopackets include ontology terms, which are liable to become stale.\n\nThis toolkit uses OAK to assist in auto-migration of obsoletes or stale labels.\n\nSee [this notebook](https://github.com/cmungall/linkml-phenopackets/blob/main/src/docs/notebooks/Updating-Packets-Using-Ontology.ipynb)\n\n## Querying Phenopackets as RDF\n\nTODO: Add documentation here\n\n## Using Phenopackets in conjunction with OAK\n\nTODO: Add documentation here\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmungall%2Flinkml-phenopackets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmungall%2Flinkml-phenopackets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmungall%2Flinkml-phenopackets/lists"}