diff --git a/Makefile b/Makefile index 9d00d37..8f9be06 100644 --- a/Makefile +++ b/Makefile @@ -126,7 +126,6 @@ gen-examples: gen-project: $(PYMODEL) $(RUN) gen-project ${CONFIG_YAML} -d $(DEST) $(SOURCE_SCHEMA_PATH) && mv $(DEST)/*.py $(PYMODEL) - # non-empty arg triggers owl (workaround https://github.com/linkml/linkml/issues/1453) ifneq ($(strip ${GEN_OWL_ARGS}),) mkdir -p ${DEST}/owl || true diff --git a/poetry.lock b/poetry.lock index 07a9d58..923255a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.1.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.1.4 and should not be changed by hand. [[package]] name = "annotated-types" @@ -175,7 +175,7 @@ version = "25.1.0" description = "Classes Without Boilerplate" optional = false python-versions = ">=3.8" -groups = ["main", "dev"] +groups = ["main", "dev", "docs"] files = [ {file = "attrs-25.1.0-py3-none-any.whl", hash = "sha256:c75a69e28a550a7e93789579c22aa26b0f5b83b75dc4e08fe092980051e1090a"}, {file = "attrs-25.1.0.tar.gz", hash = "sha256:1c97078a80c814273a76b2a298a932eb681c87415c11dee0a6921de7f1b02c3e"}, @@ -1470,7 +1470,7 @@ version = "3.1.5" description = "A very fast and expressive template engine." optional = false python-versions = ">=3.7" -groups = ["main", "dev"] +groups = ["dev", "docs"] files = [ {file = "jinja2-3.1.5-py3-none-any.whl", hash = "sha256:aba0f4dc9ed8013c424088f68a5c226f7d6097ed89b246d7749c2ec4175c6adb"}, {file = "jinja2-3.1.5.tar.gz", hash = "sha256:8fefff8dc3034e27bb80d67c671eb8a9bc424c0ef4c0826edbff304cceff43bb"}, @@ -1488,7 +1488,7 @@ version = "24.4.0" description = "Command-line interface to Jinja2 for templating in shell scripts." optional = false python-versions = ">=3.9" -groups = ["main", "dev"] +groups = ["dev", "docs"] files = [ {file = "jinjanator-24.4.0-py3-none-any.whl", hash = "sha256:9447109da974ac402dd8ee5ef586b2c24358dac67c5c00d2259f98baec4d73f8"}, {file = "jinjanator-24.4.0.tar.gz", hash = "sha256:83ec06cdedceed1df4b2b7f85c227b79668621037cbe6c065bbfc6e90d038b9e"}, @@ -1508,7 +1508,7 @@ version = "24.2.0" description = "Package which provides the plugin API for the jinjanator tool" optional = false python-versions = ">=3.9" -groups = ["main", "dev"] +groups = ["dev", "docs"] files = [ {file = "jinjanator_plugins-24.2.0-py3-none-any.whl", hash = "sha256:a0adfe5df0e8bd1a025602bc1867505b243eac5783464f8ce2b8600ac41e73ba"}, {file = "jinjanator_plugins-24.2.0.tar.gz", hash = "sha256:5fa8eecb6d9fbef5e7947b3820da4bd7b2ef3f102721e42382de5e71e52b409a"}, @@ -2094,7 +2094,7 @@ version = "3.0.2" description = "Safely add untrusted strings to HTML/XML markup." optional = false python-versions = ">=3.9" -groups = ["main", "dev"] +groups = ["dev", "docs"] files = [ {file = "MarkupSafe-3.0.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7e94c425039cde14257288fd61dcfb01963e658efbc0ff54f5306b06054700f8"}, {file = "MarkupSafe-3.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9e2d922824181480953426608b81967de705c3cef4d1af983af849d7bd619158"}, @@ -2951,7 +2951,7 @@ version = "1.5.0" description = "plugin and hook calling mechanisms for python" optional = false python-versions = ">=3.8" -groups = ["main", "dev"] +groups = ["main", "dev", "docs"] files = [ {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, @@ -3607,7 +3607,7 @@ version = "1.0.1" description = "Read key-value pairs from a .env file and set them as environment variables" optional = false python-versions = ">=3.8" -groups = ["main", "dev"] +groups = ["dev", "docs"] files = [ {file = "python-dotenv-1.0.1.tar.gz", hash = "sha256:e324ee90a023d808f1959c46bcbc04446a10ced277783dc6ee09987c37ec10ca"}, {file = "python_dotenv-1.0.1-py3-none-any.whl", hash = "sha256:f7b63ef50f1b690dddf550d03497b66d609393b40b564ed0d674909a68ebf16a"}, @@ -3714,7 +3714,7 @@ version = "6.0.2" description = "YAML parser and emitter for Python" optional = false python-versions = ">=3.8" -groups = ["main", "dev"] +groups = ["main", "dev", "docs"] files = [ {file = "PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086"}, {file = "PyYAML-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf"}, @@ -4870,7 +4870,7 @@ version = "4.12.2" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" -groups = ["main", "dev"] +groups = ["main", "dev", "docs"] files = [ {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, @@ -5186,10 +5186,7 @@ enabler = ["pytest-enabler (>=2.2)"] test = ["big-O", "importlib-resources ; python_version < \"3.9\"", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-ignore-flaky"] type = ["pytest-mypy"] -[extras] -docs = ["jinjanator"] - [metadata] lock-version = "2.1" python-versions = "^3.9" -content-hash = "e0cf02a533a0ebe8ddf696506b730b38e07a85c7c0618285e141dea3b6925b14" +content-hash = "0ce9b7498feff7c40e6850f9aa8d260c40ecb2576fbddc9c15d0ab3376806576" diff --git a/project.Makefile b/project.Makefile index a33203a..8ab5bb9 100644 --- a/project.Makefile +++ b/project.Makefile @@ -1,15 +1,21 @@ ## Add your own custom Makefile targets here +.PHONY: generate_biolink_imports gen-biolink-imports: $(RUN) python src/matrix_schema/utils/generate_biolink_imports.py +.PHONY: generate_valid_edge_type_table gen-valid-edge-type-table: $(RUN) python src/matrix_schema/utils/generate_valid_edge_type_table.py +.PHONY: gen-pydantic gen-pydantic: $(RUN) gen-pydantic --meta None src/matrix_schema/schema/matrix_schema.yaml > src/matrix_schema/datamodel/matrix_schema_pydantic.py -gen-pandera: gen-pydantic - @echo "The pandera schema currently needs to be updated manually in src/matrix_schema/datamodel/pandera.py" +# generate pandera schemas +.PHONY: gen-pandera +gen-pandera: + python -m matrix_schema.generators.panderagen $(SOURCE_SCHEMA_PATH) -c MatrixNode -c MatrixEdge -c UnionedNode -c UnionedEdge --output $(PYMODEL)/pandera.py + gen-project: gen-pydantic gen-pandera gen-biolink-imports gen-valid-edge-type-table diff --git a/project/excel/matrix_schema.xlsx b/project/excel/matrix_schema.xlsx index 320a855..c053a24 100644 Binary files a/project/excel/matrix_schema.xlsx and b/project/excel/matrix_schema.xlsx differ diff --git a/project/jsonld/matrix_schema.context.jsonld b/project/jsonld/matrix_schema.context.jsonld index ace7787..4bec0cd 100644 --- a/project/jsonld/matrix_schema.context.jsonld +++ b/project/jsonld/matrix_schema.context.jsonld @@ -1,7 +1,7 @@ { "comments": { "description": "Auto generated by LinkML jsonld context generator", - "generation_date": "2025-08-26T11:42:19", + "generation_date": "2025-09-04T16:20:53", "source": "matrix_schema.yaml" }, "@context": { diff --git a/project/jsonld/matrix_schema.jsonld b/project/jsonld/matrix_schema.jsonld index 7995adc..d4f3128 100644 --- a/project/jsonld/matrix_schema.jsonld +++ b/project/jsonld/matrix_schema.jsonld @@ -5609,9 +5609,9 @@ ], "metamodel_version": "1.7.0", "source_file": "matrix_schema.yaml", - "source_file_date": "2025-06-04T10:34:59", + "source_file_date": "2025-09-03T12:54:24", "source_file_size": 528, - "generation_date": "2025-08-26T11:42:19", + "generation_date": "2025-09-04T16:20:53", "@type": "SchemaDefinition", "@context": [ "project/jsonld/matrix_schema.context.jsonld", diff --git a/project/owl/matrix_schema.owl.ttl b/project/owl/matrix_schema.owl.ttl index efc4ff5..5496850 100644 --- a/project/owl/matrix_schema.owl.ttl +++ b/project/owl/matrix_schema.owl.ttl @@ -30,10 +30,10 @@ matrix_schema:MatrixEdgeList a owl:Class, linkml:ClassDefinition ; rdfs:label "MatrixEdgeList" ; rdfs:subClassOf [ a owl:Restriction ; - owl:allValuesFrom matrix_schema:MatrixEdge ; + owl:minCardinality 0 ; owl:onProperty matrix_schema:edges ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom matrix_schema:MatrixEdge ; owl:onProperty matrix_schema:edges ] ; skos:definition "A container for MatrixEdge objects." ; skos:inScheme matrix_schema:kg . @@ -54,10 +54,10 @@ matrix_schema:UnionedEdge a owl:Class, linkml:ClassDefinition ; rdfs:label "UnionedEdge" ; rdfs:subClassOf [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom linkml:String ; owl:onProperty matrix_schema:primary_knowledge_sources ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; + owl:minCardinality 0 ; owl:onProperty matrix_schema:primary_knowledge_sources ], matrix_schema:MatrixEdge ; skos:definition "An edge in the unioned everycure matrix graph." ; @@ -169,79 +169,61 @@ matrix_schema:DiseaseListEntry a owl:Class, dcterms:title "Disease List Entry" ; rdfs:subClassOf [ a owl:Restriction ; owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:is_obsoletion_candidate ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty matrix_schema:is_paraphilic ], + owl:onProperty matrix_schema:official_matrix_filter ], [ a owl:Restriction ; - owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:is_orphanet_disorder ], + owl:minCardinality 0 ; + owl:onProperty matrix_schema:definition ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty matrix_schema:is_orphanet_subtype ], + owl:onProperty matrix_schema:label ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty matrix_schema:is_orphanet_subtype_descendant ], + owl:minCardinality 1 ; + owl:onProperty matrix_schema:is_clingen ], [ a owl:Restriction ; - owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:is_icd_chapter_header ], + owl:allValuesFrom linkml:Integer ; + owl:onProperty matrix_schema:other_subsets_count ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty matrix_schema:harrisons_view ], + owl:onProperty matrix_schema:category_class ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; - owl:onProperty matrix_schema:txgnn ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty matrix_schema:tag_qaly_lost ], + owl:onProperty matrix_schema:category_class ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty matrix_schema:crossreferences ], + owl:allValuesFrom linkml:Boolean ; + owl:onProperty matrix_schema:is_icd_chapter_code ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty matrix_schema:is_grouping_subset_ancestor ], - [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty matrix_schema:is_orphanet_disorder ], - [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty matrix_schema:is_grouping_subset_ancestor ], + owl:onProperty matrix_schema:is_obsoletion_candidate ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty matrix_schema:is_icd_category ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty matrix_schema:mondo_top_grouping ], - [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty matrix_schema:is_unclassified_hereditary ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:is_paraphilic ], + owl:onProperty matrix_schema:subset_group_id ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty matrix_schema:is_omimps ], + owl:onProperty matrix_schema:is_omim ], [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty matrix_schema:medical_specialization ], + owl:maxCardinality 1 ; + owl:onProperty matrix_schema:is_icd_billable ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty matrix_schema:subset_group_id ], + owl:maxCardinality 1 ; + owl:onProperty matrix_schema:is_pathogen_caused ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty matrix_schema:is_andor ], + owl:onProperty matrix_schema:is_omimps_descendant ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty matrix_schema:official_matrix_filter ], + owl:onProperty matrix_schema:is_matrix_manually_included ], [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty matrix_schema:is_cancer ], + owl:allValuesFrom linkml:Boolean ; + owl:onProperty matrix_schema:is_orphanet_subtype_descendant ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty matrix_schema:is_matrix_manually_included ], + owl:onProperty matrix_schema:anatomical ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:String ; + owl:onProperty matrix_schema:txgnn ], [ a owl:Restriction ; owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:official_matrix_filter ], + owl:onProperty matrix_schema:is_matrix_manually_included ], [ a owl:Restriction ; owl:allValuesFrom [ a rdfs:Datatype ; owl:intersectionOf ( linkml:String [ a rdfs:Datatype ; @@ -249,323 +231,341 @@ matrix_schema:DiseaseListEntry a owl:Class, owl:withRestrictions ( [ xsd:pattern "^(low|medium|high|very_high|none)$" ] ) ] ) ] ; owl:onProperty matrix_schema:tag_qaly_lost ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty matrix_schema:is_omim ], + owl:allValuesFrom linkml:Boolean ; + owl:onProperty matrix_schema:is_clingen ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty matrix_schema:other_subsets_count ], + owl:minCardinality 1 ; + owl:onProperty matrix_schema:is_pathogen_caused ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty matrix_schema:subset_group_id ], + owl:onProperty matrix_schema:category_class ], [ a owl:Restriction ; owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:is_acquired ], + owl:onProperty matrix_schema:is_pathogen_caused ], [ a owl:Restriction ; owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:is_pathogen_caused ], + owl:onProperty matrix_schema:is_omimps ], [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty matrix_schema:mondo_txgnn ], + owl:allValuesFrom linkml:Boolean ; + owl:onProperty matrix_schema:is_unclassified_hereditary ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty matrix_schema:is_obsoletion_candidate ], + owl:onProperty matrix_schema:label ], [ a owl:Restriction ; - owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:is_omim ], + owl:minCardinality 1 ; + owl:onProperty matrix_schema:mondo_txgnn ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty matrix_schema:is_icd_chapter_header ], + owl:onProperty matrix_schema:is_leaf ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty matrix_schema:other_subsets_count ], + owl:onProperty matrix_schema:is_paraphilic ], [ a owl:Restriction ; - owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:is_clingen ], + owl:allValuesFrom linkml:String ; + owl:onProperty matrix_schema:label ], [ a owl:Restriction ; - owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:is_cancer ], + owl:maxCardinality 1 ; + owl:onProperty matrix_schema:is_grouping_subset_ancestor ], [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty matrix_schema:is_acquired ], + owl:minCardinality 0 ; + owl:onProperty matrix_schema:subset_group_id ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:String ; + owl:onProperty matrix_schema:anatomical ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty matrix_schema:label ], + owl:onProperty matrix_schema:official_matrix_filter ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty matrix_schema:harrisons_view ], + owl:maxCardinality 1 ; + owl:onProperty matrix_schema:is_orphanet_subtype ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty matrix_schema:is_pathway_defect ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty matrix_schema:subset_group_label ], + owl:onProperty matrix_schema:is_paraphilic ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty matrix_schema:is_icd_chapter_header ], [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty matrix_schema:is_leaf ], + owl:maxCardinality 1 ; + owl:onProperty matrix_schema:is_grouping_subset ], [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty matrix_schema:is_andor ], + owl:maxCardinality 1 ; + owl:onProperty matrix_schema:is_acquired ], [ a owl:Restriction ; owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:tag_existing_treatment ], + owl:onProperty matrix_schema:is_cancer ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty matrix_schema:is_susceptibility ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:is_orphanet_subtype ], + owl:onProperty matrix_schema:is_orphanet_disorder ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty matrix_schema:is_glucose_dysfunction ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty matrix_schema:label ], + owl:onProperty matrix_schema:harrisons_view ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty matrix_schema:anatomical ], + owl:allValuesFrom linkml:Boolean ; + owl:onProperty matrix_schema:is_leaf_direct_parent ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty matrix_schema:is_grouping_subset ], + owl:onProperty matrix_schema:is_leaf ], [ a owl:Restriction ; - owl:minCardinality 1 ; + owl:allValuesFrom linkml:String ; owl:onProperty matrix_schema:crossreferences ], [ a owl:Restriction ; - owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:is_andor ], + owl:minCardinality 1 ; + owl:onProperty matrix_schema:is_icd_category ], [ a owl:Restriction ; - owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:is_withorwithout ], + owl:minCardinality 1 ; + owl:onProperty matrix_schema:is_omimps_descendant ], [ a owl:Restriction ; owl:minCardinality 1 ; + owl:onProperty matrix_schema:is_acquired ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; owl:onProperty matrix_schema:is_clingen ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty matrix_schema:definition ], + owl:maxCardinality 1 ; + owl:onProperty matrix_schema:is_icd_category ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty matrix_schema:txgnn ], + owl:onProperty matrix_schema:is_cancer ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty matrix_schema:is_cancer ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:Boolean ; + owl:onProperty matrix_schema:is_withorwithout ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty matrix_schema:tag_existing_treatment ], [ a owl:Restriction ; owl:maxCardinality 1 ; + owl:onProperty matrix_schema:is_mondo_subtype ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:Boolean ; owl:onProperty matrix_schema:is_omimps_descendant ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty matrix_schema:official_matrix_filter ], + owl:onProperty matrix_schema:is_orphanet_subtype ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty matrix_schema:is_withorwithout ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:Boolean ; + owl:onProperty matrix_schema:is_grouping_subset ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; owl:onProperty matrix_schema:subsets ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty matrix_schema:is_pathogen_caused ], + owl:onProperty matrix_schema:tag_qaly_lost ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty matrix_schema:is_matrix_manually_included ], + owl:allValuesFrom linkml:Boolean ; + owl:onProperty matrix_schema:is_icd_chapter_header ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:allValuesFrom linkml:Boolean ; owl:onProperty matrix_schema:is_susceptibility ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty matrix_schema:is_grouping_subset ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:is_orphanet_subtype_descendant ], + owl:onProperty matrix_schema:is_susceptibility ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty matrix_schema:is_unclassified_hereditary ], + owl:onProperty matrix_schema:is_omim ], [ a owl:Restriction ; - owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:is_susceptibility ], + owl:minCardinality 1 ; + owl:onProperty matrix_schema:medical_specialization ], [ a owl:Restriction ; owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:is_pathway_defect ], + owl:onProperty matrix_schema:is_glucose_dysfunction ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty matrix_schema:category_class ], + owl:onProperty matrix_schema:is_andor ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty matrix_schema:other_subsets_count ], [ a owl:Restriction ; owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:is_grouping_subset_ancestor ], + owl:onProperty matrix_schema:is_orphanet_subtype ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty matrix_schema:subset_group_id ], + owl:allValuesFrom linkml:Boolean ; + owl:onProperty matrix_schema:is_leaf ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty matrix_schema:mondo_txgnn ], + owl:maxCardinality 1 ; + owl:onProperty matrix_schema:is_orphanet_disorder ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty matrix_schema:category_class ], + owl:maxCardinality 1 ; + owl:onProperty matrix_schema:is_matrix_manually_excluded ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty matrix_schema:is_clingen ], + owl:onProperty matrix_schema:is_pathway_defect ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty matrix_schema:medical_specialization ], + owl:minCardinality 1 ; + owl:onProperty matrix_schema:is_unclassified_hereditary ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty matrix_schema:synonyms ], + owl:allValuesFrom linkml:Boolean ; + owl:onProperty matrix_schema:is_orphanet_disorder ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:Boolean ; + owl:onProperty matrix_schema:is_andor ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty matrix_schema:synonyms ], + owl:onProperty matrix_schema:is_leaf_direct_parent ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty matrix_schema:anatomical ], + owl:onProperty matrix_schema:is_obsoletion_candidate ], [ a owl:Restriction ; - owl:allValuesFrom linkml:Integer ; - owl:onProperty matrix_schema:other_subsets_count ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty matrix_schema:is_omimps ], + owl:allValuesFrom linkml:String ; + owl:onProperty matrix_schema:subset_group_id ], [ a owl:Restriction ; - owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:is_icd_category ], + owl:minCardinality 1 ; + owl:onProperty matrix_schema:is_mondo_subtype ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty matrix_schema:subset_group_label ], + owl:maxCardinality 1 ; + owl:onProperty matrix_schema:is_unclassified_hereditary ], [ a owl:Restriction ; owl:minCardinality 1 ; + owl:onProperty matrix_schema:crossreferences ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; owl:onProperty matrix_schema:is_orphanet_subtype_descendant ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:Boolean ; + owl:onProperty matrix_schema:is_mondo_subtype ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty matrix_schema:subset_group_label ], + owl:onProperty matrix_schema:is_andor ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty matrix_schema:is_icd_billable ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty matrix_schema:definition ], + owl:onProperty matrix_schema:is_icd_chapter_header ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty matrix_schema:is_leaf_direct_parent ], + owl:onProperty matrix_schema:is_icd_billable ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:Boolean ; + owl:onProperty matrix_schema:is_icd_billable ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty matrix_schema:is_leaf_direct_parent ], + owl:onProperty matrix_schema:definition ], [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty matrix_schema:is_icd_chapter_code ], + owl:allValuesFrom linkml:String ; + owl:onProperty matrix_schema:subset_group_label ], [ a owl:Restriction ; owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:is_omimps ], + owl:onProperty matrix_schema:is_pathway_defect ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty matrix_schema:is_orphanet_subtype ], + owl:minCardinality 0 ; + owl:onProperty matrix_schema:subset_group_label ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty matrix_schema:is_icd_billable ], + owl:onProperty matrix_schema:is_icd_chapter_code ], [ a owl:Restriction ; - owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:is_glucose_dysfunction ], + owl:minCardinality 1 ; + owl:onProperty matrix_schema:is_grouping_subset_ancestor ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty matrix_schema:is_omimps_descendant ], + owl:onProperty matrix_schema:is_omimps ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty matrix_schema:is_obsoletion_candidate ], + owl:onProperty matrix_schema:subsets ], [ a owl:Restriction ; - owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:is_mondo_subtype ], + owl:allValuesFrom linkml:String ; + owl:onProperty matrix_schema:mondo_txgnn ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty matrix_schema:mondo_top_grouping ], + owl:onProperty matrix_schema:tag_existing_treatment ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty matrix_schema:is_leaf ], + owl:onProperty matrix_schema:tag_qaly_lost ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty matrix_schema:is_cancer ], + owl:allValuesFrom linkml:Boolean ; + owl:onProperty matrix_schema:is_omim ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty matrix_schema:definition ], + owl:allValuesFrom linkml:Boolean ; + owl:onProperty matrix_schema:is_matrix_manually_excluded ], [ a owl:Restriction ; owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:is_icd_billable ], + owl:onProperty matrix_schema:is_grouping_subset_ancestor ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty matrix_schema:is_icd_category ], + owl:onProperty matrix_schema:official_matrix_filter ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty matrix_schema:is_mondo_subtype ], + owl:allValuesFrom linkml:Boolean ; + owl:onProperty matrix_schema:is_paraphilic ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty matrix_schema:is_paraphilic ], + owl:onProperty matrix_schema:is_grouping_subset ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty matrix_schema:is_pathway_defect ], + owl:onProperty matrix_schema:is_omimps ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty matrix_schema:other_subsets_count ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty matrix_schema:is_acquired ], + owl:onProperty matrix_schema:is_leaf_direct_parent ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty matrix_schema:tag_qaly_lost ], + owl:onProperty matrix_schema:is_matrix_manually_excluded ], + [ a owl:Restriction ; + owl:allValuesFrom linkml:String ; + owl:onProperty matrix_schema:definition ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty matrix_schema:tag_existing_treatment ], + owl:onProperty matrix_schema:is_withorwithout ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty matrix_schema:is_glucose_dysfunction ], + owl:allValuesFrom linkml:String ; + owl:onProperty matrix_schema:mondo_top_grouping ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty matrix_schema:is_matrix_manually_excluded ], + owl:onProperty matrix_schema:is_icd_chapter_code ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty matrix_schema:is_withorwithout ], + owl:minCardinality 1 ; + owl:onProperty matrix_schema:is_glucose_dysfunction ], [ a owl:Restriction ; - owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:is_leaf_direct_parent ], + owl:minCardinality 1 ; + owl:onProperty matrix_schema:is_orphanet_subtype_descendant ], [ a owl:Restriction ; - owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:is_leaf ], + owl:allValuesFrom linkml:String ; + owl:onProperty matrix_schema:synonyms ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty matrix_schema:is_withorwithout ], + owl:onProperty matrix_schema:is_matrix_manually_included ], [ a owl:Restriction ; owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:is_unclassified_hereditary ], + owl:onProperty matrix_schema:tag_existing_treatment ], [ a owl:Restriction ; owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:is_grouping_subset ], + owl:onProperty matrix_schema:is_icd_category ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty matrix_schema:is_icd_chapter_code ], - [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty matrix_schema:is_mondo_subtype ], + owl:onProperty matrix_schema:is_susceptibility ], [ a owl:Restriction ; owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:is_matrix_manually_excluded ], + owl:onProperty matrix_schema:is_acquired ], [ a owl:Restriction ; owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:is_matrix_manually_included ], + owl:onProperty matrix_schema:is_obsoletion_candidate ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty matrix_schema:label ], + owl:onProperty matrix_schema:synonyms ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty matrix_schema:is_matrix_manually_excluded ], + owl:minCardinality 1 ; + owl:onProperty matrix_schema:mondo_top_grouping ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty matrix_schema:is_pathogen_caused ], + owl:allValuesFrom linkml:String ; + owl:onProperty matrix_schema:harrisons_view ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty matrix_schema:is_orphanet_disorder ], + owl:minCardinality 1 ; + owl:onProperty matrix_schema:txgnn ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty matrix_schema:category_class ], + owl:onProperty matrix_schema:is_glucose_dysfunction ], [ a owl:Restriction ; owl:minCardinality 1 ; - owl:onProperty matrix_schema:is_omim ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:is_omimps_descendant ], + owl:onProperty matrix_schema:is_pathway_defect ], [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty matrix_schema:subsets ], + owl:maxCardinality 1 ; + owl:onProperty matrix_schema:subset_group_label ], [ a owl:Restriction ; - owl:allValuesFrom linkml:Boolean ; - owl:onProperty matrix_schema:is_icd_chapter_code ] ; + owl:allValuesFrom linkml:String ; + owl:onProperty matrix_schema:medical_specialization ] ; skos:definition "A disease entry in the disease list." ; skos:inScheme matrix_schema:disease-list . @@ -603,131 +603,131 @@ matrix_schema:MatrixEdge a owl:Class, linkml:ClassDefinition ; rdfs:label "MatrixEdge" ; rdfs:subClassOf [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty matrix_schema:object ], - [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty matrix_schema:primary_knowledge_source ], + owl:onProperty matrix_schema:object_direction_qualifier ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty matrix_schema:num_sentences ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty matrix_schema:num_sentences ], + owl:onProperty matrix_schema:upstream_data_source ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty matrix_schema:aggregator_knowledge_source ], + owl:allValuesFrom linkml:String ; + owl:onProperty matrix_schema:object_aspect_qualifier ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty matrix_schema:knowledge_level ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty matrix_schema:subject ], + owl:onProperty matrix_schema:agent_type ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; owl:onProperty matrix_schema:primary_knowledge_source ], + [ a owl:Restriction ; + owl:allValuesFrom matrix_schema:AgentTypeEnum ; + owl:onProperty matrix_schema:agent_type ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty matrix_schema:publications ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty matrix_schema:subject_direction_qualifier ], + owl:minCardinality 1 ; + owl:onProperty matrix_schema:subject ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty matrix_schema:object_direction_qualifier ], + owl:allValuesFrom linkml:Integer ; + owl:onProperty matrix_schema:num_sentences ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty matrix_schema:subject_aspect_qualifier ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty matrix_schema:subject_aspect_qualifier ], + owl:onProperty matrix_schema:subject_direction_qualifier ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty matrix_schema:object_aspect_qualifier ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty matrix_schema:primary_knowledge_source ], + owl:minCardinality 0 ; + owl:onProperty matrix_schema:subject_direction_qualifier ], [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty matrix_schema:subject ], + owl:allValuesFrom linkml:Integer ; + owl:onProperty matrix_schema:num_references ], + [ a owl:Restriction ; + owl:allValuesFrom matrix_schema:KnowledgeLevelEnum ; + owl:onProperty matrix_schema:knowledge_level ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty matrix_schema:predicate ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty matrix_schema:object_direction_qualifier ], + owl:onProperty matrix_schema:knowledge_level ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty matrix_schema:num_references ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty matrix_schema:upstream_data_source ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty matrix_schema:publications ], + owl:onProperty matrix_schema:subject_aspect_qualifier ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; - owl:onProperty matrix_schema:subject_direction_qualifier ], + owl:onProperty matrix_schema:object ], [ a owl:Restriction ; - owl:allValuesFrom matrix_schema:KnowledgeLevelEnum ; - owl:onProperty matrix_schema:knowledge_level ], + owl:minCardinality 1 ; + owl:onProperty matrix_schema:predicate ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty matrix_schema:object ], + owl:onProperty matrix_schema:num_sentences ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; - owl:onProperty matrix_schema:upstream_data_source ], + owl:onProperty matrix_schema:subject_direction_qualifier ], [ a owl:Restriction ; owl:allValuesFrom matrix_schema:PredicateEnum ; owl:onProperty matrix_schema:predicate ], - [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty matrix_schema:object ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty matrix_schema:num_references ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty matrix_schema:agent_type ], + owl:onProperty matrix_schema:subject ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty matrix_schema:agent_type ], + owl:allValuesFrom linkml:String ; + owl:onProperty matrix_schema:subject_aspect_qualifier ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty matrix_schema:subject ], + owl:allValuesFrom linkml:String ; + owl:onProperty matrix_schema:aggregator_knowledge_source ], [ a owl:Restriction ; - owl:allValuesFrom linkml:Integer ; - owl:onProperty matrix_schema:num_sentences ], + owl:allValuesFrom linkml:String ; + owl:onProperty matrix_schema:publications ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty matrix_schema:object_aspect_qualifier ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty matrix_schema:subject_aspect_qualifier ], + owl:minCardinality 1 ; + owl:onProperty matrix_schema:object ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; - owl:onProperty matrix_schema:object_aspect_qualifier ], + owl:onProperty matrix_schema:upstream_data_source ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty matrix_schema:subject_direction_qualifier ], + owl:onProperty matrix_schema:primary_knowledge_source ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; - owl:onProperty matrix_schema:aggregator_knowledge_source ], + owl:onProperty matrix_schema:object_direction_qualifier ], [ a owl:Restriction ; - owl:allValuesFrom linkml:Integer ; + owl:maxCardinality 1 ; owl:onProperty matrix_schema:num_references ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty matrix_schema:object_direction_qualifier ], + owl:minCardinality 0 ; + owl:onProperty matrix_schema:agent_type ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty matrix_schema:knowledge_level ], + owl:onProperty matrix_schema:aggregator_knowledge_source ], [ a owl:Restriction ; - owl:allValuesFrom matrix_schema:AgentTypeEnum ; - owl:onProperty matrix_schema:agent_type ], + owl:maxCardinality 1 ; + owl:onProperty matrix_schema:primary_knowledge_source ], [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty matrix_schema:predicate ], + owl:allValuesFrom linkml:String ; + owl:onProperty matrix_schema:subject ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty matrix_schema:object ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty matrix_schema:subject_aspect_qualifier ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty matrix_schema:object_direction_qualifier ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty matrix_schema:num_sentences ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty matrix_schema:predicate ] ; + owl:onProperty matrix_schema:knowledge_level ] ; owl:hasKey ( matrix_schema:subject matrix_schema:predicate matrix_schema:object ) ; skos:definition "An edge representing a relationship between two nodes in the Biolink knowledge graph." ; skos:inScheme matrix_schema:kg . @@ -736,80 +736,80 @@ matrix_schema:MatrixNode a owl:Class, linkml:ClassDefinition ; rdfs:label "MatrixNode" ; rdfs:subClassOf [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty matrix_schema:id ], + owl:allValuesFrom linkml:String ; + owl:onProperty matrix_schema:name ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty matrix_schema:upstream_data_source ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty matrix_schema:name ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; - owl:onProperty matrix_schema:labels ], + owl:onProperty matrix_schema:publications ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; - owl:onProperty matrix_schema:international_resource_identifier ], + owl:onProperty matrix_schema:upstream_data_source ], [ a owl:Restriction ; - owl:minCardinality 1 ; + owl:allValuesFrom matrix_schema:NodeCategoryEnum ; owl:onProperty matrix_schema:category ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty matrix_schema:all_categories ], - [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty matrix_schema:upstream_data_source ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; - owl:onProperty matrix_schema:publications ], + owl:onProperty matrix_schema:labels ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty matrix_schema:id ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty matrix_schema:description ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty matrix_schema:description ], - [ a owl:Restriction ; - owl:allValuesFrom matrix_schema:NodeCategoryEnum ; - owl:onProperty matrix_schema:all_categories ], + owl:minCardinality 1 ; + owl:onProperty matrix_schema:category ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty matrix_schema:equivalent_identifiers ], + owl:minCardinality 1 ; + owl:onProperty matrix_schema:id ], [ a owl:Restriction ; owl:allValuesFrom linkml:Uriorcurie ; owl:onProperty matrix_schema:id ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty matrix_schema:category ], + owl:onProperty matrix_schema:description ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty matrix_schema:upstream_data_source ], + owl:allValuesFrom linkml:String ; + owl:onProperty matrix_schema:description ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:minCardinality 0 ; owl:onProperty matrix_schema:description ], [ a owl:Restriction ; - owl:allValuesFrom matrix_schema:NodeCategoryEnum ; - owl:onProperty matrix_schema:category ], + owl:allValuesFrom linkml:String ; + owl:onProperty matrix_schema:equivalent_identifiers ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty matrix_schema:international_resource_identifier ], [ a owl:Restriction ; - owl:allValuesFrom linkml:String ; - owl:onProperty matrix_schema:name ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty matrix_schema:name ], + owl:minCardinality 0 ; + owl:onProperty matrix_schema:all_categories ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty matrix_schema:labels ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty matrix_schema:international_resource_identifier ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty matrix_schema:publications ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty matrix_schema:equivalent_identifiers ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty matrix_schema:name ], [ a owl:Restriction ; owl:allValuesFrom linkml:String ; - owl:onProperty matrix_schema:equivalent_identifiers ] ; + owl:onProperty matrix_schema:international_resource_identifier ], + [ a owl:Restriction ; + owl:allValuesFrom matrix_schema:NodeCategoryEnum ; + owl:onProperty matrix_schema:all_categories ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty matrix_schema:international_resource_identifier ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty matrix_schema:category ] ; owl:hasKey ( matrix_schema:id ) ; skos:definition "A node in the Biolink knowledge graph." ; skos:inScheme matrix_schema:kg . diff --git a/project/shacl/matrix_schema.shacl.ttl b/project/shacl/matrix_schema.shacl.ttl index b65efd9..cf0f9ca 100644 --- a/project/shacl/matrix_schema.shacl.ttl +++ b/project/shacl/matrix_schema.shacl.ttl @@ -41,85 +41,85 @@ matrix_schema:UnionedEdge a sh:NodeShape ; sh:closed true ; sh:description "An edge in the unioned everycure matrix graph." ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:datatype xsd:string ; - sh:description "Aspect qualifier for the subject." ; + sh:property [ sh:description "The predicate defining the relationship." ; + sh:in ( "biolink:related_to" "biolink:related_to_at_concept_level" "biolink:related_to_at_instance_level" "biolink:disease_has_location" "biolink:location_of_disease" "biolink:composed_primarily_of" "biolink:primarily_composed_of" "biolink:associated_with" "biolink:opposite_of" "biolink:affects_likelihood_of" "biolink:likelihood_affected_by" "biolink:target_for" "biolink:has_target" "biolink:active_in" "biolink:has_active_component" "biolink:acts_upstream_of" "biolink:has_upstream_actor" "biolink:mentions" "biolink:mentioned_by" "biolink:contributor" "biolink:has_contributor" "biolink:assesses" "biolink:is_assessed_by" "biolink:interacts_with" "biolink:affects" "biolink:affected_by" "biolink:diagnoses" "biolink:is_diagnosed_by" "biolink:increases_amount_or_activity_of" "biolink:amount_or_activity_increased_by" "biolink:decreases_amount_or_activity_of" "biolink:amount_or_activity_decreased_by" "biolink:gene_product_of" "biolink:has_gene_product" "biolink:transcribed_to" "biolink:transcribed_from" "biolink:translates_to" "biolink:translation_of" "biolink:coexists_with" "biolink:contributes_to" "biolink:contribution_from" "biolink:studied_to_treat" "biolink:applied_to_treat" "biolink:treatment_applications_from" "biolink:treats_or_applied_or_studied_to_treat" "biolink:subject_of_treatment_application_or_study_for_treatment_by" "biolink:has_phenotype" "biolink:phenotype_of" "biolink:occurs_in" "biolink:contains_process" "biolink:located_in" "biolink:location_of" "biolink:similar_to" "biolink:has_sequence_location" "biolink:sequence_location_of" "biolink:model_of" "biolink:models" "biolink:overlaps" "biolink:has_participant" "biolink:participates_in" "biolink:derives_into" "biolink:derives_from" "biolink:manifestation_of" "biolink:has_manifestation" "biolink:produces" "biolink:produced_by" "biolink:temporally_related_to" "biolink:related_condition" "biolink:is_sequence_variant_of" "biolink:has_sequence_variant" "biolink:disease_has_basis_in" "biolink:occurs_in_disease" "biolink:contraindicated_in" "biolink:has_contraindication" "biolink:has_not_completed" "biolink:not_completed_by" "biolink:has_completed" "biolink:completed_by" "biolink:in_linkage_disequilibrium_with" "biolink:has_increased_amount" "biolink:increased_amount_of" "biolink:has_decreased_amount" "biolink:decreased_amount_in" "biolink:lacks_part" "biolink:missing_from" "biolink:develops_from" "biolink:develops_into" "biolink:in_taxon" "biolink:taxon_of" "biolink:has_molecular_consequence" "biolink:is_molecular_consequence_of" "biolink:has_missense_variant" "biolink:has_synonymous_variant" "biolink:has_nonsense_variant" "biolink:has_frameshift_variant" "biolink:has_splice_site_variant" "biolink:has_nearby_variant" "biolink:has_non_coding_variant" "biolink:is_missense_variant_of" "biolink:is_synonymous_variant_of" "biolink:is_nonsense_variant_of" "biolink:is_frameshift_variant_of" "biolink:is_splice_site_variant_of" "biolink:is_nearby_variant_of" "biolink:is_non_coding_variant_of" "biolink:precedes" "biolink:preceded_by" "biolink:has_mode_of_inheritance" "biolink:mode_of_inheritance_of" "biolink:is_metabolite_of" "biolink:has_metabolite" "biolink:is_input_of" "biolink:is_output_of" "biolink:catalyzes" "biolink:is_substrate_of" "biolink:actively_involved_in" "biolink:enables" "biolink:capable_of" "biolink:consumed_by" "biolink:has_input" "biolink:has_output" "biolink:has_catalyst" "biolink:has_substrate" "biolink:actively_involves" "biolink:enabled_by" "biolink:can_be_carried_out_by" "biolink:consumes" "biolink:has_part" "biolink:part_of" "biolink:plasma_membrane_part_of" "biolink:food_component_of" "biolink:is_active_ingredient_of" "biolink:is_excipient_of" "biolink:variant_part_of" "biolink:nutrient_of" "biolink:has_plasma_membrane_part" "biolink:has_food_component" "biolink:has_active_ingredient" "biolink:has_excipient" "biolink:has_variant_part" "biolink:has_nutrient" "biolink:homologous_to" "biolink:chemically_similar_to" "biolink:paralogous_to" "biolink:orthologous_to" "biolink:xenologous_to" "biolink:expresses" "biolink:expressed_in" "biolink:treated_by" "biolink:tested_by_clinical_trials_of" "biolink:treated_in_studies_by" "biolink:tested_by_preclinical_trials_of" "biolink:models_demonstrating_benefits_for" "biolink:treats" "biolink:in_clinical_trials_for" "biolink:in_preclinical_trials_for" "biolink:beneficial_in_models_for" "biolink:ameliorates_condition" "biolink:preventative_for_condition" "biolink:caused_by" "biolink:causes" "biolink:in_pathway_with" "biolink:in_complex_with" "biolink:in_cell_population_with" "biolink:colocalizes_with" "biolink:response_affected_by" "biolink:regulated_by" "biolink:disrupted_by" "biolink:condition_ameliorated_by" "biolink:condition_prevented_by" "biolink:condition_exacerbated_by" "biolink:adverse_event_of" "biolink:is_side_effect_of" "biolink:response_increased_by" "biolink:response_decreased_by" "biolink:affects_response_to" "biolink:regulates" "biolink:disrupts" "biolink:exacerbates_condition" "biolink:has_adverse_event" "biolink:has_side_effect" "biolink:increases_response_to" "biolink:decreases_response_to" "biolink:physically_interacts_with" "biolink:genetically_interacts_with" "biolink:gene_fusion_with" "biolink:genetic_neighborhood_of" "biolink:directly_physically_interacts_with" "biolink:indirectly_physically_interacts_with" "biolink:binds" "biolink:has_provider" "biolink:has_publisher" "biolink:has_editor" "biolink:has_author" "biolink:provider" "biolink:publisher" "biolink:editor" "biolink:author" "biolink:has_positive_upstream_actor" "biolink:has_negative_upstream_actor" "biolink:has_upstream_or_within_actor" "biolink:has_positive_upstream_or_within_actor" "biolink:has_negative_upstream_or_within_actor" "biolink:acts_upstream_of_positive_effect" "biolink:acts_upstream_of_negative_effect" "biolink:acts_upstream_of_or_within" "biolink:acts_upstream_of_or_within_positive_effect" "biolink:acts_upstream_of_or_within_negative_effect" "biolink:condition_promoted_by" "biolink:condition_predisposed_by" "biolink:promotes_condition" "biolink:predisposes_to_condition" "biolink:associated_with_likelihood_of" "biolink:likelihood_associated_with" "biolink:associated_with_sensitivity_to" "biolink:sensitivity_associated_with" "biolink:associated_with_resistance_to" "biolink:resistance_associated_with" "biolink:genetic_association" "biolink:genetically_associated_with" "biolink:correlated_with" "biolink:positively_correlated_with" "biolink:negatively_correlated_with" "biolink:occurs_together_in_literature_with" "biolink:coexpressed_with" "biolink:has_biomarker" "biolink:biomarker_for" "biolink:gene_associated_with_condition" "biolink:condition_associated_with_gene" "biolink:increased_likelihood_associated_with" "biolink:decreased_likelihood_associated_with" "biolink:associated_with_increased_likelihood_of" "biolink:associated_with_decreased_likelihood_of" "biolink:has_chemical_role" "biolink:superclass_of" "biolink:subclass_of" "biolink:close_match" "biolink:broad_match" "biolink:narrow_match" "biolink:member_of" "biolink:has_member" "biolink:exact_match" "biolink:same_as" ) ; sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 9 ; - sh:path matrix_schema:subject_aspect_qualifier ], + sh:minCount 1 ; + sh:order 2 ; + sh:path matrix_schema:predicate ], [ sh:datatype xsd:string ; - sh:description "Direction qualifier for the subject." ; + sh:description "Aspect qualifier for the object." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 10 ; - sh:path matrix_schema:subject_direction_qualifier ], + sh:order 11 ; + sh:path matrix_schema:object_aspect_qualifier ], [ sh:datatype xsd:string ; - sh:description "Primary source of the knowledge in the edge." ; - sh:maxCount 1 ; + sh:description "Sources from which this entity's data originates." ; sh:nodeKind sh:Literal ; - sh:order 6 ; - sh:path matrix_schema:primary_knowledge_source ], + sh:order 13 ; + sh:path matrix_schema:upstream_data_source ], [ sh:datatype xsd:string ; - sh:description "The object entity in the edge." ; - sh:maxCount 1 ; - sh:minCount 1 ; + sh:description "Primary sources from edges merged into this edge." ; sh:nodeKind sh:Literal ; - sh:order 3 ; - sh:path matrix_schema:object ], + sh:order 0 ; + sh:path matrix_schema:primary_knowledge_sources ], [ sh:datatype xsd:string ; sh:description "Direction qualifier for the object." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 12 ; sh:path matrix_schema:object_direction_qualifier ], - [ sh:datatype xsd:string ; - sh:description "Publications associated with the entity." ; - sh:nodeKind sh:Literal ; - sh:order 8 ; - sh:path matrix_schema:publications ], - [ sh:datatype xsd:string ; - sh:description "Aspect qualifier for the object." ; + [ sh:description "Type of agent involved in the relationship." ; + sh:in ( "manual_agent" "automated_agent" "data_analysis_pipeline" "computational_model" "text_mining_agent" "image_processing_agent" "manual_validation_of_automated_agent" "not_provided" ) ; sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 11 ; - sh:path matrix_schema:object_aspect_qualifier ], - [ sh:datatype xsd:string ; - sh:description "Primary sources from edges merged into this edge." ; - sh:nodeKind sh:Literal ; - sh:order 0 ; - sh:path matrix_schema:primary_knowledge_sources ], + sh:order 5 ; + sh:path matrix_schema:agent_type ], [ sh:datatype xsd:integer ; sh:description "Number of sentences supporting this edge." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 15 ; sh:path matrix_schema:num_sentences ], + [ sh:description "Knowledge level of the relationship" ; + sh:in ( "knowledge_assertion" "logical_entailment" "prediction" "statistical_association" "observation" "not_provided" ) ; + sh:maxCount 1 ; + sh:order 4 ; + sh:path matrix_schema:knowledge_level ], + [ sh:datatype xsd:string ; + sh:description "Direction qualifier for the subject." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 10 ; + sh:path matrix_schema:subject_direction_qualifier ], [ sh:datatype xsd:string ; sh:description "Aggregators of the knowledge." ; sh:nodeKind sh:Literal ; sh:order 7 ; sh:path matrix_schema:aggregator_knowledge_source ], + [ sh:datatype xsd:string ; + sh:description "Publications associated with the entity." ; + sh:nodeKind sh:Literal ; + sh:order 8 ; + sh:path matrix_schema:publications ], + [ sh:datatype xsd:string ; + sh:description "The object entity in the edge." ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 3 ; + sh:path matrix_schema:object ], + [ sh:datatype xsd:string ; + sh:description "Primary source of the knowledge in the edge." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 6 ; + sh:path matrix_schema:primary_knowledge_source ], [ sh:datatype xsd:integer ; sh:description "Number of references supporting this edge." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; sh:order 14 ; sh:path matrix_schema:num_references ], - [ sh:description "Knowledge level of the relationship" ; - sh:in ( "knowledge_assertion" "logical_entailment" "prediction" "statistical_association" "observation" "not_provided" ) ; - sh:maxCount 1 ; - sh:order 4 ; - sh:path matrix_schema:knowledge_level ], - [ sh:datatype xsd:string ; - sh:description "Sources from which this entity's data originates." ; - sh:nodeKind sh:Literal ; - sh:order 13 ; - sh:path matrix_schema:upstream_data_source ], - [ sh:description "Type of agent involved in the relationship." ; - sh:in ( "manual_agent" "automated_agent" "data_analysis_pipeline" "computational_model" "text_mining_agent" "image_processing_agent" "manual_validation_of_automated_agent" "not_provided" ) ; - sh:maxCount 1 ; - sh:order 5 ; - sh:path matrix_schema:agent_type ], [ sh:datatype xsd:string ; sh:description "The subject entity in the edge." ; sh:maxCount 1 ; @@ -127,48 +127,61 @@ matrix_schema:UnionedEdge a sh:NodeShape ; sh:nodeKind sh:Literal ; sh:order 1 ; sh:path matrix_schema:subject ], - [ sh:description "The predicate defining the relationship." ; - sh:in ( "biolink:related_to" "biolink:related_to_at_concept_level" "biolink:related_to_at_instance_level" "biolink:disease_has_location" "biolink:location_of_disease" "biolink:composed_primarily_of" "biolink:primarily_composed_of" "biolink:associated_with" "biolink:opposite_of" "biolink:affects_likelihood_of" "biolink:likelihood_affected_by" "biolink:target_for" "biolink:has_target" "biolink:active_in" "biolink:has_active_component" "biolink:acts_upstream_of" "biolink:has_upstream_actor" "biolink:mentions" "biolink:mentioned_by" "biolink:contributor" "biolink:has_contributor" "biolink:assesses" "biolink:is_assessed_by" "biolink:interacts_with" "biolink:affects" "biolink:affected_by" "biolink:diagnoses" "biolink:is_diagnosed_by" "biolink:increases_amount_or_activity_of" "biolink:amount_or_activity_increased_by" "biolink:decreases_amount_or_activity_of" "biolink:amount_or_activity_decreased_by" "biolink:gene_product_of" "biolink:has_gene_product" "biolink:transcribed_to" "biolink:transcribed_from" "biolink:translates_to" "biolink:translation_of" "biolink:coexists_with" "biolink:contributes_to" "biolink:contribution_from" "biolink:studied_to_treat" "biolink:applied_to_treat" "biolink:treatment_applications_from" "biolink:treats_or_applied_or_studied_to_treat" "biolink:subject_of_treatment_application_or_study_for_treatment_by" "biolink:has_phenotype" "biolink:phenotype_of" "biolink:occurs_in" "biolink:contains_process" "biolink:located_in" "biolink:location_of" "biolink:similar_to" "biolink:has_sequence_location" "biolink:sequence_location_of" "biolink:model_of" "biolink:models" "biolink:overlaps" "biolink:has_participant" "biolink:participates_in" "biolink:derives_into" "biolink:derives_from" "biolink:manifestation_of" "biolink:has_manifestation" "biolink:produces" "biolink:produced_by" "biolink:temporally_related_to" "biolink:related_condition" "biolink:is_sequence_variant_of" "biolink:has_sequence_variant" "biolink:disease_has_basis_in" "biolink:occurs_in_disease" "biolink:contraindicated_in" "biolink:has_contraindication" "biolink:has_not_completed" "biolink:not_completed_by" "biolink:has_completed" "biolink:completed_by" "biolink:in_linkage_disequilibrium_with" "biolink:has_increased_amount" "biolink:increased_amount_of" "biolink:has_decreased_amount" "biolink:decreased_amount_in" "biolink:lacks_part" "biolink:missing_from" "biolink:develops_from" "biolink:develops_into" "biolink:in_taxon" "biolink:taxon_of" "biolink:has_molecular_consequence" "biolink:is_molecular_consequence_of" "biolink:has_missense_variant" "biolink:has_synonymous_variant" "biolink:has_nonsense_variant" "biolink:has_frameshift_variant" "biolink:has_splice_site_variant" "biolink:has_nearby_variant" "biolink:has_non_coding_variant" "biolink:is_missense_variant_of" "biolink:is_synonymous_variant_of" "biolink:is_nonsense_variant_of" "biolink:is_frameshift_variant_of" "biolink:is_splice_site_variant_of" "biolink:is_nearby_variant_of" "biolink:is_non_coding_variant_of" "biolink:precedes" "biolink:preceded_by" "biolink:has_mode_of_inheritance" "biolink:mode_of_inheritance_of" "biolink:is_metabolite_of" "biolink:has_metabolite" "biolink:is_input_of" "biolink:is_output_of" "biolink:catalyzes" "biolink:is_substrate_of" "biolink:actively_involved_in" "biolink:enables" "biolink:capable_of" "biolink:consumed_by" "biolink:has_input" "biolink:has_output" "biolink:has_catalyst" "biolink:has_substrate" "biolink:actively_involves" "biolink:enabled_by" "biolink:can_be_carried_out_by" "biolink:consumes" "biolink:has_part" "biolink:part_of" "biolink:plasma_membrane_part_of" "biolink:food_component_of" "biolink:is_active_ingredient_of" "biolink:is_excipient_of" "biolink:variant_part_of" "biolink:nutrient_of" "biolink:has_plasma_membrane_part" "biolink:has_food_component" "biolink:has_active_ingredient" "biolink:has_excipient" "biolink:has_variant_part" "biolink:has_nutrient" "biolink:homologous_to" "biolink:chemically_similar_to" "biolink:paralogous_to" "biolink:orthologous_to" "biolink:xenologous_to" "biolink:expresses" "biolink:expressed_in" "biolink:treated_by" "biolink:tested_by_clinical_trials_of" "biolink:treated_in_studies_by" "biolink:tested_by_preclinical_trials_of" "biolink:models_demonstrating_benefits_for" "biolink:treats" "biolink:in_clinical_trials_for" "biolink:in_preclinical_trials_for" "biolink:beneficial_in_models_for" "biolink:ameliorates_condition" "biolink:preventative_for_condition" "biolink:caused_by" "biolink:causes" "biolink:in_pathway_with" "biolink:in_complex_with" "biolink:in_cell_population_with" "biolink:colocalizes_with" "biolink:response_affected_by" "biolink:regulated_by" "biolink:disrupted_by" "biolink:condition_ameliorated_by" "biolink:condition_prevented_by" "biolink:condition_exacerbated_by" "biolink:adverse_event_of" "biolink:is_side_effect_of" "biolink:response_increased_by" "biolink:response_decreased_by" "biolink:affects_response_to" "biolink:regulates" "biolink:disrupts" "biolink:exacerbates_condition" "biolink:has_adverse_event" "biolink:has_side_effect" "biolink:increases_response_to" "biolink:decreases_response_to" "biolink:physically_interacts_with" "biolink:genetically_interacts_with" "biolink:gene_fusion_with" "biolink:genetic_neighborhood_of" "biolink:directly_physically_interacts_with" "biolink:indirectly_physically_interacts_with" "biolink:binds" "biolink:has_provider" "biolink:has_publisher" "biolink:has_editor" "biolink:has_author" "biolink:provider" "biolink:publisher" "biolink:editor" "biolink:author" "biolink:has_positive_upstream_actor" "biolink:has_negative_upstream_actor" "biolink:has_upstream_or_within_actor" "biolink:has_positive_upstream_or_within_actor" "biolink:has_negative_upstream_or_within_actor" "biolink:acts_upstream_of_positive_effect" "biolink:acts_upstream_of_negative_effect" "biolink:acts_upstream_of_or_within" "biolink:acts_upstream_of_or_within_positive_effect" "biolink:acts_upstream_of_or_within_negative_effect" "biolink:condition_promoted_by" "biolink:condition_predisposed_by" "biolink:promotes_condition" "biolink:predisposes_to_condition" "biolink:associated_with_likelihood_of" "biolink:likelihood_associated_with" "biolink:associated_with_sensitivity_to" "biolink:sensitivity_associated_with" "biolink:associated_with_resistance_to" "biolink:resistance_associated_with" "biolink:genetic_association" "biolink:genetically_associated_with" "biolink:correlated_with" "biolink:positively_correlated_with" "biolink:negatively_correlated_with" "biolink:occurs_together_in_literature_with" "biolink:coexpressed_with" "biolink:has_biomarker" "biolink:biomarker_for" "biolink:gene_associated_with_condition" "biolink:condition_associated_with_gene" "biolink:increased_likelihood_associated_with" "biolink:decreased_likelihood_associated_with" "biolink:associated_with_increased_likelihood_of" "biolink:associated_with_decreased_likelihood_of" "biolink:has_chemical_role" "biolink:superclass_of" "biolink:subclass_of" "biolink:close_match" "biolink:broad_match" "biolink:narrow_match" "biolink:member_of" "biolink:has_member" "biolink:exact_match" "biolink:same_as" ) ; + [ sh:datatype xsd:string ; + sh:description "Aspect qualifier for the subject." ; sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 2 ; - sh:path matrix_schema:predicate ] ; + sh:nodeKind sh:Literal ; + sh:order 9 ; + sh:path matrix_schema:subject_aspect_qualifier ] ; sh:targetClass matrix_schema:UnionedEdge . matrix_schema:UnionedNode a sh:NodeShape ; sh:closed true ; sh:description "A node in the unioned everycure matrix graph." ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:description "Biolink category of the entity." ; + sh:property [ sh:datatype xsd:string ; + sh:description "Alternative labels for the entity." ; + sh:nodeKind sh:Literal ; + sh:order 7 ; + sh:path matrix_schema:labels ], + [ sh:datatype xsd:string ; + sh:description "Human-readable name of the entity." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 1 ; + sh:path matrix_schema:name ], + [ sh:datatype xsd:string ; + sh:description "Detailed description of the entity." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 3 ; + sh:path matrix_schema:description ], + [ sh:description "Biolink category of the entity." ; sh:in ( "biolink:NamedThing" "biolink:Attribute" "biolink:OrganismTaxon" "biolink:Event" "biolink:AdministrativeEntity" "biolink:InformationContentEntity" "biolink:PhysicalEntity" "biolink:Activity" "biolink:Procedure" "biolink:Phenomenon" "biolink:Device" "biolink:DiagnosticAid" "biolink:PlanetaryEntity" "biolink:BiologicalEntity" "biolink:ChemicalEntity" "biolink:ClinicalEntity" "biolink:Treatment" "biolink:ClinicalTrial" "biolink:ClinicalIntervention" "biolink:Hospitalization" "biolink:MolecularEntity" "biolink:ChemicalMixture" "biolink:EnvironmentalFoodContaminant" "biolink:FoodAdditive" "biolink:MolecularMixture" "biolink:ComplexMolecularMixture" "biolink:ProcessedMaterial" "biolink:Food" "biolink:Drug" "biolink:SmallMolecule" "biolink:NucleicAcidEntity" "biolink:RegulatoryRegion" "biolink:BiologicalProcessOrActivity" "biolink:GeneticInheritance" "biolink:OrganismalEntity" "biolink:DiseaseOrPhenotypicFeature" "biolink:Gene" "biolink:MacromolecularComplex" "biolink:NucleosomeModification" "biolink:Genome" "biolink:Exon" "biolink:Transcript" "biolink:CodingSequence" "biolink:Polypeptide" "biolink:ProteinDomain" "biolink:PosttranslationalModification" "biolink:ProteinFamily" "biolink:NucleicAcidSequenceMotif" "biolink:GeneFamily" "biolink:Genotype" "biolink:Haplotype" "biolink:SequenceVariant" "biolink:ReagentTargetedGene" "biolink:Snv" "biolink:Protein" "biolink:ProteinIsoform" "biolink:RNAProduct" "biolink:RNAProductIsoform" "biolink:NoncodingRNAProduct" "biolink:MicroRNA" "biolink:SiRNA" "biolink:Disease" "biolink:PhenotypicFeature" "biolink:BehavioralFeature" "biolink:ClinicalFinding" "biolink:Bacterium" "biolink:Virus" "biolink:CellularOrganism" "biolink:LifeStage" "biolink:IndividualOrganism" "biolink:PopulationOfIndividualOrganisms" "biolink:AnatomicalEntity" "biolink:CellLine" "biolink:CellularComponent" "biolink:Cell" "biolink:GrossAnatomicalStructure" "biolink:PathologicalAnatomicalStructure" "biolink:StudyPopulation" "biolink:Cohort" "biolink:Case" "biolink:Mammal" "biolink:Plant" "biolink:Invertebrate" "biolink:Vertebrate" "biolink:Fungus" "biolink:Human" "biolink:MolecularActivity" "biolink:BiologicalProcess" "biolink:Pathway" "biolink:PhysiologicalProcess" "biolink:Behavior" "biolink:PathologicalProcess" "biolink:AccessibleDnaRegion" "biolink:TranscriptionFactorBindingSite" "biolink:EnvironmentalProcess" "biolink:EnvironmentalFeature" "biolink:GeographicLocation" "biolink:GeographicLocationAtTime" "biolink:Study" "biolink:MaterialSample" "biolink:StudyResult" "biolink:StudyVariable" "biolink:CommonDataElement" "biolink:Dataset" "biolink:DatasetDistribution" "biolink:DatasetVersion" "biolink:DatasetSummary" "biolink:ConfidenceLevel" "biolink:EvidenceType" "biolink:Publication" "biolink:RetrievalSource" "biolink:Book" "biolink:BookChapter" "biolink:Serial" "biolink:Article" "biolink:Patent" "biolink:WebPage" "biolink:PreprintPublication" "biolink:DrugLabel" "biolink:JournalArticle" "biolink:ConceptCountAnalysisResult" "biolink:ObservedExpectedFrequencyAnalysisResult" "biolink:RelativeFrequencyAnalysisResult" "biolink:TextMiningResult" "biolink:ChiSquaredAnalysisResult" "biolink:LogOddsAnalysisResult" "biolink:Agent" "biolink:ChemicalRole" "biolink:BiologicalSex" "biolink:SeverityValue" "biolink:OrganismAttribute" "biolink:Zygosity" "biolink:ClinicalAttribute" "biolink:SocioeconomicAttribute" "biolink:GenomicBackgroundExposure" "biolink:PathologicalProcessExposure" "biolink:PathologicalAnatomicalExposure" "biolink:DiseaseOrPhenotypicFeatureExposure" "biolink:ChemicalExposure" "biolink:ComplexChemicalExposure" "biolink:BioticExposure" "biolink:EnvironmentalExposure" "biolink:BehavioralExposure" "biolink:SocioeconomicExposure" "biolink:GeographicExposure" "biolink:DrugExposure" "biolink:DrugToGeneInteractionExposure" "biolink:ClinicalMeasurement" "biolink:ClinicalModifier" "biolink:ClinicalCourse" "biolink:Onset" "biolink:PhenotypicQuality" "biolink:PhenotypicSex" "biolink:GenotypicSex" ) ; sh:maxCount 1 ; sh:minCount 1 ; sh:order 2 ; sh:path matrix_schema:category ], [ sh:datatype xsd:string ; - sh:description "List of equivalent identifiers for the entity." ; + sh:description "IRI of the entity." ; + sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 4 ; - sh:path matrix_schema:equivalent_identifiers ], - [ sh:description "All categories associated with the entity." ; - sh:in ( "biolink:NamedThing" "biolink:Attribute" "biolink:OrganismTaxon" "biolink:Event" "biolink:AdministrativeEntity" "biolink:InformationContentEntity" "biolink:PhysicalEntity" "biolink:Activity" "biolink:Procedure" "biolink:Phenomenon" "biolink:Device" "biolink:DiagnosticAid" "biolink:PlanetaryEntity" "biolink:BiologicalEntity" "biolink:ChemicalEntity" "biolink:ClinicalEntity" "biolink:Treatment" "biolink:ClinicalTrial" "biolink:ClinicalIntervention" "biolink:Hospitalization" "biolink:MolecularEntity" "biolink:ChemicalMixture" "biolink:EnvironmentalFoodContaminant" "biolink:FoodAdditive" "biolink:MolecularMixture" "biolink:ComplexMolecularMixture" "biolink:ProcessedMaterial" "biolink:Food" "biolink:Drug" "biolink:SmallMolecule" "biolink:NucleicAcidEntity" "biolink:RegulatoryRegion" "biolink:BiologicalProcessOrActivity" "biolink:GeneticInheritance" "biolink:OrganismalEntity" "biolink:DiseaseOrPhenotypicFeature" "biolink:Gene" "biolink:MacromolecularComplex" "biolink:NucleosomeModification" "biolink:Genome" "biolink:Exon" "biolink:Transcript" "biolink:CodingSequence" "biolink:Polypeptide" "biolink:ProteinDomain" "biolink:PosttranslationalModification" "biolink:ProteinFamily" "biolink:NucleicAcidSequenceMotif" "biolink:GeneFamily" "biolink:Genotype" "biolink:Haplotype" "biolink:SequenceVariant" "biolink:ReagentTargetedGene" "biolink:Snv" "biolink:Protein" "biolink:ProteinIsoform" "biolink:RNAProduct" "biolink:RNAProductIsoform" "biolink:NoncodingRNAProduct" "biolink:MicroRNA" "biolink:SiRNA" "biolink:Disease" "biolink:PhenotypicFeature" "biolink:BehavioralFeature" "biolink:ClinicalFinding" "biolink:Bacterium" "biolink:Virus" "biolink:CellularOrganism" "biolink:LifeStage" "biolink:IndividualOrganism" "biolink:PopulationOfIndividualOrganisms" "biolink:AnatomicalEntity" "biolink:CellLine" "biolink:CellularComponent" "biolink:Cell" "biolink:GrossAnatomicalStructure" "biolink:PathologicalAnatomicalStructure" "biolink:StudyPopulation" "biolink:Cohort" "biolink:Case" "biolink:Mammal" "biolink:Plant" "biolink:Invertebrate" "biolink:Vertebrate" "biolink:Fungus" "biolink:Human" "biolink:MolecularActivity" "biolink:BiologicalProcess" "biolink:Pathway" "biolink:PhysiologicalProcess" "biolink:Behavior" "biolink:PathologicalProcess" "biolink:AccessibleDnaRegion" "biolink:TranscriptionFactorBindingSite" "biolink:EnvironmentalProcess" "biolink:EnvironmentalFeature" "biolink:GeographicLocation" "biolink:GeographicLocationAtTime" "biolink:Study" "biolink:MaterialSample" "biolink:StudyResult" "biolink:StudyVariable" "biolink:CommonDataElement" "biolink:Dataset" "biolink:DatasetDistribution" "biolink:DatasetVersion" "biolink:DatasetSummary" "biolink:ConfidenceLevel" "biolink:EvidenceType" "biolink:Publication" "biolink:RetrievalSource" "biolink:Book" "biolink:BookChapter" "biolink:Serial" "biolink:Article" "biolink:Patent" "biolink:WebPage" "biolink:PreprintPublication" "biolink:DrugLabel" "biolink:JournalArticle" "biolink:ConceptCountAnalysisResult" "biolink:ObservedExpectedFrequencyAnalysisResult" "biolink:RelativeFrequencyAnalysisResult" "biolink:TextMiningResult" "biolink:ChiSquaredAnalysisResult" "biolink:LogOddsAnalysisResult" "biolink:Agent" "biolink:ChemicalRole" "biolink:BiologicalSex" "biolink:SeverityValue" "biolink:OrganismAttribute" "biolink:Zygosity" "biolink:ClinicalAttribute" "biolink:SocioeconomicAttribute" "biolink:GenomicBackgroundExposure" "biolink:PathologicalProcessExposure" "biolink:PathologicalAnatomicalExposure" "biolink:DiseaseOrPhenotypicFeatureExposure" "biolink:ChemicalExposure" "biolink:ComplexChemicalExposure" "biolink:BioticExposure" "biolink:EnvironmentalExposure" "biolink:BehavioralExposure" "biolink:SocioeconomicExposure" "biolink:GeographicExposure" "biolink:DrugExposure" "biolink:DrugToGeneInteractionExposure" "biolink:ClinicalMeasurement" "biolink:ClinicalModifier" "biolink:ClinicalCourse" "biolink:Onset" "biolink:PhenotypicQuality" "biolink:PhenotypicSex" "biolink:GenotypicSex" ) ; - sh:order 5 ; - sh:path matrix_schema:all_categories ], + sh:order 8 ; + sh:path matrix_schema:international_resource_identifier ], [ sh:datatype xsd:string ; sh:description "Publications associated with the entity." ; sh:nodeKind sh:Literal ; sh:order 6 ; sh:path matrix_schema:publications ], [ sh:datatype xsd:string ; - sh:description "Alternative labels for the entity." ; - sh:nodeKind sh:Literal ; - sh:order 7 ; - sh:path matrix_schema:labels ], - [ sh:datatype xsd:string ; - sh:description "Sources from which this entity's data originates." ; + sh:description "List of equivalent identifiers for the entity." ; sh:nodeKind sh:Literal ; - sh:order 9 ; - sh:path matrix_schema:upstream_data_source ], + sh:order 4 ; + sh:path matrix_schema:equivalent_identifiers ], + [ sh:description "All categories associated with the entity." ; + sh:in ( "biolink:NamedThing" "biolink:Attribute" "biolink:OrganismTaxon" "biolink:Event" "biolink:AdministrativeEntity" "biolink:InformationContentEntity" "biolink:PhysicalEntity" "biolink:Activity" "biolink:Procedure" "biolink:Phenomenon" "biolink:Device" "biolink:DiagnosticAid" "biolink:PlanetaryEntity" "biolink:BiologicalEntity" "biolink:ChemicalEntity" "biolink:ClinicalEntity" "biolink:Treatment" "biolink:ClinicalTrial" "biolink:ClinicalIntervention" "biolink:Hospitalization" "biolink:MolecularEntity" "biolink:ChemicalMixture" "biolink:EnvironmentalFoodContaminant" "biolink:FoodAdditive" "biolink:MolecularMixture" "biolink:ComplexMolecularMixture" "biolink:ProcessedMaterial" "biolink:Food" "biolink:Drug" "biolink:SmallMolecule" "biolink:NucleicAcidEntity" "biolink:RegulatoryRegion" "biolink:BiologicalProcessOrActivity" "biolink:GeneticInheritance" "biolink:OrganismalEntity" "biolink:DiseaseOrPhenotypicFeature" "biolink:Gene" "biolink:MacromolecularComplex" "biolink:NucleosomeModification" "biolink:Genome" "biolink:Exon" "biolink:Transcript" "biolink:CodingSequence" "biolink:Polypeptide" "biolink:ProteinDomain" "biolink:PosttranslationalModification" "biolink:ProteinFamily" "biolink:NucleicAcidSequenceMotif" "biolink:GeneFamily" "biolink:Genotype" "biolink:Haplotype" "biolink:SequenceVariant" "biolink:ReagentTargetedGene" "biolink:Snv" "biolink:Protein" "biolink:ProteinIsoform" "biolink:RNAProduct" "biolink:RNAProductIsoform" "biolink:NoncodingRNAProduct" "biolink:MicroRNA" "biolink:SiRNA" "biolink:Disease" "biolink:PhenotypicFeature" "biolink:BehavioralFeature" "biolink:ClinicalFinding" "biolink:Bacterium" "biolink:Virus" "biolink:CellularOrganism" "biolink:LifeStage" "biolink:IndividualOrganism" "biolink:PopulationOfIndividualOrganisms" "biolink:AnatomicalEntity" "biolink:CellLine" "biolink:CellularComponent" "biolink:Cell" "biolink:GrossAnatomicalStructure" "biolink:PathologicalAnatomicalStructure" "biolink:StudyPopulation" "biolink:Cohort" "biolink:Case" "biolink:Mammal" "biolink:Plant" "biolink:Invertebrate" "biolink:Vertebrate" "biolink:Fungus" "biolink:Human" "biolink:MolecularActivity" "biolink:BiologicalProcess" "biolink:Pathway" "biolink:PhysiologicalProcess" "biolink:Behavior" "biolink:PathologicalProcess" "biolink:AccessibleDnaRegion" "biolink:TranscriptionFactorBindingSite" "biolink:EnvironmentalProcess" "biolink:EnvironmentalFeature" "biolink:GeographicLocation" "biolink:GeographicLocationAtTime" "biolink:Study" "biolink:MaterialSample" "biolink:StudyResult" "biolink:StudyVariable" "biolink:CommonDataElement" "biolink:Dataset" "biolink:DatasetDistribution" "biolink:DatasetVersion" "biolink:DatasetSummary" "biolink:ConfidenceLevel" "biolink:EvidenceType" "biolink:Publication" "biolink:RetrievalSource" "biolink:Book" "biolink:BookChapter" "biolink:Serial" "biolink:Article" "biolink:Patent" "biolink:WebPage" "biolink:PreprintPublication" "biolink:DrugLabel" "biolink:JournalArticle" "biolink:ConceptCountAnalysisResult" "biolink:ObservedExpectedFrequencyAnalysisResult" "biolink:RelativeFrequencyAnalysisResult" "biolink:TextMiningResult" "biolink:ChiSquaredAnalysisResult" "biolink:LogOddsAnalysisResult" "biolink:Agent" "biolink:ChemicalRole" "biolink:BiologicalSex" "biolink:SeverityValue" "biolink:OrganismAttribute" "biolink:Zygosity" "biolink:ClinicalAttribute" "biolink:SocioeconomicAttribute" "biolink:GenomicBackgroundExposure" "biolink:PathologicalProcessExposure" "biolink:PathologicalAnatomicalExposure" "biolink:DiseaseOrPhenotypicFeatureExposure" "biolink:ChemicalExposure" "biolink:ComplexChemicalExposure" "biolink:BioticExposure" "biolink:EnvironmentalExposure" "biolink:BehavioralExposure" "biolink:SocioeconomicExposure" "biolink:GeographicExposure" "biolink:DrugExposure" "biolink:DrugToGeneInteractionExposure" "biolink:ClinicalMeasurement" "biolink:ClinicalModifier" "biolink:ClinicalCourse" "biolink:Onset" "biolink:PhenotypicQuality" "biolink:PhenotypicSex" "biolink:GenotypicSex" ) ; + sh:order 5 ; + sh:path matrix_schema:all_categories ], [ sh:datatype xsd:anyURI ; sh:description "A unique identifier for a thing" ; sh:maxCount 1 ; @@ -177,23 +190,10 @@ matrix_schema:UnionedNode a sh:NodeShape ; sh:order 0 ; sh:path schema1:identifier ], [ sh:datatype xsd:string ; - sh:description "Detailed description of the entity." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 3 ; - sh:path matrix_schema:description ], - [ sh:datatype xsd:string ; - sh:description "Human-readable name of the entity." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 1 ; - sh:path matrix_schema:name ], - [ sh:datatype xsd:string ; - sh:description "IRI of the entity." ; - sh:maxCount 1 ; + sh:description "Sources from which this entity's data originates." ; sh:nodeKind sh:Literal ; - sh:order 8 ; - sh:path matrix_schema:international_resource_identifier ] ; + sh:order 9 ; + sh:path matrix_schema:upstream_data_source ] ; sh:targetClass matrix_schema:UnionedNode . matrix_schema:DiseaseListEntry a sh:NodeShape ; @@ -202,21 +202,48 @@ matrix_schema:DiseaseListEntry a sh:NodeShape ; sh:ignoredProperties ( rdf:type ) ; sh:name "Disease List Entry" ; sh:property [ sh:datatype xsd:boolean ; - sh:description """Flag to denote this disease is a leaf node in the disease hierarchy. A leaf node is a node that has no children in the hierarchy. + sh:description """Flag to denote this disease corresponds to an acquired form of a disease. """ ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 15 ; - sh:path matrix_schema:is_leaf ], + sh:order 27 ; + sh:path matrix_schema:is_acquired ], [ sh:datatype xsd:boolean ; - sh:description """Flag to denote this disease was corresponds to an ICD chapter header. Chapter headers (or chapter titles), for example A00 (Cholera) can be identified by codes without dashes or periods and are usually the top-level categories within each chapter. Most of the time, these are not proper diseases, but groupings of diseases. + sh:description """Flag to denote if this disease is caused by a pathogen. Disease classes are automatically flagged using an LLM. Problems/issues should be reported on the Matrix disease list issue tracker (https://github.com/everycure-org/matrix-disease-list/issues). """ ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 21 ; - sh:path matrix_schema:is_icd_chapter_header ], + sh:order 39 ; + sh:path matrix_schema:is_pathogen_caused ], + [ sh:datatype xsd:string ; + sh:description "The name (label) of a disease representing the subtype series this disease belongs to." ; + sh:maxCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 45 ; + sh:path matrix_schema:subset_group_label ], + [ sh:datatype xsd:string ; + sh:description "The subsets of the disease in which it is part." ; + sh:minCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 4 ; + sh:path matrix_schema:subsets ], + [ sh:datatype xsd:string ; + sh:description """Tag to denote this disease to be part of a grouping according to the Harrison's textbook. Top-level classes in Mondo are manually curated by the Mondo team to "belong" to a Harrison's textbook chapter. Disagreements should be reported on the Mondo issue tracker (https://github.com/monarch-initiative/mondo/issues). +""" ; + sh:minCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 33 ; + sh:path matrix_schema:harrisons_view ], + [ sh:datatype xsd:boolean ; + sh:description """Flag to denote if this disease corresponds to a cancer type. Disease classes are automatically flagged using an LLM. Problems/issues should be reported on the Matrix disease list issue tracker (https://github.com/everycure-org/matrix-disease-list/issues). +""" ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 40 ; + sh:path matrix_schema:is_cancer ], [ sh:datatype xsd:boolean ; sh:description """Flag to denote that this disease is marked for obsoletion in the (near) future. This status does not guarantee that the disease will be obsoleted, but it is a strong indication. """ ; @@ -225,14 +252,20 @@ matrix_schema:DiseaseListEntry a sh:NodeShape ; sh:nodeKind sh:Literal ; sh:order 30 ; sh:path matrix_schema:is_obsoletion_candidate ], - [ sh:datatype xsd:boolean ; - sh:description """Flag to denote this disease was corresponds to an ICD category. Category codes (or subcategory codes), for example A01.1 (Paratyphoid fever A), can be recognised by containing a period (.) character and usually represent specific diagnosable diseases. -""" ; + [ sh:datatype xsd:string ; + sh:description "The disase identifier. Slot name should probably be renamed?" ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 19 ; - sh:path matrix_schema:is_icd_category ], + sh:order 0 ; + sh:path matrix_schema:category_class ], + [ sh:datatype xsd:string ; + sh:description """Tag this disease to be part of a grouping as defined by the txgnn paper. Disease classes in Mondo are automatically assigned to a txgnn category using an LLM. Problems/issues should be reported on the Matrix disease list issue tracker (https://github.com/everycure-org/matrix-disease-list/issues). +""" ; + sh:minCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 37 ; + sh:path matrix_schema:txgnn ], [ sh:datatype xsd:boolean ; sh:description """Flag to denote this disease was identified to be a subtype through lexical matching. This method is maintained by the Every Cure medical team and the Disease List team. """ ; @@ -242,49 +275,49 @@ matrix_schema:DiseaseListEntry a sh:NodeShape ; sh:order 23 ; sh:path matrix_schema:is_mondo_subtype ], [ sh:datatype xsd:string ; - sh:description "The name of the disease." ; - sh:maxCount 1 ; + sh:description "Cross-references to other databases and ontologies." ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 1 ; - sh:path matrix_schema:label ], - [ sh:datatype xsd:string ; - sh:description "The identifier of a disease representing the subtype series this disease belongs to." ; + sh:order 5 ; + sh:path matrix_schema:crossreferences ], + [ sh:datatype xsd:boolean ; + sh:description "Flag to denote that this disease term is used directly by https://clinicalgenome.org/ (a major authority on genetic diseases), which is a strong indication that it corresponds to a real disease entity." ; sh:maxCount 1 ; + sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 44 ; - sh:path matrix_schema:subset_group_id ], + sh:order 8 ; + sh:path matrix_schema:is_clingen ], [ sh:datatype xsd:boolean ; - sh:description """Flag to denote this disease corresponds to an acquired form of a disease. + sh:description """Flag to denote this disease is manually curated to be a disease according to OMIM (https://www.omim.org/), one of the most important genetic disease authorities in the world. A disease according to OMIM usually corresponds to a proper disease entity or a subtype, not a disease grouping. """ ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 27 ; - sh:path matrix_schema:is_acquired ], - [ sh:datatype xsd:boolean ; - sh:description """Flag to denote if this disease has some existing treatment. Disease classes are automatically flagged using an LLM. Problems/issues should be reported on the Matrix disease list issue tracker (https://github.com/everycure-org/matrix-disease-list/issues). -""" ; + sh:order 18 ; + sh:path matrix_schema:is_omim ], + [ sh:datatype xsd:string ; + sh:description "The name of the disease." ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 42 ; - sh:path matrix_schema:tag_existing_treatment ], + sh:order 1 ; + sh:path matrix_schema:label ], [ sh:datatype xsd:boolean ; - sh:description "Flag to denote this disease is manually curated to be a grouping term." ; + sh:description """Flag to denote this disease is a child/descendant of a disease that is manually curated to be a disease subtype according to Orphanet (https://www.orpha.net/), one of the most important rare disease authorities in the world. If it is a descendant of a subtype, it most likely is a subtype itself. +""" ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 9 ; - sh:path matrix_schema:is_grouping_subset ], + sh:order 12 ; + sh:path matrix_schema:is_orphanet_subtype_descendant ], [ sh:datatype xsd:boolean ; - sh:description """Flag to denote this disease is a child/descendant of a disease that is manually curated to be a phenotypic series according to OMIM (https://www.omim.org/), one of the most important genetic disease authorities in the world. If it is a descendant of a phenotypic series, it most likely is a proper genetic disease entity (or subtype). + sh:description """Flag to denote this disease is a leaf node in the disease hierarchy. A leaf node is a node that has no children in the hierarchy. """ ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 14 ; - sh:path matrix_schema:is_omimps_descendant ], + sh:order 15 ; + sh:path matrix_schema:is_leaf ], [ sh:datatype xsd:string ; sh:description """Tag to denote this disease to be part of a grouping according to the anatomical location. Disease terms are automatically tagged using an LLM. Problems/issues should be reported on the Matrix disease list issue tracker (https://github.com/everycure-org/matrix-disease-list/issues). """ ; @@ -292,6 +325,14 @@ matrix_schema:DiseaseListEntry a sh:NodeShape ; sh:nodeKind sh:Literal ; sh:order 38 ; sh:path matrix_schema:anatomical ], + [ sh:datatype xsd:boolean ; + sh:description """Flag to denote this disease was corresponds to an ICD code that is billable. Billable codes are usually the most specific codes that can be used for billing purposes, and are most of the time diagnosable diseases. +""" ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:nodeKind sh:Literal ; + sh:order 22 ; + sh:path matrix_schema:is_icd_billable ], [ sh:datatype xsd:string ; sh:description "Any exact synonyms of the disease." ; sh:minCount 1 ; @@ -299,160 +340,149 @@ matrix_schema:DiseaseListEntry a sh:NodeShape ; sh:order 3 ; sh:path matrix_schema:synonyms ], [ sh:datatype xsd:boolean ; - sh:description """Flag to denote if this disease is caused by a pathogen. Disease classes are automatically flagged using an LLM. Problems/issues should be reported on the Matrix disease list issue tracker (https://github.com/everycure-org/matrix-disease-list/issues). + sh:description """Flag to denote this disease is manually curated to be a disease according to Orphanet (https://www.orpha.net/), one of the most important rare disease authorities in the world. A disorder according to Orphanet usually corresponds to a proper disease entity, not a grouping or a subtype. """ ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 39 ; - sh:path matrix_schema:is_pathogen_caused ], + sh:order 17 ; + sh:path matrix_schema:is_orphanet_disorder ], [ sh:datatype xsd:string ; - sh:description """Tag this disease with a medical specialisation. Disease classes are automatically tagged by an LLM. Problems/issues should be reported on the Matrix disease list issue tracker (https://github.com/everycure-org/matrix-disease-list/issues). + sh:description """Tag to denote this disease to be part of a grouping as defined by the txgnn paper. Disease classes in Mondo are manually curated by the Mondo team to "belong" to a txgnn category. Disagreements should be reported on the Mondo issue tracker (https://github.com/monarch-initiative/mondo/issues). """ ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 36 ; - sh:path matrix_schema:medical_specialization ], + sh:order 34 ; + sh:path matrix_schema:mondo_txgnn ], [ sh:datatype xsd:string ; - sh:description """Tag to denote this disease to be part of a grouping according to the Harrison's textbook. Top-level classes in Mondo are manually curated by the Mondo team to "belong" to a Harrison's textbook chapter. Disagreements should be reported on the Mondo issue tracker (https://github.com/monarch-initiative/mondo/issues). + sh:description """Tag to denote this disease to be a . Disease classes in Mondo are manually curated by the Mondo team to "belong" to a txgnn category. Disagreements should be reported on the Mondo issue tracker (https://github.com/monarch-initiative/mondo/issues). """ ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 33 ; - sh:path matrix_schema:harrisons_view ], - [ sh:datatype xsd:string ; - sh:description "The definition of the disease." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 2 ; - sh:path matrix_schema:definition ], + sh:order 35 ; + sh:path matrix_schema:mondo_top_grouping ], [ sh:datatype xsd:boolean ; - sh:description """Flag to denote this disease corresponds to a disease that can be present with or without some other pathological condition. + sh:description """Flag to denote this disease was corresponds to an ICD chapter header. Chapter headers (or chapter titles), for example A00 (Cholera) can be identified by codes without dashes or periods and are usually the top-level categories within each chapter. Most of the time, these are not proper diseases, but groupings of diseases. """ ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 29 ; - sh:path matrix_schema:is_withorwithout ], - [ sh:datatype xsd:string ; - sh:description "The disase identifier. Slot name should probably be renamed?" ; + sh:order 21 ; + sh:path matrix_schema:is_icd_chapter_header ], + [ sh:datatype xsd:boolean ; + sh:description """Flag to denote this disease was corresponds to an ICD chapter code. Chapter codes (or block codes), for example A00-B99 (Certain infectious and parasitic diseases). These codes can be recognised by containing a dash (-) character, and usually represent broad categories of diseases. +""" ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 0 ; - sh:path matrix_schema:category_class ], + sh:order 20 ; + sh:path matrix_schema:is_icd_chapter_code ], [ sh:datatype xsd:boolean ; - sh:description """Flag to denote this disease was corresponds to an ICD code that is billable. Billable codes are usually the most specific codes that can be used for billing purposes, and are most of the time diagnosable diseases. + sh:description """Flag to denote if this disease has some existing treatment. Disease classes are automatically flagged using an LLM. Problems/issues should be reported on the Matrix disease list issue tracker (https://github.com/everycure-org/matrix-disease-list/issues). """ ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 22 ; - sh:path matrix_schema:is_icd_billable ], - [ sh:datatype xsd:string ; - sh:description "The subsets of the disease in which it is part." ; - sh:minCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 4 ; - sh:path matrix_schema:subsets ], + sh:order 42 ; + sh:path matrix_schema:tag_existing_treatment ], [ sh:datatype xsd:boolean ; - sh:description "Flag to denote that this disease term is used directly by https://clinicalgenome.org/ (a major authority on genetic diseases), which is a strong indication that it corresponds to a real disease entity." ; + sh:description """Flag to denote if this disease corresponds to a glucose dysfunction. Disease classes are automatically flagged using an LLM. tracker (https://github.com/everycure-org/matrix-disease-list/issues). +""" ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 8 ; - sh:path matrix_schema:is_clingen ], + sh:order 41 ; + sh:path matrix_schema:is_glucose_dysfunction ], [ sh:datatype xsd:string ; - sh:description "Cross-references to other databases and ontologies." ; + sh:description """Tag denoting the degree to which Quality-Adjusted Life Year (QALY) lost. Disease terms are automatically tagged using an LLM. Problems/issues should be reported on the Matrix disease list issue tracker (https://github.com/everycure-org/matrix-disease-list/issues). +""" ; + sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 5 ; - sh:path matrix_schema:crossreferences ], + sh:order 43 ; + sh:path matrix_schema:tag_qaly_lost ; + sh:pattern "^(low|medium|high|very_high|none)$" ], [ sh:datatype xsd:boolean ; - sh:description """Flag to denote if this disease corresponds to a glucose dysfunction. Disease classes are automatically flagged using an LLM. tracker (https://github.com/everycure-org/matrix-disease-list/issues). -""" ; + sh:description "Flag to denote this disease is manually curated to be a disease subtype according to Orphanet (https://www.orpha.net/), one of the most important rare disease authorities in the world." ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 41 ; - sh:path matrix_schema:is_glucose_dysfunction ], + sh:order 11 ; + sh:path matrix_schema:is_orphanet_subtype ], [ sh:datatype xsd:boolean ; - sh:description """Flag to denote this disease is manually curated to be a disease according to Orphanet (https://www.orpha.net/), one of the most important rare disease authorities in the world. A disorder according to Orphanet usually corresponds to a proper disease entity, not a grouping or a subtype. -""" ; + sh:description "Flag to denote this disease is a parent of a disease that was manually curated to be a grouping term." ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 17 ; - sh:path matrix_schema:is_orphanet_disorder ], - [ sh:datatype xsd:string ; - sh:description """Tag to denote this disease to be part of a grouping as defined by the txgnn paper. Disease classes in Mondo are manually curated by the Mondo team to "belong" to a txgnn category. Disagreements should be reported on the Mondo issue tracker (https://github.com/monarch-initiative/mondo/issues). + sh:order 10 ; + sh:path matrix_schema:is_grouping_subset_ancestor ], + [ sh:datatype xsd:boolean ; + sh:description """Flag to denote this disease corresponds to a disease that can be treated with small molecules or biologics. This flag is maintained as a combination of default filters by the Matrix team. Changes to this filter should be discussed on the Matrix disease list issue tracker (https://github.com/everycure-org/matrix-disease-list/issues). **Warning**. This flag is in early alpha state, and its use in production systems is not recommended. """ ; + sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 34 ; - sh:path matrix_schema:mondo_txgnn ], + sh:order 32 ; + sh:path matrix_schema:official_matrix_filter ], [ sh:datatype xsd:boolean ; - sh:description """Flag to denote this disease is a child/descendant of a disease that is manually curated to be a disease subtype according to Orphanet (https://www.orpha.net/), one of the most important rare disease authorities in the world. If it is a descendant of a subtype, it most likely is a subtype itself. + sh:description """Flag to denote that this disease has no descendants (is a leaf) and is classified broadly as an hereditary disease, but lacks any further classification. """ ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 12 ; - sh:path matrix_schema:is_orphanet_subtype_descendant ], + sh:order 31 ; + sh:path matrix_schema:is_unclassified_hereditary ], [ sh:datatype xsd:boolean ; - sh:description """Flag to denote this disease corresponds to a disease that can be treated with small molecules or biologics. This flag is maintained as a combination of default filters by the Matrix team. Changes to this filter should be discussed on the Matrix disease list issue tracker (https://github.com/everycure-org/matrix-disease-list/issues). **Warning**. This flag is in early alpha state, and its use in production systems is not recommended. + sh:description """Flag to denote this disease corresponds to a paraphilic disorder rather than a proper disease. """ ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 32 ; - sh:path matrix_schema:official_matrix_filter ], + sh:order 26 ; + sh:path matrix_schema:is_paraphilic ], [ sh:datatype xsd:boolean ; - sh:description """Flag to denote if this disease corresponds to a cancer type. Disease classes are automatically flagged using an LLM. Problems/issues should be reported on the Matrix disease list issue tracker (https://github.com/everycure-org/matrix-disease-list/issues). -""" ; + sh:description "Flag to denote this disease was manually included from the disease list by a Matrix medical expert." ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 40 ; - sh:path matrix_schema:is_cancer ], + sh:order 7 ; + sh:path matrix_schema:is_matrix_manually_included ], [ sh:datatype xsd:boolean ; - sh:description """Flag to denote this disease corresponds to a disease that is a combination of two or more diseases. -""" ; + sh:description "Flag to denote this disease is manually curated to be a grouping term." ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 28 ; - sh:path matrix_schema:is_andor ], - [ sh:datatype xsd:boolean ; - sh:description """Flag to denote that this disease has no descendants (is a leaf) and is classified broadly as an hereditary disease, but lacks any further classification. + sh:order 9 ; + sh:path matrix_schema:is_grouping_subset ], + [ sh:datatype xsd:string ; + sh:description """Tag this disease with a medical specialisation. Disease classes are automatically tagged by an LLM. Problems/issues should be reported on the Matrix disease list issue tracker (https://github.com/everycure-org/matrix-disease-list/issues). """ ; - sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 31 ; - sh:path matrix_schema:is_unclassified_hereditary ], + sh:order 36 ; + sh:path matrix_schema:medical_specialization ], [ sh:datatype xsd:string ; - sh:description "The name (label) of a disease representing the subtype series this disease belongs to." ; + sh:description "The definition of the disease." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 45 ; - sh:path matrix_schema:subset_group_label ], + sh:order 2 ; + sh:path matrix_schema:definition ], [ sh:datatype xsd:boolean ; - sh:description """Flag to denote this disease was corresponds to an ICD chapter code. Chapter codes (or block codes), for example A00-B99 (Certain infectious and parasitic diseases). These codes can be recognised by containing a dash (-) character, and usually represent broad categories of diseases. + sh:description """Flag to denote this disease corresponds to a disease that is a combination of two or more diseases. """ ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 20 ; - sh:path matrix_schema:is_icd_chapter_code ], + sh:order 28 ; + sh:path matrix_schema:is_andor ], [ sh:datatype xsd:boolean ; - sh:description """Flag to denote this disease corresponds to a paraphilic disorder rather than a proper disease. + sh:description """Flag to denote this disease corresponds to a pathway defect rather than a proper disease. """ ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 26 ; - sh:path matrix_schema:is_paraphilic ], + sh:order 24 ; + sh:path matrix_schema:is_pathway_defect ], [ sh:datatype xsd:integer ; sh:description "The number of other subtypes in the subset this disease belongs to." ; sh:maxCount 1 ; @@ -460,58 +490,53 @@ matrix_schema:DiseaseListEntry a sh:NodeShape ; sh:order 46 ; sh:path matrix_schema:other_subsets_count ], [ sh:datatype xsd:boolean ; - sh:description """Flag to denote this disease is a direct parent of a leaf node in the disease hierarchy. A direct parent of a leaf rarely corresponds to a grouping, and often is a proper disease entity. + sh:description """Flag to denote this disease corresponds to a disease that can be present with or without some other pathological condition. """ ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 16 ; - sh:path matrix_schema:is_leaf_direct_parent ], + sh:order 29 ; + sh:path matrix_schema:is_withorwithout ], [ sh:datatype xsd:boolean ; - sh:description """Flag to denote this disease is manually curated to be a phenotypic series according to OMIM (https://www.omim.org/), one of the most important genetic disease authorities in the world. A Phenotypic Series is a grouping of genetic heterogeneity of similar phenotypes across the genome. + sh:description """Flag to denote this disease is a direct parent of a leaf node in the disease hierarchy. A direct parent of a leaf rarely corresponds to a grouping, and often is a proper disease entity. """ ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 13 ; - sh:path matrix_schema:is_omimps ], + sh:order 16 ; + sh:path matrix_schema:is_leaf_direct_parent ], [ sh:datatype xsd:boolean ; - sh:description """Flag to denote this disease is manually curated to be a disease according to OMIM (https://www.omim.org/), one of the most important genetic disease authorities in the world. A disease according to OMIM usually corresponds to a proper disease entity or a subtype, not a disease grouping. + sh:description """Flag to denote this disease corresponds to a susceptibility rather than a proper disease. """ ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 18 ; - sh:path matrix_schema:is_omim ], + sh:order 25 ; + sh:path matrix_schema:is_susceptibility ], [ sh:datatype xsd:boolean ; - sh:description """Flag to denote this disease corresponds to a pathway defect rather than a proper disease. + sh:description """Flag to denote this disease is a child/descendant of a disease that is manually curated to be a phenotypic series according to OMIM (https://www.omim.org/), one of the most important genetic disease authorities in the world. If it is a descendant of a phenotypic series, it most likely is a proper genetic disease entity (or subtype). """ ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 24 ; - sh:path matrix_schema:is_pathway_defect ], + sh:order 14 ; + sh:path matrix_schema:is_omimps_descendant ], [ sh:datatype xsd:boolean ; - sh:description "Flag to denote this disease was manually included from the disease list by a Matrix medical expert." ; + sh:description """Flag to denote this disease is manually curated to be a phenotypic series according to OMIM (https://www.omim.org/), one of the most important genetic disease authorities in the world. A Phenotypic Series is a grouping of genetic heterogeneity of similar phenotypes across the genome. +""" ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 7 ; - sh:path matrix_schema:is_matrix_manually_included ], + sh:order 13 ; + sh:path matrix_schema:is_omimps ], [ sh:datatype xsd:boolean ; - sh:description "Flag to denote this disease is manually curated to be a disease subtype according to Orphanet (https://www.orpha.net/), one of the most important rare disease authorities in the world." ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 11 ; - sh:path matrix_schema:is_orphanet_subtype ], - [ sh:datatype xsd:string ; - sh:description """Tag to denote this disease to be a . Disease classes in Mondo are manually curated by the Mondo team to "belong" to a txgnn category. Disagreements should be reported on the Mondo issue tracker (https://github.com/monarch-initiative/mondo/issues). + sh:description """Flag to denote this disease was corresponds to an ICD category. Category codes (or subcategory codes), for example A01.1 (Paratyphoid fever A), can be recognised by containing a period (.) character and usually represent specific diagnosable diseases. """ ; + sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 35 ; - sh:path matrix_schema:mondo_top_grouping ], + sh:order 19 ; + sh:path matrix_schema:is_icd_category ], [ sh:datatype xsd:boolean ; sh:description "Flag to denote this disease was manually excluded from the disease list by a Matrix medical expert." ; sh:maxCount 1 ; @@ -519,60 +544,33 @@ matrix_schema:DiseaseListEntry a sh:NodeShape ; sh:nodeKind sh:Literal ; sh:order 6 ; sh:path matrix_schema:is_matrix_manually_excluded ], - [ sh:datatype xsd:boolean ; - sh:description """Flag to denote this disease corresponds to a susceptibility rather than a proper disease. -""" ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 25 ; - sh:path matrix_schema:is_susceptibility ], - [ sh:datatype xsd:boolean ; - sh:description "Flag to denote this disease is a parent of a disease that was manually curated to be a grouping term." ; - sh:maxCount 1 ; - sh:minCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 10 ; - sh:path matrix_schema:is_grouping_subset_ancestor ], [ sh:datatype xsd:string ; - sh:description """Tag denoting the degree to which Quality-Adjusted Life Year (QALY) lost. Disease terms are automatically tagged using an LLM. Problems/issues should be reported on the Matrix disease list issue tracker (https://github.com/everycure-org/matrix-disease-list/issues). -""" ; + sh:description "The identifier of a disease representing the subtype series this disease belongs to." ; sh:maxCount 1 ; - sh:minCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 43 ; - sh:path matrix_schema:tag_qaly_lost ; - sh:pattern "^(low|medium|high|very_high|none)$" ], - [ sh:datatype xsd:string ; - sh:description """Tag this disease to be part of a grouping as defined by the txgnn paper. Disease classes in Mondo are automatically assigned to a txgnn category using an LLM. Problems/issues should be reported on the Matrix disease list issue tracker (https://github.com/everycure-org/matrix-disease-list/issues). -""" ; - sh:minCount 1 ; sh:nodeKind sh:Literal ; - sh:order 37 ; - sh:path matrix_schema:txgnn ] ; + sh:order 44 ; + sh:path matrix_schema:subset_group_id ] ; sh:targetClass matrix_schema:DiseaseListEntry . matrix_schema:MatrixEdge a sh:NodeShape ; sh:closed true ; sh:description "An edge representing a relationship between two nodes in the Biolink knowledge graph." ; - sh:ignoredProperties ( rdf:type matrix_schema:primary_knowledge_sources ) ; - sh:property [ sh:description "Knowledge level of the relationship" ; - sh:in ( "knowledge_assertion" "logical_entailment" "prediction" "statistical_association" "observation" "not_provided" ) ; - sh:maxCount 1 ; - sh:order 3 ; - sh:path matrix_schema:knowledge_level ], - [ sh:datatype xsd:integer ; - sh:description "Number of references supporting this edge." ; - sh:maxCount 1 ; + sh:ignoredProperties ( matrix_schema:primary_knowledge_sources rdf:type ) ; + sh:property [ sh:datatype xsd:string ; + sh:description "Sources from which this entity's data originates." ; sh:nodeKind sh:Literal ; - sh:order 13 ; - sh:path matrix_schema:num_references ], - [ sh:description "The predicate defining the relationship." ; - sh:in ( "biolink:related_to" "biolink:related_to_at_concept_level" "biolink:related_to_at_instance_level" "biolink:disease_has_location" "biolink:location_of_disease" "biolink:composed_primarily_of" "biolink:primarily_composed_of" "biolink:associated_with" "biolink:opposite_of" "biolink:affects_likelihood_of" "biolink:likelihood_affected_by" "biolink:target_for" "biolink:has_target" "biolink:active_in" "biolink:has_active_component" "biolink:acts_upstream_of" "biolink:has_upstream_actor" "biolink:mentions" "biolink:mentioned_by" "biolink:contributor" "biolink:has_contributor" "biolink:assesses" "biolink:is_assessed_by" "biolink:interacts_with" "biolink:affects" "biolink:affected_by" "biolink:diagnoses" "biolink:is_diagnosed_by" "biolink:increases_amount_or_activity_of" "biolink:amount_or_activity_increased_by" "biolink:decreases_amount_or_activity_of" "biolink:amount_or_activity_decreased_by" "biolink:gene_product_of" "biolink:has_gene_product" "biolink:transcribed_to" "biolink:transcribed_from" "biolink:translates_to" "biolink:translation_of" "biolink:coexists_with" "biolink:contributes_to" "biolink:contribution_from" "biolink:studied_to_treat" "biolink:applied_to_treat" "biolink:treatment_applications_from" "biolink:treats_or_applied_or_studied_to_treat" "biolink:subject_of_treatment_application_or_study_for_treatment_by" "biolink:has_phenotype" "biolink:phenotype_of" "biolink:occurs_in" "biolink:contains_process" "biolink:located_in" "biolink:location_of" "biolink:similar_to" "biolink:has_sequence_location" "biolink:sequence_location_of" "biolink:model_of" "biolink:models" "biolink:overlaps" "biolink:has_participant" "biolink:participates_in" "biolink:derives_into" "biolink:derives_from" "biolink:manifestation_of" "biolink:has_manifestation" "biolink:produces" "biolink:produced_by" "biolink:temporally_related_to" "biolink:related_condition" "biolink:is_sequence_variant_of" "biolink:has_sequence_variant" "biolink:disease_has_basis_in" "biolink:occurs_in_disease" "biolink:contraindicated_in" "biolink:has_contraindication" "biolink:has_not_completed" "biolink:not_completed_by" "biolink:has_completed" "biolink:completed_by" "biolink:in_linkage_disequilibrium_with" "biolink:has_increased_amount" "biolink:increased_amount_of" "biolink:has_decreased_amount" "biolink:decreased_amount_in" "biolink:lacks_part" "biolink:missing_from" "biolink:develops_from" "biolink:develops_into" "biolink:in_taxon" "biolink:taxon_of" "biolink:has_molecular_consequence" "biolink:is_molecular_consequence_of" "biolink:has_missense_variant" "biolink:has_synonymous_variant" "biolink:has_nonsense_variant" "biolink:has_frameshift_variant" "biolink:has_splice_site_variant" "biolink:has_nearby_variant" "biolink:has_non_coding_variant" "biolink:is_missense_variant_of" "biolink:is_synonymous_variant_of" "biolink:is_nonsense_variant_of" "biolink:is_frameshift_variant_of" "biolink:is_splice_site_variant_of" "biolink:is_nearby_variant_of" "biolink:is_non_coding_variant_of" "biolink:precedes" "biolink:preceded_by" "biolink:has_mode_of_inheritance" "biolink:mode_of_inheritance_of" "biolink:is_metabolite_of" "biolink:has_metabolite" "biolink:is_input_of" "biolink:is_output_of" "biolink:catalyzes" "biolink:is_substrate_of" "biolink:actively_involved_in" "biolink:enables" "biolink:capable_of" "biolink:consumed_by" "biolink:has_input" "biolink:has_output" "biolink:has_catalyst" "biolink:has_substrate" "biolink:actively_involves" "biolink:enabled_by" "biolink:can_be_carried_out_by" "biolink:consumes" "biolink:has_part" "biolink:part_of" "biolink:plasma_membrane_part_of" "biolink:food_component_of" "biolink:is_active_ingredient_of" "biolink:is_excipient_of" "biolink:variant_part_of" "biolink:nutrient_of" "biolink:has_plasma_membrane_part" "biolink:has_food_component" "biolink:has_active_ingredient" "biolink:has_excipient" "biolink:has_variant_part" "biolink:has_nutrient" "biolink:homologous_to" "biolink:chemically_similar_to" "biolink:paralogous_to" "biolink:orthologous_to" "biolink:xenologous_to" "biolink:expresses" "biolink:expressed_in" "biolink:treated_by" "biolink:tested_by_clinical_trials_of" "biolink:treated_in_studies_by" "biolink:tested_by_preclinical_trials_of" "biolink:models_demonstrating_benefits_for" "biolink:treats" "biolink:in_clinical_trials_for" "biolink:in_preclinical_trials_for" "biolink:beneficial_in_models_for" "biolink:ameliorates_condition" "biolink:preventative_for_condition" "biolink:caused_by" "biolink:causes" "biolink:in_pathway_with" "biolink:in_complex_with" "biolink:in_cell_population_with" "biolink:colocalizes_with" "biolink:response_affected_by" "biolink:regulated_by" "biolink:disrupted_by" "biolink:condition_ameliorated_by" "biolink:condition_prevented_by" "biolink:condition_exacerbated_by" "biolink:adverse_event_of" "biolink:is_side_effect_of" "biolink:response_increased_by" "biolink:response_decreased_by" "biolink:affects_response_to" "biolink:regulates" "biolink:disrupts" "biolink:exacerbates_condition" "biolink:has_adverse_event" "biolink:has_side_effect" "biolink:increases_response_to" "biolink:decreases_response_to" "biolink:physically_interacts_with" "biolink:genetically_interacts_with" "biolink:gene_fusion_with" "biolink:genetic_neighborhood_of" "biolink:directly_physically_interacts_with" "biolink:indirectly_physically_interacts_with" "biolink:binds" "biolink:has_provider" "biolink:has_publisher" "biolink:has_editor" "biolink:has_author" "biolink:provider" "biolink:publisher" "biolink:editor" "biolink:author" "biolink:has_positive_upstream_actor" "biolink:has_negative_upstream_actor" "biolink:has_upstream_or_within_actor" "biolink:has_positive_upstream_or_within_actor" "biolink:has_negative_upstream_or_within_actor" "biolink:acts_upstream_of_positive_effect" "biolink:acts_upstream_of_negative_effect" "biolink:acts_upstream_of_or_within" "biolink:acts_upstream_of_or_within_positive_effect" "biolink:acts_upstream_of_or_within_negative_effect" "biolink:condition_promoted_by" "biolink:condition_predisposed_by" "biolink:promotes_condition" "biolink:predisposes_to_condition" "biolink:associated_with_likelihood_of" "biolink:likelihood_associated_with" "biolink:associated_with_sensitivity_to" "biolink:sensitivity_associated_with" "biolink:associated_with_resistance_to" "biolink:resistance_associated_with" "biolink:genetic_association" "biolink:genetically_associated_with" "biolink:correlated_with" "biolink:positively_correlated_with" "biolink:negatively_correlated_with" "biolink:occurs_together_in_literature_with" "biolink:coexpressed_with" "biolink:has_biomarker" "biolink:biomarker_for" "biolink:gene_associated_with_condition" "biolink:condition_associated_with_gene" "biolink:increased_likelihood_associated_with" "biolink:decreased_likelihood_associated_with" "biolink:associated_with_increased_likelihood_of" "biolink:associated_with_decreased_likelihood_of" "biolink:has_chemical_role" "biolink:superclass_of" "biolink:subclass_of" "biolink:close_match" "biolink:broad_match" "biolink:narrow_match" "biolink:member_of" "biolink:has_member" "biolink:exact_match" "biolink:same_as" ) ; + sh:order 12 ; + sh:path matrix_schema:upstream_data_source ], + [ sh:datatype xsd:string ; + sh:description "Aggregators of the knowledge." ; + sh:nodeKind sh:Literal ; + sh:order 6 ; + sh:path matrix_schema:aggregator_knowledge_source ], + [ sh:description "Type of agent involved in the relationship." ; + sh:in ( "manual_agent" "automated_agent" "data_analysis_pipeline" "computational_model" "text_mining_agent" "image_processing_agent" "manual_validation_of_automated_agent" "not_provided" ) ; sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 1 ; - sh:path matrix_schema:predicate ], + sh:order 4 ; + sh:path matrix_schema:agent_type ], [ sh:datatype xsd:string ; sh:description "Direction qualifier for the object." ; sh:maxCount 1 ; @@ -580,21 +578,16 @@ matrix_schema:MatrixEdge a sh:NodeShape ; sh:order 11 ; sh:path matrix_schema:object_direction_qualifier ], [ sh:datatype xsd:string ; - sh:description "Aggregators of the knowledge." ; + sh:description "Publications associated with the entity." ; sh:nodeKind sh:Literal ; - sh:order 6 ; - sh:path matrix_schema:aggregator_knowledge_source ], + sh:order 7 ; + sh:path matrix_schema:publications ], [ sh:datatype xsd:string ; - sh:description "Primary source of the knowledge in the edge." ; + sh:description "Direction qualifier for the subject." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 5 ; - sh:path matrix_schema:primary_knowledge_source ], - [ sh:datatype xsd:string ; - sh:description "Sources from which this entity's data originates." ; - sh:nodeKind sh:Literal ; - sh:order 12 ; - sh:path matrix_schema:upstream_data_source ], + sh:order 9 ; + sh:path matrix_schema:subject_direction_qualifier ], [ sh:datatype xsd:string ; sh:description "The subject entity in the edge." ; sh:maxCount 1 ; @@ -602,17 +595,18 @@ matrix_schema:MatrixEdge a sh:NodeShape ; sh:nodeKind sh:Literal ; sh:order 0 ; sh:path matrix_schema:subject ], - [ sh:description "Type of agent involved in the relationship." ; - sh:in ( "manual_agent" "automated_agent" "data_analysis_pipeline" "computational_model" "text_mining_agent" "image_processing_agent" "manual_validation_of_automated_agent" "not_provided" ) ; + [ sh:datatype xsd:integer ; + sh:description "Number of references supporting this edge." ; sh:maxCount 1 ; - sh:order 4 ; - sh:path matrix_schema:agent_type ], + sh:nodeKind sh:Literal ; + sh:order 13 ; + sh:path matrix_schema:num_references ], [ sh:datatype xsd:string ; - sh:description "Direction qualifier for the subject." ; + sh:description "Primary source of the knowledge in the edge." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 9 ; - sh:path matrix_schema:subject_direction_qualifier ], + sh:order 5 ; + sh:path matrix_schema:primary_knowledge_source ], [ sh:datatype xsd:string ; sh:description "The object entity in the edge." ; sh:maxCount 1 ; @@ -620,6 +614,17 @@ matrix_schema:MatrixEdge a sh:NodeShape ; sh:nodeKind sh:Literal ; sh:order 2 ; sh:path matrix_schema:object ], + [ sh:description "Knowledge level of the relationship" ; + sh:in ( "knowledge_assertion" "logical_entailment" "prediction" "statistical_association" "observation" "not_provided" ) ; + sh:maxCount 1 ; + sh:order 3 ; + sh:path matrix_schema:knowledge_level ], + [ sh:description "The predicate defining the relationship." ; + sh:in ( "biolink:related_to" "biolink:related_to_at_concept_level" "biolink:related_to_at_instance_level" "biolink:disease_has_location" "biolink:location_of_disease" "biolink:composed_primarily_of" "biolink:primarily_composed_of" "biolink:associated_with" "biolink:opposite_of" "biolink:affects_likelihood_of" "biolink:likelihood_affected_by" "biolink:target_for" "biolink:has_target" "biolink:active_in" "biolink:has_active_component" "biolink:acts_upstream_of" "biolink:has_upstream_actor" "biolink:mentions" "biolink:mentioned_by" "biolink:contributor" "biolink:has_contributor" "biolink:assesses" "biolink:is_assessed_by" "biolink:interacts_with" "biolink:affects" "biolink:affected_by" "biolink:diagnoses" "biolink:is_diagnosed_by" "biolink:increases_amount_or_activity_of" "biolink:amount_or_activity_increased_by" "biolink:decreases_amount_or_activity_of" "biolink:amount_or_activity_decreased_by" "biolink:gene_product_of" "biolink:has_gene_product" "biolink:transcribed_to" "biolink:transcribed_from" "biolink:translates_to" "biolink:translation_of" "biolink:coexists_with" "biolink:contributes_to" "biolink:contribution_from" "biolink:studied_to_treat" "biolink:applied_to_treat" "biolink:treatment_applications_from" "biolink:treats_or_applied_or_studied_to_treat" "biolink:subject_of_treatment_application_or_study_for_treatment_by" "biolink:has_phenotype" "biolink:phenotype_of" "biolink:occurs_in" "biolink:contains_process" "biolink:located_in" "biolink:location_of" "biolink:similar_to" "biolink:has_sequence_location" "biolink:sequence_location_of" "biolink:model_of" "biolink:models" "biolink:overlaps" "biolink:has_participant" "biolink:participates_in" "biolink:derives_into" "biolink:derives_from" "biolink:manifestation_of" "biolink:has_manifestation" "biolink:produces" "biolink:produced_by" "biolink:temporally_related_to" "biolink:related_condition" "biolink:is_sequence_variant_of" "biolink:has_sequence_variant" "biolink:disease_has_basis_in" "biolink:occurs_in_disease" "biolink:contraindicated_in" "biolink:has_contraindication" "biolink:has_not_completed" "biolink:not_completed_by" "biolink:has_completed" "biolink:completed_by" "biolink:in_linkage_disequilibrium_with" "biolink:has_increased_amount" "biolink:increased_amount_of" "biolink:has_decreased_amount" "biolink:decreased_amount_in" "biolink:lacks_part" "biolink:missing_from" "biolink:develops_from" "biolink:develops_into" "biolink:in_taxon" "biolink:taxon_of" "biolink:has_molecular_consequence" "biolink:is_molecular_consequence_of" "biolink:has_missense_variant" "biolink:has_synonymous_variant" "biolink:has_nonsense_variant" "biolink:has_frameshift_variant" "biolink:has_splice_site_variant" "biolink:has_nearby_variant" "biolink:has_non_coding_variant" "biolink:is_missense_variant_of" "biolink:is_synonymous_variant_of" "biolink:is_nonsense_variant_of" "biolink:is_frameshift_variant_of" "biolink:is_splice_site_variant_of" "biolink:is_nearby_variant_of" "biolink:is_non_coding_variant_of" "biolink:precedes" "biolink:preceded_by" "biolink:has_mode_of_inheritance" "biolink:mode_of_inheritance_of" "biolink:is_metabolite_of" "biolink:has_metabolite" "biolink:is_input_of" "biolink:is_output_of" "biolink:catalyzes" "biolink:is_substrate_of" "biolink:actively_involved_in" "biolink:enables" "biolink:capable_of" "biolink:consumed_by" "biolink:has_input" "biolink:has_output" "biolink:has_catalyst" "biolink:has_substrate" "biolink:actively_involves" "biolink:enabled_by" "biolink:can_be_carried_out_by" "biolink:consumes" "biolink:has_part" "biolink:part_of" "biolink:plasma_membrane_part_of" "biolink:food_component_of" "biolink:is_active_ingredient_of" "biolink:is_excipient_of" "biolink:variant_part_of" "biolink:nutrient_of" "biolink:has_plasma_membrane_part" "biolink:has_food_component" "biolink:has_active_ingredient" "biolink:has_excipient" "biolink:has_variant_part" "biolink:has_nutrient" "biolink:homologous_to" "biolink:chemically_similar_to" "biolink:paralogous_to" "biolink:orthologous_to" "biolink:xenologous_to" "biolink:expresses" "biolink:expressed_in" "biolink:treated_by" "biolink:tested_by_clinical_trials_of" "biolink:treated_in_studies_by" "biolink:tested_by_preclinical_trials_of" "biolink:models_demonstrating_benefits_for" "biolink:treats" "biolink:in_clinical_trials_for" "biolink:in_preclinical_trials_for" "biolink:beneficial_in_models_for" "biolink:ameliorates_condition" "biolink:preventative_for_condition" "biolink:caused_by" "biolink:causes" "biolink:in_pathway_with" "biolink:in_complex_with" "biolink:in_cell_population_with" "biolink:colocalizes_with" "biolink:response_affected_by" "biolink:regulated_by" "biolink:disrupted_by" "biolink:condition_ameliorated_by" "biolink:condition_prevented_by" "biolink:condition_exacerbated_by" "biolink:adverse_event_of" "biolink:is_side_effect_of" "biolink:response_increased_by" "biolink:response_decreased_by" "biolink:affects_response_to" "biolink:regulates" "biolink:disrupts" "biolink:exacerbates_condition" "biolink:has_adverse_event" "biolink:has_side_effect" "biolink:increases_response_to" "biolink:decreases_response_to" "biolink:physically_interacts_with" "biolink:genetically_interacts_with" "biolink:gene_fusion_with" "biolink:genetic_neighborhood_of" "biolink:directly_physically_interacts_with" "biolink:indirectly_physically_interacts_with" "biolink:binds" "biolink:has_provider" "biolink:has_publisher" "biolink:has_editor" "biolink:has_author" "biolink:provider" "biolink:publisher" "biolink:editor" "biolink:author" "biolink:has_positive_upstream_actor" "biolink:has_negative_upstream_actor" "biolink:has_upstream_or_within_actor" "biolink:has_positive_upstream_or_within_actor" "biolink:has_negative_upstream_or_within_actor" "biolink:acts_upstream_of_positive_effect" "biolink:acts_upstream_of_negative_effect" "biolink:acts_upstream_of_or_within" "biolink:acts_upstream_of_or_within_positive_effect" "biolink:acts_upstream_of_or_within_negative_effect" "biolink:condition_promoted_by" "biolink:condition_predisposed_by" "biolink:promotes_condition" "biolink:predisposes_to_condition" "biolink:associated_with_likelihood_of" "biolink:likelihood_associated_with" "biolink:associated_with_sensitivity_to" "biolink:sensitivity_associated_with" "biolink:associated_with_resistance_to" "biolink:resistance_associated_with" "biolink:genetic_association" "biolink:genetically_associated_with" "biolink:correlated_with" "biolink:positively_correlated_with" "biolink:negatively_correlated_with" "biolink:occurs_together_in_literature_with" "biolink:coexpressed_with" "biolink:has_biomarker" "biolink:biomarker_for" "biolink:gene_associated_with_condition" "biolink:condition_associated_with_gene" "biolink:increased_likelihood_associated_with" "biolink:decreased_likelihood_associated_with" "biolink:associated_with_increased_likelihood_of" "biolink:associated_with_decreased_likelihood_of" "biolink:has_chemical_role" "biolink:superclass_of" "biolink:subclass_of" "biolink:close_match" "biolink:broad_match" "biolink:narrow_match" "biolink:member_of" "biolink:has_member" "biolink:exact_match" "biolink:same_as" ) ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:order 1 ; + sh:path matrix_schema:predicate ], [ sh:datatype xsd:integer ; sh:description "Number of sentences supporting this edge." ; sh:maxCount 1 ; @@ -627,67 +632,66 @@ matrix_schema:MatrixEdge a sh:NodeShape ; sh:order 14 ; sh:path matrix_schema:num_sentences ], [ sh:datatype xsd:string ; - sh:description "Aspect qualifier for the object." ; + sh:description "Aspect qualifier for the subject." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 10 ; - sh:path matrix_schema:object_aspect_qualifier ], - [ sh:datatype xsd:string ; - sh:description "Publications associated with the entity." ; - sh:nodeKind sh:Literal ; - sh:order 7 ; - sh:path matrix_schema:publications ], + sh:order 8 ; + sh:path matrix_schema:subject_aspect_qualifier ], [ sh:datatype xsd:string ; - sh:description "Aspect qualifier for the subject." ; + sh:description "Aspect qualifier for the object." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 8 ; - sh:path matrix_schema:subject_aspect_qualifier ] ; + sh:order 10 ; + sh:path matrix_schema:object_aspect_qualifier ] ; sh:targetClass matrix_schema:MatrixEdge . matrix_schema:MatrixNode a sh:NodeShape ; sh:closed true ; sh:description "A node in the Biolink knowledge graph." ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:datatype xsd:string ; - sh:description "IRI of the entity." ; - sh:maxCount 1 ; - sh:nodeKind sh:Literal ; - sh:order 8 ; - sh:path matrix_schema:international_resource_identifier ], - [ sh:datatype xsd:anyURI ; + sh:property [ sh:datatype xsd:anyURI ; sh:description "A unique identifier for a thing" ; sh:maxCount 1 ; sh:minCount 1 ; sh:nodeKind sh:Literal ; sh:order 0 ; sh:path schema1:identifier ], + [ sh:datatype xsd:string ; + sh:description "List of equivalent identifiers for the entity." ; + sh:nodeKind sh:Literal ; + sh:order 4 ; + sh:path matrix_schema:equivalent_identifiers ], [ sh:description "All categories associated with the entity." ; sh:in ( "biolink:NamedThing" "biolink:Attribute" "biolink:OrganismTaxon" "biolink:Event" "biolink:AdministrativeEntity" "biolink:InformationContentEntity" "biolink:PhysicalEntity" "biolink:Activity" "biolink:Procedure" "biolink:Phenomenon" "biolink:Device" "biolink:DiagnosticAid" "biolink:PlanetaryEntity" "biolink:BiologicalEntity" "biolink:ChemicalEntity" "biolink:ClinicalEntity" "biolink:Treatment" "biolink:ClinicalTrial" "biolink:ClinicalIntervention" "biolink:Hospitalization" "biolink:MolecularEntity" "biolink:ChemicalMixture" "biolink:EnvironmentalFoodContaminant" "biolink:FoodAdditive" "biolink:MolecularMixture" "biolink:ComplexMolecularMixture" "biolink:ProcessedMaterial" "biolink:Food" "biolink:Drug" "biolink:SmallMolecule" "biolink:NucleicAcidEntity" "biolink:RegulatoryRegion" "biolink:BiologicalProcessOrActivity" "biolink:GeneticInheritance" "biolink:OrganismalEntity" "biolink:DiseaseOrPhenotypicFeature" "biolink:Gene" "biolink:MacromolecularComplex" "biolink:NucleosomeModification" "biolink:Genome" "biolink:Exon" "biolink:Transcript" "biolink:CodingSequence" "biolink:Polypeptide" "biolink:ProteinDomain" "biolink:PosttranslationalModification" "biolink:ProteinFamily" "biolink:NucleicAcidSequenceMotif" "biolink:GeneFamily" "biolink:Genotype" "biolink:Haplotype" "biolink:SequenceVariant" "biolink:ReagentTargetedGene" "biolink:Snv" "biolink:Protein" "biolink:ProteinIsoform" "biolink:RNAProduct" "biolink:RNAProductIsoform" "biolink:NoncodingRNAProduct" "biolink:MicroRNA" "biolink:SiRNA" "biolink:Disease" "biolink:PhenotypicFeature" "biolink:BehavioralFeature" "biolink:ClinicalFinding" "biolink:Bacterium" "biolink:Virus" "biolink:CellularOrganism" "biolink:LifeStage" "biolink:IndividualOrganism" "biolink:PopulationOfIndividualOrganisms" "biolink:AnatomicalEntity" "biolink:CellLine" "biolink:CellularComponent" "biolink:Cell" "biolink:GrossAnatomicalStructure" "biolink:PathologicalAnatomicalStructure" "biolink:StudyPopulation" "biolink:Cohort" "biolink:Case" "biolink:Mammal" "biolink:Plant" "biolink:Invertebrate" "biolink:Vertebrate" "biolink:Fungus" "biolink:Human" "biolink:MolecularActivity" "biolink:BiologicalProcess" "biolink:Pathway" "biolink:PhysiologicalProcess" "biolink:Behavior" "biolink:PathologicalProcess" "biolink:AccessibleDnaRegion" "biolink:TranscriptionFactorBindingSite" "biolink:EnvironmentalProcess" "biolink:EnvironmentalFeature" "biolink:GeographicLocation" "biolink:GeographicLocationAtTime" "biolink:Study" "biolink:MaterialSample" "biolink:StudyResult" "biolink:StudyVariable" "biolink:CommonDataElement" "biolink:Dataset" "biolink:DatasetDistribution" "biolink:DatasetVersion" "biolink:DatasetSummary" "biolink:ConfidenceLevel" "biolink:EvidenceType" "biolink:Publication" "biolink:RetrievalSource" "biolink:Book" "biolink:BookChapter" "biolink:Serial" "biolink:Article" "biolink:Patent" "biolink:WebPage" "biolink:PreprintPublication" "biolink:DrugLabel" "biolink:JournalArticle" "biolink:ConceptCountAnalysisResult" "biolink:ObservedExpectedFrequencyAnalysisResult" "biolink:RelativeFrequencyAnalysisResult" "biolink:TextMiningResult" "biolink:ChiSquaredAnalysisResult" "biolink:LogOddsAnalysisResult" "biolink:Agent" "biolink:ChemicalRole" "biolink:BiologicalSex" "biolink:SeverityValue" "biolink:OrganismAttribute" "biolink:Zygosity" "biolink:ClinicalAttribute" "biolink:SocioeconomicAttribute" "biolink:GenomicBackgroundExposure" "biolink:PathologicalProcessExposure" "biolink:PathologicalAnatomicalExposure" "biolink:DiseaseOrPhenotypicFeatureExposure" "biolink:ChemicalExposure" "biolink:ComplexChemicalExposure" "biolink:BioticExposure" "biolink:EnvironmentalExposure" "biolink:BehavioralExposure" "biolink:SocioeconomicExposure" "biolink:GeographicExposure" "biolink:DrugExposure" "biolink:DrugToGeneInteractionExposure" "biolink:ClinicalMeasurement" "biolink:ClinicalModifier" "biolink:ClinicalCourse" "biolink:Onset" "biolink:PhenotypicQuality" "biolink:PhenotypicSex" "biolink:GenotypicSex" ) ; sh:order 5 ; sh:path matrix_schema:all_categories ], [ sh:datatype xsd:string ; - sh:description "Detailed description of the entity." ; + sh:description "Human-readable name of the entity." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 3 ; - sh:path matrix_schema:description ], + sh:order 1 ; + sh:path matrix_schema:name ], + [ sh:datatype xsd:string ; + sh:description "Alternative labels for the entity." ; + sh:nodeKind sh:Literal ; + sh:order 7 ; + sh:path matrix_schema:labels ], + [ sh:datatype xsd:string ; + sh:description "Publications associated with the entity." ; + sh:nodeKind sh:Literal ; + sh:order 6 ; + sh:path matrix_schema:publications ], [ sh:datatype xsd:string ; sh:description "Sources from which this entity's data originates." ; sh:nodeKind sh:Literal ; sh:order 9 ; sh:path matrix_schema:upstream_data_source ], [ sh:datatype xsd:string ; - sh:description "Human-readable name of the entity." ; + sh:description "Detailed description of the entity." ; sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 1 ; - sh:path matrix_schema:name ], - [ sh:datatype xsd:string ; - sh:description "List of equivalent identifiers for the entity." ; - sh:nodeKind sh:Literal ; - sh:order 4 ; - sh:path matrix_schema:equivalent_identifiers ], + sh:order 3 ; + sh:path matrix_schema:description ], [ sh:description "Biolink category of the entity." ; sh:in ( "biolink:NamedThing" "biolink:Attribute" "biolink:OrganismTaxon" "biolink:Event" "biolink:AdministrativeEntity" "biolink:InformationContentEntity" "biolink:PhysicalEntity" "biolink:Activity" "biolink:Procedure" "biolink:Phenomenon" "biolink:Device" "biolink:DiagnosticAid" "biolink:PlanetaryEntity" "biolink:BiologicalEntity" "biolink:ChemicalEntity" "biolink:ClinicalEntity" "biolink:Treatment" "biolink:ClinicalTrial" "biolink:ClinicalIntervention" "biolink:Hospitalization" "biolink:MolecularEntity" "biolink:ChemicalMixture" "biolink:EnvironmentalFoodContaminant" "biolink:FoodAdditive" "biolink:MolecularMixture" "biolink:ComplexMolecularMixture" "biolink:ProcessedMaterial" "biolink:Food" "biolink:Drug" "biolink:SmallMolecule" "biolink:NucleicAcidEntity" "biolink:RegulatoryRegion" "biolink:BiologicalProcessOrActivity" "biolink:GeneticInheritance" "biolink:OrganismalEntity" "biolink:DiseaseOrPhenotypicFeature" "biolink:Gene" "biolink:MacromolecularComplex" "biolink:NucleosomeModification" "biolink:Genome" "biolink:Exon" "biolink:Transcript" "biolink:CodingSequence" "biolink:Polypeptide" "biolink:ProteinDomain" "biolink:PosttranslationalModification" "biolink:ProteinFamily" "biolink:NucleicAcidSequenceMotif" "biolink:GeneFamily" "biolink:Genotype" "biolink:Haplotype" "biolink:SequenceVariant" "biolink:ReagentTargetedGene" "biolink:Snv" "biolink:Protein" "biolink:ProteinIsoform" "biolink:RNAProduct" "biolink:RNAProductIsoform" "biolink:NoncodingRNAProduct" "biolink:MicroRNA" "biolink:SiRNA" "biolink:Disease" "biolink:PhenotypicFeature" "biolink:BehavioralFeature" "biolink:ClinicalFinding" "biolink:Bacterium" "biolink:Virus" "biolink:CellularOrganism" "biolink:LifeStage" "biolink:IndividualOrganism" "biolink:PopulationOfIndividualOrganisms" "biolink:AnatomicalEntity" "biolink:CellLine" "biolink:CellularComponent" "biolink:Cell" "biolink:GrossAnatomicalStructure" "biolink:PathologicalAnatomicalStructure" "biolink:StudyPopulation" "biolink:Cohort" "biolink:Case" "biolink:Mammal" "biolink:Plant" "biolink:Invertebrate" "biolink:Vertebrate" "biolink:Fungus" "biolink:Human" "biolink:MolecularActivity" "biolink:BiologicalProcess" "biolink:Pathway" "biolink:PhysiologicalProcess" "biolink:Behavior" "biolink:PathologicalProcess" "biolink:AccessibleDnaRegion" "biolink:TranscriptionFactorBindingSite" "biolink:EnvironmentalProcess" "biolink:EnvironmentalFeature" "biolink:GeographicLocation" "biolink:GeographicLocationAtTime" "biolink:Study" "biolink:MaterialSample" "biolink:StudyResult" "biolink:StudyVariable" "biolink:CommonDataElement" "biolink:Dataset" "biolink:DatasetDistribution" "biolink:DatasetVersion" "biolink:DatasetSummary" "biolink:ConfidenceLevel" "biolink:EvidenceType" "biolink:Publication" "biolink:RetrievalSource" "biolink:Book" "biolink:BookChapter" "biolink:Serial" "biolink:Article" "biolink:Patent" "biolink:WebPage" "biolink:PreprintPublication" "biolink:DrugLabel" "biolink:JournalArticle" "biolink:ConceptCountAnalysisResult" "biolink:ObservedExpectedFrequencyAnalysisResult" "biolink:RelativeFrequencyAnalysisResult" "biolink:TextMiningResult" "biolink:ChiSquaredAnalysisResult" "biolink:LogOddsAnalysisResult" "biolink:Agent" "biolink:ChemicalRole" "biolink:BiologicalSex" "biolink:SeverityValue" "biolink:OrganismAttribute" "biolink:Zygosity" "biolink:ClinicalAttribute" "biolink:SocioeconomicAttribute" "biolink:GenomicBackgroundExposure" "biolink:PathologicalProcessExposure" "biolink:PathologicalAnatomicalExposure" "biolink:DiseaseOrPhenotypicFeatureExposure" "biolink:ChemicalExposure" "biolink:ComplexChemicalExposure" "biolink:BioticExposure" "biolink:EnvironmentalExposure" "biolink:BehavioralExposure" "biolink:SocioeconomicExposure" "biolink:GeographicExposure" "biolink:DrugExposure" "biolink:DrugToGeneInteractionExposure" "biolink:ClinicalMeasurement" "biolink:ClinicalModifier" "biolink:ClinicalCourse" "biolink:Onset" "biolink:PhenotypicQuality" "biolink:PhenotypicSex" "biolink:GenotypicSex" ) ; sh:maxCount 1 ; @@ -695,14 +699,10 @@ matrix_schema:MatrixNode a sh:NodeShape ; sh:order 2 ; sh:path matrix_schema:category ], [ sh:datatype xsd:string ; - sh:description "Alternative labels for the entity." ; - sh:nodeKind sh:Literal ; - sh:order 7 ; - sh:path matrix_schema:labels ], - [ sh:datatype xsd:string ; - sh:description "Publications associated with the entity." ; + sh:description "IRI of the entity." ; + sh:maxCount 1 ; sh:nodeKind sh:Literal ; - sh:order 6 ; - sh:path matrix_schema:publications ] ; + sh:order 8 ; + sh:path matrix_schema:international_resource_identifier ] ; sh:targetClass matrix_schema:MatrixNode . diff --git a/pyproject.toml b/pyproject.toml index ad2c54f..6aa91ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,35 +2,23 @@ requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"] build-backend = "poetry_dynamic_versioning.backend" -[project] +[tool.poetry] name = "matrix_schema" +version = "0.0.0" description = "The collected MATRIX schemas" -authors = [ - {name = "Nicolas Matentzoglu", email = "nicolas.matentzoglu@gmail.com"}, -] +authors = ["Nicolas Matentzoglu "] license = "BSD-3" readme = "README.md" +packages = [{include = "matrix_schema", from = "src"}] include = ["README.md", "src/matrix_schema/schema", "project"] -requires-python = ">=3.9" - -dynamic = ["version"] - -dependencies = [ - "linkml-runtime >=1.8.0", - "biolink-model (>=4.2.5,<5.0.0)", -] - -[tool.poetry] -requires-poetry = ">=2.0" -version = "0.0.0" - [tool.poetry.dependencies] python = "^3.9" -linkml-runtime = "^1.1.24" +linkml-runtime = ">=1.8.0" +biolink-model = ">=4.2.5,<5.0.0" -[project.optional-dependencies] -docs = ["jinjanator>=24.4.0"] +[tool.poetry.group.docs.dependencies] +jinjanator = ">=24.4.0" [tool.poetry.requires-plugins] poetry-dynamic-versioning = ">=1.5.2" diff --git a/src/matrix_schema/datamodel/matrix_schema.py b/src/matrix_schema/datamodel/matrix_schema.py index 0b84c32..b9af4eb 100644 --- a/src/matrix_schema/datamodel/matrix_schema.py +++ b/src/matrix_schema/datamodel/matrix_schema.py @@ -1,5 +1,5 @@ # Auto generated from matrix_schema.yaml by pythongen.py version: 0.0.1 -# Generation date: 2025-08-26T11:42:20 +# Generation date: 2025-09-04T16:20:54 # Schema: matrix-schema # # id: https://w3id.org/everycure-org/matrix-schema diff --git a/src/matrix_schema/datamodel/pandera.py b/src/matrix_schema/datamodel/pandera.py index 66352ca..3119b9f 100644 --- a/src/matrix_schema/datamodel/pandera.py +++ b/src/matrix_schema/datamodel/pandera.py @@ -1,3 +1,8 @@ +# THIS FILE IS AUTOGENERATED. DO NOT EDIT MANUALLY. +""" +Auto-generated Pandera schemas from LinkML schema. +""" + try: import pyspark.sql.types as T import pandera.pandas as pa @@ -34,29 +39,38 @@ def get_matrix_node_schema(validate_enumeration_values: bool = True): raise ImportError(error_msg) if validate_enumeration_values: - category_checks = [pa.Check.isin([category.value for category in NodeCategoryEnum])] + category_checks = [pa.Check.isin([enum_val.value for enum_val in NodeCategoryEnum])] else: category_checks = [] + if validate_enumeration_values: + all_categories_checks = [pa.Check(lambda series: series.dropna().apply( + lambda arr: all(item in [enum_val.value for enum_val in NodeCategoryEnum] for item in (arr if isinstance(arr, list) else [])) + ).all(), element_wise=False, error="all items in all_categories must be valid NodeCategory enum values")] + else: + all_categories_checks = [] + return DataFrameSchema( columns={ "id": Column(T.StringType(), nullable=False), "name": Column(T.StringType(), nullable=True), - "category": Column(T.StringType(), nullable=False, + "category": Column(T.StringType(), nullable=True, checks=category_checks), "description": Column(T.StringType(), nullable=True), - "equivalent_identifiers": Column(T.ArrayType(T.StringType()), nullable=True), - "all_categories": Column(T.ArrayType(T.StringType()), nullable=True), - "publications": Column(T.ArrayType(T.StringType()), nullable=True), - "labels": Column(T.ArrayType(T.StringType()), nullable=True), + "equivalent_identifiers": Column(T.ArrayType(T.StringType(), False), nullable=True), + "all_categories": Column(T.ArrayType(T.StringType(), False), nullable=True, + checks=all_categories_checks), + "publications": Column(T.ArrayType(T.StringType(), False), nullable=True), + "labels": Column(T.ArrayType(T.StringType(), False), nullable=True), "international_resource_identifier": Column(T.StringType(), nullable=True), - "upstream_data_source": Column(T.ArrayType(T.StringType()), nullable=True), + "upstream_data_source": Column(T.ArrayType(T.StringType(), False), nullable=True), }, unique=["id"], strict=True, ) + def get_matrix_edge_schema(validate_enumeration_values: bool = True): """Get the Pandera schema for MatrixEdge validation. @@ -66,35 +80,40 @@ def get_matrix_edge_schema(validate_enumeration_values: bool = True): if not DEPENDENCIES_AVAILABLE: error_msg = f"Dependencies not available for Pandera schema. Original error: {IMPORT_ERROR if 'IMPORT_ERROR' in globals() else 'Unknown'}. Install with: pip install 'pandera[pyspark]' pyspark" raise ImportError(error_msg) - + if validate_enumeration_values: - predicate_checks = [pa.Check.isin([predicate.value for predicate in PredicateEnum])] - knowledge_level_checks = [pa.Check.isin([level.value for level in KnowledgeLevelEnum])] - agent_type_checks = [pa.Check.isin([agent.value for agent in AgentTypeEnum])] + predicate_checks = [pa.Check.isin([enum_val.value for enum_val in PredicateEnum])] else: predicate_checks = [] + + if validate_enumeration_values: + knowledge_level_checks = [pa.Check.isin([enum_val.value for enum_val in KnowledgeLevelEnum])] + else: knowledge_level_checks = [] + + if validate_enumeration_values: + agent_type_checks = [pa.Check.isin([enum_val.value for enum_val in AgentTypeEnum])] + else: agent_type_checks = [] return DataFrameSchema( columns={ - "subject": Column(T.StringType(), nullable=False), - "predicate": Column(T.StringType(), nullable=False, - checks=predicate_checks), - "object": Column(T.StringType(), nullable=False), + "subject": Column(T.StringType(), nullable=True), + "predicate": Column(T.StringType(), nullable=True, + checks=predicate_checks), + "object": Column(T.StringType(), nullable=True), "knowledge_level": Column(T.StringType(), nullable=True, - checks=knowledge_level_checks), + checks=knowledge_level_checks), "agent_type": Column(T.StringType(), nullable=True, - checks=agent_type_checks), + checks=agent_type_checks), "primary_knowledge_source": Column(T.StringType(), nullable=True), - "aggregator_knowledge_source": Column(T.ArrayType(T.StringType()), nullable=True), - "publications": Column(T.ArrayType(T.StringType()), nullable=True), + "aggregator_knowledge_source": Column(T.ArrayType(T.StringType(), False), nullable=True), + "publications": Column(T.ArrayType(T.StringType(), False), nullable=True), "subject_aspect_qualifier": Column(T.StringType(), nullable=True), "subject_direction_qualifier": Column(T.StringType(), nullable=True), "object_aspect_qualifier": Column(T.StringType(), nullable=True), "object_direction_qualifier": Column(T.StringType(), nullable=True), - "upstream_data_source": Column(T.ArrayType(T.StringType()), nullable=True), - # Additional fields from original pandera schema + "upstream_data_source": Column(T.ArrayType(T.StringType(), False), nullable=True), "num_references": Column(T.IntegerType(), nullable=True), "num_sentences": Column(T.IntegerType(), nullable=True), }, @@ -103,6 +122,7 @@ def get_matrix_edge_schema(validate_enumeration_values: bool = True): ) + def get_unioned_node_schema(validate_enumeration_values: bool = True): """Get the Pandera schema for UnionedNode validation. @@ -114,29 +134,38 @@ def get_unioned_node_schema(validate_enumeration_values: bool = True): raise ImportError(error_msg) if validate_enumeration_values: - category_checks = [pa.Check.isin([category.value for category in NodeCategoryEnum])] + category_checks = [pa.Check.isin([enum_val.value for enum_val in NodeCategoryEnum])] else: category_checks = [] + if validate_enumeration_values: + all_categories_checks = [pa.Check(lambda series: series.dropna().apply( + lambda arr: all(item in [enum_val.value for enum_val in NodeCategoryEnum] for item in (arr if isinstance(arr, list) else [])) + ).all(), element_wise=False, error="all items in all_categories must be valid NodeCategory enum values")] + else: + all_categories_checks = [] + return DataFrameSchema( columns={ "id": Column(T.StringType(), nullable=False), "name": Column(T.StringType(), nullable=True), - "category": Column(T.StringType(), nullable=False, + "category": Column(T.StringType(), nullable=True, checks=category_checks), "description": Column(T.StringType(), nullable=True), - "equivalent_identifiers": Column(T.ArrayType(T.StringType()), nullable=True), - "all_categories": Column(T.ArrayType(T.StringType()), nullable=True), - "publications": Column(T.ArrayType(T.StringType()), nullable=True), - "labels": Column(T.ArrayType(T.StringType()), nullable=True), + "equivalent_identifiers": Column(T.ArrayType(T.StringType(), False), nullable=True), + "all_categories": Column(T.ArrayType(T.StringType(), False), nullable=True, + checks=all_categories_checks), + "publications": Column(T.ArrayType(T.StringType(), False), nullable=True), + "labels": Column(T.ArrayType(T.StringType(), False), nullable=True), "international_resource_identifier": Column(T.StringType(), nullable=True), - "upstream_data_source": Column(T.ArrayType(T.StringType()), nullable=True), + "upstream_data_source": Column(T.ArrayType(T.StringType(), False), nullable=True), }, unique=["id"], strict=True, ) + def get_unioned_edge_schema(validate_enumeration_values: bool = True): """Get the Pandera schema for UnionedEdge validation. @@ -146,38 +175,46 @@ def get_unioned_edge_schema(validate_enumeration_values: bool = True): if not DEPENDENCIES_AVAILABLE: error_msg = f"Dependencies not available for Pandera schema. Original error: {IMPORT_ERROR if 'IMPORT_ERROR' in globals() else 'Unknown'}. Install with: pip install 'pandera[pyspark]' pyspark" raise ImportError(error_msg) - + if validate_enumeration_values: - predicate_checks = [pa.Check.isin([predicate.value for predicate in PredicateEnum])] - knowledge_level_checks = [pa.Check.isin([level.value for level in KnowledgeLevelEnum])] - agent_type_checks = [pa.Check.isin([agent.value for agent in AgentTypeEnum])] + predicate_checks = [pa.Check.isin([enum_val.value for enum_val in PredicateEnum])] else: predicate_checks = [] + + if validate_enumeration_values: + knowledge_level_checks = [pa.Check.isin([enum_val.value for enum_val in KnowledgeLevelEnum])] + else: knowledge_level_checks = [] + + if validate_enumeration_values: + agent_type_checks = [pa.Check.isin([enum_val.value for enum_val in AgentTypeEnum])] + else: agent_type_checks = [] return DataFrameSchema( columns={ - "primary_knowledge_sources": Column(T.ArrayType(T.StringType(), False), nullable=False), - "subject": Column(T.StringType(), nullable=False), - "predicate": Column(T.StringType(), nullable=False, - checks=predicate_checks), - "object": Column(T.StringType(), nullable=False), + "primary_knowledge_sources": Column(T.ArrayType(T.StringType(), False), nullable=True), + "subject": Column(T.StringType(), nullable=True), + "predicate": Column(T.StringType(), nullable=True, + checks=predicate_checks), + "object": Column(T.StringType(), nullable=True), "knowledge_level": Column(T.StringType(), nullable=True, - checks=knowledge_level_checks), + checks=knowledge_level_checks), "agent_type": Column(T.StringType(), nullable=True, - checks=agent_type_checks), + checks=agent_type_checks), "primary_knowledge_source": Column(T.StringType(), nullable=True), - "aggregator_knowledge_source": Column(T.ArrayType(T.StringType()), nullable=True), - "publications": Column(T.ArrayType(T.StringType()), nullable=True), + "aggregator_knowledge_source": Column(T.ArrayType(T.StringType(), False), nullable=True), + "publications": Column(T.ArrayType(T.StringType(), False), nullable=True), "subject_aspect_qualifier": Column(T.StringType(), nullable=True), "subject_direction_qualifier": Column(T.StringType(), nullable=True), "object_aspect_qualifier": Column(T.StringType(), nullable=True), "object_direction_qualifier": Column(T.StringType(), nullable=True), - "upstream_data_source": Column(T.ArrayType(T.StringType()), nullable=True), + "upstream_data_source": Column(T.ArrayType(T.StringType(), False), nullable=True), "num_references": Column(T.IntegerType(), nullable=True), "num_sentences": Column(T.IntegerType(), nullable=True), }, unique=["subject", "predicate", "object"], strict=True, ) + + diff --git a/src/matrix_schema/generators/__init__.py b/src/matrix_schema/generators/__init__.py new file mode 100644 index 0000000..5ad3b51 --- /dev/null +++ b/src/matrix_schema/generators/__init__.py @@ -0,0 +1 @@ +"""Generators for matrix_schema.""" \ No newline at end of file diff --git a/src/matrix_schema/generators/panderagen.py b/src/matrix_schema/generators/panderagen.py new file mode 100644 index 0000000..8f1983b --- /dev/null +++ b/src/matrix_schema/generators/panderagen.py @@ -0,0 +1,363 @@ +""" +Pandera schema generator for LinkML schemas. + +This generator creates Pandera schemas from LinkML schemas with customizable +class selection and specialized handling for union types. +""" + +import os +import subprocess +import tempfile +from pathlib import Path +from typing import List, Optional, Dict, Any, Set + +import click +from jinja2 import Template +from linkml_runtime.linkml_model import SchemaDefinition, ClassDefinition, SlotDefinition +from linkml_runtime.utils.schemaview import SchemaView + +try: + from linkml.generators.generator import Generator, shared_arguments +except ImportError: + # Fallback for older versions or missing linkml.generators + class Generator: + generatorname = "panderagen" + valid_formats = ["py"] + visit_all_class_slots = True + + def __init__(self, schema, **kwargs): + self.schema = schema + + def shared_arguments(cls): + def decorator(f): + f = click.argument('yamlfile')(f) + return f + return decorator + + +class PanderaGenerator(Generator): + """Generator for Pandera schemas from LinkML schemas.""" + + generatorname = os.path.basename(__file__) + valid_formats = ["py"] + visit_all_class_slots = True + + def __init__( + self, + schema: str | SchemaDefinition, + classes: Optional[List[str]] = None, + **kwargs + ): + super().__init__(schema, **kwargs) + self.schemaview = SchemaView(schema) + # Preserve the order of classes as specified + self.target_classes = classes if classes else [] + + def serialize(self, **kwargs) -> str: + """Generate Pandera schema code.""" + # Get template + template_str = self._get_template() + template = Template(template_str) + + # Prepare data for template + template_data = self._prepare_template_data() + + # Render template + code = template.render(**template_data) + + # Format with ruff if available (disabled for now due to template indentation issues) + # return self._format_code(code) + return code + + def _format_code(self, code: str) -> str: + """Format code using ruff if available.""" + try: + # Create a temporary file to format + with tempfile.NamedTemporaryFile(mode='w', suffix='.py', delete=False) as f: + f.write(code) + temp_path = f.name + + try: + # Try to format with ruff + result = subprocess.run( + ['ruff', 'format', '--stdin-filename', temp_path, '-'], + input=code, + text=True, + capture_output=True, + check=False + ) + + if result.returncode == 0: + return result.stdout + else: + # If ruff fails, return original code + return code + + finally: + # Clean up temp file + os.unlink(temp_path) + + except (FileNotFoundError, subprocess.SubprocessError): + # If ruff is not available, return original code + return code + + def _get_template(self) -> str: + """Get the Jinja template for Pandera generation.""" + return '''# THIS FILE IS AUTOGENERATED. DO NOT EDIT MANUALLY. +""" +Auto-generated Pandera schemas from LinkML schema. +""" + +try: + import pyspark.sql.types as T + import pandera.pandas as pa + from ..utils.pandera_utils import Column, DataFrameSchema + # Import the enums from the pydantic model + from .matrix_schema_pydantic import ( + PredicateEnum, + NodeCategoryEnum, + KnowledgeLevelEnum, + AgentTypeEnum + ) + DEPENDENCIES_AVAILABLE = True +except ImportError as e: + T = None + pa = None + Column = None + DataFrameSchema = None + PredicateEnum = None + NodeCategoryEnum = None + KnowledgeLevelEnum = None + AgentTypeEnum = None + DEPENDENCIES_AVAILABLE = False + IMPORT_ERROR = str(e) + +{% for class_name, class_info in classes.items() %} +def get_{{ class_info.function_name }}(validate_enumeration_values: bool = True): + """Get the Pandera schema for {{ class_name }} validation. + + Returns a universal schema that works with both pandas and PySpark DataFrames. + The actual schema type is determined at validation time based on the DataFrame type. + """ + if not DEPENDENCIES_AVAILABLE: + error_msg = f"Dependencies not available for Pandera schema. Original error: {IMPORT_ERROR if 'IMPORT_ERROR' in globals() else 'Unknown'}. Install with: pip install 'pandera[pyspark]' pyspark" + raise ImportError(error_msg) +{%- set enum_slots = [] -%} +{%- for slot_name, slot_info in class_info.slots.items() -%} +{%- if slot_info.enum_checks -%} +{%- set _ = enum_slots.append((slot_name, slot_info.enum_checks)) -%} +{%- endif -%} +{%- endfor -%} +{%- if enum_slots %} + + {% for slot_name, enum_check in enum_slots -%} + if validate_enumeration_values: + {{ slot_name }}_checks = [{{ enum_check }}] + else: + {{ slot_name }}_checks = [] + + {% endfor -%} +{%- endif -%} + + return DataFrameSchema( + columns={ +{%- for slot_name, slot_info in class_info.slots.items() %} + "{{ slot_name }}": Column({{ slot_info.pyspark_type }}, nullable={{ slot_info.nullable | title }}{% if slot_info.enum_checks %}, + checks={{ slot_name }}_checks{% endif %}), +{%- endfor %} + }, +{%- if class_info.unique_fields %} + unique={{ class_info.unique_fields }}, +{%- endif %} + strict=True, + ) + + +{% endfor %} +''' + + def _prepare_template_data(self) -> Dict[str, Any]: + """Prepare data for the Jinja template.""" + # Use OrderedDict to preserve the order of classes as specified in CLI + from collections import OrderedDict + classes_data = OrderedDict() + + for class_name in self.target_classes: + class_def = self.schemaview.get_class(class_name) + if not class_def: + continue + + class_info = self._process_class(class_name, class_def) + classes_data[class_name] = class_info + + return { + "classes": classes_data, + "schema_name": self.schemaview.schema.name, + } + + def _process_class(self, class_name: str, class_def: ClassDefinition) -> Dict[str, Any]: + """Process a single class definition.""" + # Get all slots for this class + all_slots = self.schemaview.class_slots(class_name) + + slots_data = {} + has_primary_knowledge_sources = False + has_categories = False + + for slot_name in all_slots: + slot_def = self.schemaview.get_slot(slot_name) + if not slot_def: + continue + + slot_info = self._process_slot(slot_def) + slots_data[slot_name] = slot_info + + if slot_name == "primary_knowledge_sources": + has_primary_knowledge_sources = True + elif slot_name in ["category", "categories"]: + has_categories = True + + # Generate function name (convert CamelCase to snake_case) + function_name = self._to_snake_case(class_name) + "_schema" + + # Determine unique fields based on class name + unique_fields = None + if "node" in class_name.lower(): + unique_fields = '["id"]' + elif "edge" in class_name.lower(): + unique_fields = '["subject", "predicate", "object"]' + + return { + "function_name": function_name, + "slots": slots_data, + "unique_fields": unique_fields, + "description": class_def.description, + } + + def _process_slot(self, slot_def: SlotDefinition) -> Dict[str, Any]: + """Process a single slot definition.""" + # Determine PySpark type + pyspark_type = self._linkml_to_pyspark_type( + slot_def.range if slot_def.range else "string", + slot_def.multivalued + ) + + # Determine nullability + nullable = not slot_def.required if slot_def.required is not None else True + + # Generate enum checks if applicable + enum_checks = None + if slot_def.range and slot_def.range.endswith("Enum"): + range_name = slot_def.range # e.g., "NodeCategoryEnum" + slot_name = slot_def.name + enum_name = range_name.replace("Enum", "") # e.g., "NodeCategory" + + if slot_def.multivalued: + enum_checks = f"""pa.Check(lambda series: series.dropna().apply( + lambda arr: all(item in [enum_val.value for enum_val in {range_name}] for item in (arr if isinstance(arr, list) else [])) + ).all(), element_wise=False, error="all items in {slot_name} must be valid {enum_name} enum values")""" + else: + enum_checks = f"pa.Check.isin([enum_val.value for enum_val in {range_name}])" + + return { + "pyspark_type": pyspark_type, + "nullable": nullable, + "enum_checks": enum_checks, + "description": slot_def.description, + "multivalued": slot_def.multivalued, + } + + def _get_pandera_type(self, slot_def: SlotDefinition) -> str: + """Convert LinkML type to Pandera type.""" + if slot_def.range: + range_type = slot_def.range + else: + range_type = "string" # default + + # Handle multivalued slots + if slot_def.multivalued: + base_type = self._linkml_to_pandera_type(range_type) + return f"object" # Lists are stored as objects in pandas + else: + return self._linkml_to_pandera_type(range_type) + + def _linkml_to_pyspark_type(self, linkml_type: str, multivalued: bool = False) -> str: + """Map LinkML types to PySpark types.""" + base_type_mapping = { + "string": "T.StringType()", + "integer": "T.IntegerType()", + "float": "T.FloatType()", + "double": "T.DoubleType()", + "boolean": "T.BooleanType()", + "date": "T.StringType()", + "datetime": "T.StringType()", + "uri": "T.StringType()", + "uriorcurie": "T.StringType()", + } + + base_type = base_type_mapping.get(linkml_type.lower(), "T.StringType()") + + if multivalued: + # For arrays, the nullable=False parameter applies to the array items, not the array itself + return f"T.ArrayType({base_type}, False)" + else: + return base_type + + def _generate_checks(self, slot_def: SlotDefinition) -> List[str]: + """Generate Pandera checks for a slot.""" + checks = [] + + # Add pattern check if available + if slot_def.pattern: + checks.append(f'pa.Check.str_matches(r"{slot_def.pattern}")') + + # Add enum check if available + if hasattr(slot_def, 'permissible_values') and slot_def.permissible_values: + values = [f'"{pv.text}"' for pv in slot_def.permissible_values.values()] + checks.append(f'pa.Check.isin([{", ".join(values)}])') + + return checks + + def _to_snake_case(self, camel_str: str) -> str: + """Convert CamelCase to snake_case.""" + result = [] + for i, char in enumerate(camel_str): + if char.isupper() and i > 0: + result.append('_') + result.append(char.lower()) + return ''.join(result) + + +@click.command() +@click.argument('yamlfile') +@click.option( + "--classes", + "-c", + multiple=True, + required=True, + help="Classes to generate Pandera schemas for (can be specified multiple times)" +) +@click.option( + "--output", + "-o", + help="Output file (default: stdout)" +) +def cli(yamlfile, classes, output): + """Generate Pandera schemas from LinkML schema.""" + try: + generator = PanderaGenerator(yamlfile, classes=list(classes)) + result = generator.serialize() + + if output: + with open(output, 'w') as f: + f.write(result) + click.echo(f"Generated Pandera schemas written to {output}", err=True) + else: + click.echo(result) + + except Exception as e: + raise click.ClickException(f"Error: {e}") + + +if __name__ == "__main__": + cli() \ No newline at end of file diff --git a/src/matrix_schema/schema/matrix_kg.yaml b/src/matrix_schema/schema/matrix_kg.yaml index d757d80..e9ea5ab 100644 --- a/src/matrix_schema/schema/matrix_kg.yaml +++ b/src/matrix_schema/schema/matrix_kg.yaml @@ -24,6 +24,7 @@ imports: slots: id: identifier: true + required: true slot_uri: schema:identifier range: uriorcurie description: A unique identifier for a thing