From f0f835daa7939f8deaa59a1c057c0f88d03a6a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gw=C3=AAnlyn=20Glusman?= Date: Thu, 27 Jun 2024 12:36:02 -0700 Subject: [PATCH 1/4] Update infores_catalog.yaml Edited KL/AT for Multiomics Wellness KP Edited KL/AT for Multiomics Clinical Trials KP Added entry for Multiomics Drug Approvals KP --- infores_catalog.yaml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/infores_catalog.yaml b/infores_catalog.yaml index d60efce..7b69d34 100644 --- a/infores_catalog.yaml +++ b/infores_catalog.yaml @@ -639,16 +639,23 @@ information_resources: name: Multiomics Wellness KP API xref: - https://github.com/NCATSTranslator/Translator-All/wiki/Wellness-KP - knowledge level: correlation - agent type: not_provided + knowledge level: statistical_association + agent type: data_analysis_pipeline description: Documentation of the Multiomics Wellness KP query web services. - id: infores:biothings-multiomics-clinicaltrials status: released name: Multiomics ClinicalTrials KP API xref: - https://github.com/NCATSTranslator/Translator-All/wiki/Clinical-Trials-KP - knowledge level: curated - agent type: not_provided + knowledge level: knowledge_assertion + agent type: manual_agent + - id: infores:biothings-multiomics-drugapprovals + status: released + name: Multiomics Drug Approvals KP API + xref: + - https://github.com/NCATSTranslator/Translator-All/wiki/Multiomics-Drug-Approvals-KP + knowledge level: knowledge_assertion + agent type: manual_agent - id: infores:biothings-pfocr status: modified name: BioThings PFOCR API From 06815c85ac93b295f2282054a5040395b1991a38 Mon Sep 17 00:00:00 2001 From: Sierra Taylor Moxon Date: Mon, 15 Jul 2024 15:46:30 -0700 Subject: [PATCH 2/4] fix up source of python validation and add enumeration values to fix tests --- project/information_resource_registry.py | 16 +++- ...formation_resource_registry.context.jsonld | 2 +- .../information_resource_registry.jsonld | 24 ++++- .../information_resource_registry.schema.json | 6 +- project/owl/information_resource.owl.ttl | 90 ++++++++++++------- .../information_resource_registry.shacl.ttl | 46 +++++----- .../shex/information_resource_registry.shex | 10 ++- .../information_resource_registry.py | 16 +++- .../datamodel/pydanticmodel.py | 10 ++- .../datamodel/pydanticmodel_v2.py | 10 ++- .../schema/information_resource_registry.yaml | 15 +++- .../scripts/verify_infores.py | 9 +- 12 files changed, 180 insertions(+), 74 deletions(-) diff --git a/project/information_resource_registry.py b/project/information_resource_registry.py index e088720..830e8e9 100644 --- a/project/information_resource_registry.py +++ b/project/information_resource_registry.py @@ -1,5 +1,5 @@ # Auto generated from information_resource_registry.yaml by pythongen.py version: 0.0.1 -# Generation date: 2024-06-09T17:47:26 +# Generation date: 2024-07-15T15:42:36 # Schema: Information-Resource-Registry-Schema # # id: https://w3id.org/biolink/information_resource_registry.yaml @@ -151,9 +151,15 @@ class KnowledgeLevelEnum(EnumDefinitionImpl): such as a computational prediction and a manual curation. In this case, the knowledge level would be "curated", and the evidence would be described in more detail in the evidence graph. """ + knowledge_assertion = PermissibleValue( + text="knowledge_assertion", + description="""knowledge asserted by a human expert, based on their interpretation of data or published study results""") + statistical_association = PermissibleValue( + text="statistical_association", + description="""statistical associations calculated between variables in a clinical or omics dataset, by an automated analysis pipeline""") curated = PermissibleValue( text="curated", - description="""knowledge generated through manual curation or interpretation of data or published study results""") + description="""knowledge generated through manual curation or interpretation of data or published study results""") predicted = PermissibleValue( text="predicted", description="""predictions generated computationally through inference over less direct forms of evidence (without human intervention or review)""") @@ -186,12 +192,18 @@ class AgentTypeEnum(EnumDefinitionImpl): computational prediction and a manual curation. In this case, the agent type would be "publication", and the evidence would be described in more detail in the evidence graph. """ + manual_agent = PermissibleValue( + text="manual_agent", + description="a human agent, such as a curator or expert") not_provided = PermissibleValue( text="not_provided", description="agent type is not provided or known") computational_model = PermissibleValue( text="computational_model", description="a computational model, such as a machine learning model") + data_analysis_pipeline = PermissibleValue( + text="data_analysis_pipeline", + description="a data analysis pipeline, such as a bioinformatics pipeline") _defn = EnumDefinition( name="AgentTypeEnum", diff --git a/project/jsonld/information_resource_registry.context.jsonld b/project/jsonld/information_resource_registry.context.jsonld index 0807985..dd90238 100644 --- a/project/jsonld/information_resource_registry.context.jsonld +++ b/project/jsonld/information_resource_registry.context.jsonld @@ -1,7 +1,7 @@ { "comments": { "description": "Auto generated by LinkML jsonld context generator", - "generation_date": "2024-06-09T17:47:25", + "generation_date": "2024-07-15T15:42:34", "source": "information_resource_registry.yaml" }, "@context": { diff --git a/project/jsonld/information_resource_registry.jsonld b/project/jsonld/information_resource_registry.jsonld index f29cace..e291805 100644 --- a/project/jsonld/information_resource_registry.jsonld +++ b/project/jsonld/information_resource_registry.jsonld @@ -374,9 +374,17 @@ "description": "The level of knowledge that supports an edge or node. This is a general categorization of the type of evidence that supports a statement, and is not intended to be a comprehensive description of the evidence. For example, a statement may be supported by a single publication, but that publication may contain multiple types of evidence, such as a computational prediction and a manual curation. In this case, the knowledge level would be \"curated\", and the evidence would be described in more detail in the evidence graph.", "from_schema": "https://w3id.org/biolink/information_resource_registry.yaml", "permissible_values": [ + { + "text": "knowledge_assertion", + "description": "knowledge asserted by a human expert, based on their interpretation of data or published study results" + }, + { + "text": "statistical_association", + "description": "statistical associations calculated between variables in a clinical or omics dataset, by an automated analysis pipeline" + }, { "text": "curated", - "description": "knowledge generated through manual curation or interpretation of data or published study results" + "description": "knowledge generated through manual curation or interpretation of data or published study results" }, { "text": "predicted", @@ -410,6 +418,10 @@ "description": "The type of agent that supports an edge or node. This is a general categorization of the type of agent that supports a statement, and is not intended to be a comprehensive description of the agent. For example, a statement may be supported by a single publication, but that publication may contain multiple types of evidence, such as a computational prediction and a manual curation. In this case, the agent type would be \"publication\", and the evidence would be described in more detail in the evidence graph.", "from_schema": "https://w3id.org/biolink/information_resource_registry.yaml", "permissible_values": [ + { + "text": "manual_agent", + "description": "a human agent, such as a curator or expert" + }, { "text": "not_provided", "description": "agent type is not provided or known" @@ -417,6 +429,10 @@ { "text": "computational_model", "description": "a computational model, such as a machine learning model" + }, + { + "text": "data_analysis_pipeline", + "description": "a data analysis pipeline, such as a bioinformatics pipeline" } ] } @@ -612,9 +628,9 @@ ], "metamodel_version": "1.7.0", "source_file": "information_resource_registry.yaml", - "source_file_date": "2024-06-09T17:46:43", - "source_file_size": 7882, - "generation_date": "2024-06-09T17:47:25", + "source_file_date": "2024-07-15T15:42:31", + "source_file_size": 8462, + "generation_date": "2024-07-15T15:42:35", "@type": "SchemaDefinition", "@context": [ "project/jsonld/information_resource_registry.context.jsonld", diff --git a/project/jsonschema/information_resource_registry.schema.json b/project/jsonschema/information_resource_registry.schema.json index 3f28533..7eb0a4f 100644 --- a/project/jsonschema/information_resource_registry.schema.json +++ b/project/jsonschema/information_resource_registry.schema.json @@ -3,8 +3,10 @@ "AgentTypeEnum": { "description": "The type of agent that supports an edge or node. This is a general categorization of the type of agent that supports a statement, and is not intended to be a comprehensive description of the agent. For example, a statement may be supported by a single publication, but that publication may contain multiple types of evidence, such as a computational prediction and a manual curation. In this case, the agent type would be \"publication\", and the evidence would be described in more detail in the evidence graph.", "enum": [ + "manual_agent", "not_provided", - "computational_model" + "computational_model", + "data_analysis_pipeline" ], "title": "AgentTypeEnum", "type": "string" @@ -87,6 +89,8 @@ "KnowledgeLevelEnum": { "description": "The level of knowledge that supports an edge or node. This is a general categorization of the type of evidence that supports a statement, and is not intended to be a comprehensive description of the evidence. For example, a statement may be supported by a single publication, but that publication may contain multiple types of evidence, such as a computational prediction and a manual curation. In this case, the knowledge level would be \"curated\", and the evidence would be described in more detail in the evidence graph.", "enum": [ + "knowledge_assertion", + "statistical_association", "curated", "predicted", "text_mined", diff --git a/project/owl/information_resource.owl.ttl b/project/owl/information_resource.owl.ttl index 7226b8e..af88dfa 100644 --- a/project/owl/information_resource.owl.ttl +++ b/project/owl/information_resource.owl.ttl @@ -31,6 +31,16 @@ biolink:information_resource_registry.yaml.owl.ttl a owl:Ontology ; rdfs:subClassOf infores:AgentTypeEnum, linkml:PermissibleValue . + a owl:Class ; + rdfs:label "data_analysis_pipeline" ; + rdfs:subClassOf infores:AgentTypeEnum, + linkml:PermissibleValue . + + a owl:Class ; + rdfs:label "manual_agent" ; + rdfs:subClassOf infores:AgentTypeEnum, + linkml:PermissibleValue . + a owl:Class ; rdfs:label "not_provided" ; rdfs:subClassOf infores:AgentTypeEnum, @@ -39,71 +49,71 @@ biolink:information_resource_registry.yaml.owl.ttl a owl:Ontology ; infores:InformationResource a owl:Class ; rdfs:label "InformationResource" ; rdfs:subClassOf [ a owl:Restriction ; - owl:allValuesFrom infores:InformationResourceStatusEnum ; - owl:onProperty infores:status ], - [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty infores:id ], - [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty infores:id ], - [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty infores:knowledge_level ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty infores:name ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty infores:description ], [ a owl:Restriction ; owl:minCardinality 1 ; owl:onProperty infores:id ], - [ a owl:Restriction ; - owl:allValuesFrom infores:KnowledgeLevelEnum ; - owl:onProperty infores:knowledge_level ], - [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty infores:synonym ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty infores:synonym ], + owl:onProperty infores:id ], + [ a owl:Restriction ; + owl:maxCardinality 1 ; + owl:onProperty infores:name ], [ a owl:Restriction ; owl:maxCardinality 1 ; owl:onProperty infores:description ], + [ a owl:Restriction ; + owl:allValuesFrom infores:InformationResourceStatusEnum ; + owl:onProperty infores:status ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty infores:knowledge_level ], + owl:onProperty infores:status ], [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:maxCardinality 1 ; owl:onProperty infores:agent_type ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; owl:onProperty infores:name ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty infores:xref ], + owl:allValuesFrom infores:AgentTypeEnum ; + owl:onProperty infores:agent_type ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty infores:description ], + owl:onProperty infores:synonym ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:minCardinality 0 ; owl:onProperty infores:agent_type ], [ a owl:Restriction ; - owl:allValuesFrom infores:AgentTypeEnum ; - owl:onProperty infores:agent_type ], + owl:minCardinality 0 ; + owl:onProperty infores:xref ], [ a owl:Restriction ; - owl:maxCardinality 1 ; + owl:minCardinality 0 ; owl:onProperty infores:name ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:string ; + owl:onProperty infores:description ], + [ a owl:Restriction ; + owl:allValuesFrom xsd:string ; + owl:onProperty infores:xref ], + [ a owl:Restriction ; + owl:minCardinality 0 ; + owl:onProperty infores:synonym ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty infores:status ], + [ a owl:Restriction ; + owl:allValuesFrom infores:KnowledgeLevelEnum ; + owl:onProperty infores:knowledge_level ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty infores:status ], + owl:onProperty infores:id ], [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty infores:xref ], + owl:maxCardinality 1 ; + owl:onProperty infores:knowledge_level ], linkml:ClassDefinition ; skos:altLabel "knowledgebase" ; skos:definition "A database or knowledgebase and its supporting ecosystem of interfaces and services that deliver content to consumers (e.g. web portals, APIs, query endpoints, streaming services, data downloads, etc.). A single Information Resource by this definition may span many different datasets or databases, and include many access endpoints and user interfaces. Information Resources include project-specific resources such as a Translator Knowledge Provider, and community knowledgebases like ChemBL, OMIM, or DGIdb." ; @@ -139,6 +149,11 @@ infores:InformationResource a owl:Class ; rdfs:subClassOf infores:KnowledgeLevelEnum, linkml:PermissibleValue . + a owl:Class ; + rdfs:label "knowledge_assertion" ; + rdfs:subClassOf infores:KnowledgeLevelEnum, + linkml:PermissibleValue . + a owl:Class ; rdfs:label "mixed" ; rdfs:subClassOf infores:KnowledgeLevelEnum, @@ -159,6 +174,11 @@ infores:InformationResource a owl:Class ; rdfs:subClassOf infores:KnowledgeLevelEnum, linkml:PermissibleValue . + a owl:Class ; + rdfs:label "statistical_association" ; + rdfs:subClassOf infores:KnowledgeLevelEnum, + linkml:PermissibleValue . + a owl:Class ; rdfs:label "text_mined" ; rdfs:subClassOf infores:KnowledgeLevelEnum, @@ -228,8 +248,10 @@ infores:status a owl:ObjectProperty ; infores:AgentTypeEnum a owl:Class ; rdfs:subClassOf linkml:EnumDefinition ; - owl:unionOf ( ) ; + owl:unionOf ( ) ; linkml:permissible_values , + , + , . infores:InformationResourceStatusEnum a owl:Class ; @@ -242,13 +264,15 @@ infores:InformationResourceStatusEnum a owl:Class ; infores:KnowledgeLevelEnum a owl:Class ; rdfs:subClassOf linkml:EnumDefinition ; - owl:unionOf ( ) ; + owl:unionOf ( ) ; linkml:permissible_values , , + , , , , , + , . diff --git a/project/shacl/information_resource_registry.shacl.ttl b/project/shacl/information_resource_registry.shacl.ttl index f742d54..b108499 100644 --- a/project/shacl/information_resource_registry.shacl.ttl +++ b/project/shacl/information_resource_registry.shacl.ttl @@ -19,44 +19,44 @@ infores:InformationResource a sh:NodeShape ; sh:closed true ; sh:description "A database or knowledgebase and its supporting ecosystem of interfaces and services that deliver content to consumers (e.g. web portals, APIs, query endpoints, streaming services, data downloads, etc.). A single Information Resource by this definition may span many different datasets or databases, and include many access endpoints and user interfaces. Information Resources include project-specific resources such as a Translator Knowledge Provider, and community knowledgebases like ChemBL, OMIM, or DGIdb." ; sh:ignoredProperties ( rdf:type ) ; - sh:property [ sh:description "the status of the infores identifier, the default is \"released\"" ; + sh:property [ sh:datatype xsd:string ; + sh:description "A database cross reference or alternative identifier for a NamedThing or edge between two NamedThings. This property should point to a database record or webpage that supports the existence of the edge, or gives more detail about the edge. This property can be used on a node or edge to provide multiple URIs or CURIE cross references." ; + sh:order 3 ; + sh:path infores:xref ], + [ sh:description "the status of the infores identifier, the default is \"released\"" ; sh:in ( "released" "deprecated" "draft" "modified" ) ; sh:maxCount 1 ; sh:order 0 ; sh:path infores:status ], [ sh:datatype xsd:string ; - sh:description "A human-readable name for an attribute or entity." ; - sh:maxCount 1 ; - sh:order 1 ; - sh:path rdfs:label ], - [ sh:description "The type of agent that supports an edge or node. This is a general categorization of the type of agent that supports a statement, and is not intended to be a comprehensive description of the agent. For example, a statement may be supported by a single publication, but that publication may contain multiple types of evidence, such as a computational prediction and a manual curation. In this case, the agent type would be \"publication\", and the evidence would be described in more detail in the evidence graph." ; - sh:in ( "not_provided" "computational_model" ) ; + sh:description "A unique identifier for an entity. Must be either a CURIE shorthand for a URI or a complete URI" ; sh:maxCount 1 ; - sh:order 7 ; - sh:path infores:agent_type ], + sh:minCount 1 ; + sh:order 2 ; + sh:path infores:id ], [ sh:datatype xsd:string ; sh:description "Alternate human-readable names for a thing" ; sh:order 4 ; sh:path infores:synonym ], [ sh:datatype xsd:string ; - sh:description "A unique identifier for an entity. Must be either a CURIE shorthand for a URI or a complete URI" ; + sh:description "A free-text description of an entity or attribute." ; sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 2 ; - sh:path infores:id ], + sh:order 5 ; + sh:path rdfs:comment ], [ sh:datatype xsd:string ; - sh:description "A database cross reference or alternative identifier for a NamedThing or edge between two NamedThings. This property should point to a database record or webpage that supports the existence of the edge, or gives more detail about the edge. This property can be used on a node or edge to provide multiple URIs or CURIE cross references." ; - sh:order 3 ; - sh:path infores:xref ], + sh:description "A human-readable name for an attribute or entity." ; + sh:maxCount 1 ; + sh:order 1 ; + sh:path rdfs:label ], + [ sh:description "The type of agent that supports an edge or node. This is a general categorization of the type of agent that supports a statement, and is not intended to be a comprehensive description of the agent. For example, a statement may be supported by a single publication, but that publication may contain multiple types of evidence, such as a computational prediction and a manual curation. In this case, the agent type would be \"publication\", and the evidence would be described in more detail in the evidence graph." ; + sh:in ( "manual_agent" "not_provided" "computational_model" "data_analysis_pipeline" ) ; + sh:maxCount 1 ; + sh:order 7 ; + sh:path infores:agent_type ], [ sh:description "The level of knowledge that supports an edge or node. This is a general categorization of the type of evidence that supports a statement, and is not intended to be a comprehensive description of the evidence. For example, a statement may be supported by a single publication, but that publication may contain multiple types of evidence, such as a computational prediction and a manual curation. In this case, the knowledge level would be \"curated\", and the evidence would be described in more detail in the evidence graph." ; - sh:in ( "curated" "predicted" "text_mined" "correlation" "observed" "other" "mixed" ) ; + sh:in ( "knowledge_assertion" "statistical_association" "curated" "predicted" "text_mined" "correlation" "observed" "other" "mixed" ) ; sh:maxCount 1 ; sh:order 6 ; - sh:path infores:knowledge_level ], - [ sh:datatype xsd:string ; - sh:description "A free-text description of an entity or attribute." ; - sh:maxCount 1 ; - sh:order 5 ; - sh:path rdfs:comment ] ; + sh:path infores:knowledge_level ] ; sh:targetClass infores:InformationResource . diff --git a/project/shex/information_resource_registry.shex b/project/shex/information_resource_registry.shex index 732c467..6f12317 100644 --- a/project/shex/information_resource_registry.shex +++ b/project/shex/information_resource_registry.shex @@ -53,15 +53,19 @@ linkml:Sparqlpath xsd:string @linkml:String * ; @linkml:String * ; rdfs:comment @linkml:String ? ; - [ + [ + + ] ? ; - [ - ] ? + [ + + + ] ? ) ; rdf:type [ ] ? ) diff --git a/src/information_resource_registry/datamodel/information_resource_registry.py b/src/information_resource_registry/datamodel/information_resource_registry.py index e20641c..488b154 100644 --- a/src/information_resource_registry/datamodel/information_resource_registry.py +++ b/src/information_resource_registry/datamodel/information_resource_registry.py @@ -1,5 +1,5 @@ # Auto generated from information_resource_registry.yaml by pythongen.py version: 0.0.1 -# Generation date: 2024-06-09T17:47:33 +# Generation date: 2024-07-15T15:42:45 # Schema: Information-Resource-Registry-Schema # # id: https://w3id.org/biolink/information_resource_registry.yaml @@ -151,9 +151,15 @@ class KnowledgeLevelEnum(EnumDefinitionImpl): such as a computational prediction and a manual curation. In this case, the knowledge level would be "curated", and the evidence would be described in more detail in the evidence graph. """ + knowledge_assertion = PermissibleValue( + text="knowledge_assertion", + description="""knowledge asserted by a human expert, based on their interpretation of data or published study results""") + statistical_association = PermissibleValue( + text="statistical_association", + description="""statistical associations calculated between variables in a clinical or omics dataset, by an automated analysis pipeline""") curated = PermissibleValue( text="curated", - description="""knowledge generated through manual curation or interpretation of data or published study results""") + description="""knowledge generated through manual curation or interpretation of data or published study results""") predicted = PermissibleValue( text="predicted", description="""predictions generated computationally through inference over less direct forms of evidence (without human intervention or review)""") @@ -186,12 +192,18 @@ class AgentTypeEnum(EnumDefinitionImpl): computational prediction and a manual curation. In this case, the agent type would be "publication", and the evidence would be described in more detail in the evidence graph. """ + manual_agent = PermissibleValue( + text="manual_agent", + description="a human agent, such as a curator or expert") not_provided = PermissibleValue( text="not_provided", description="agent type is not provided or known") computational_model = PermissibleValue( text="computational_model", description="a computational model, such as a machine learning model") + data_analysis_pipeline = PermissibleValue( + text="data_analysis_pipeline", + description="a data analysis pipeline, such as a bioinformatics pipeline") _defn = EnumDefinition( name="AgentTypeEnum", diff --git a/src/information_resource_registry/datamodel/pydanticmodel.py b/src/information_resource_registry/datamodel/pydanticmodel.py index 2310b8e..cdce3a4 100644 --- a/src/information_resource_registry/datamodel/pydanticmodel.py +++ b/src/information_resource_registry/datamodel/pydanticmodel.py @@ -50,7 +50,11 @@ class KnowledgeLevelEnum(str, Enum): """ The level of knowledge that supports an edge or node. This is a general categorization of the type of evidence that supports a statement, and is not intended to be a comprehensive description of the evidence. For example, a statement may be supported by a single publication, but that publication may contain multiple types of evidence, such as a computational prediction and a manual curation. In this case, the knowledge level would be "curated", and the evidence would be described in more detail in the evidence graph. """ - # knowledge generated through manual curation or interpretation of data or published study results + # knowledge asserted by a human expert, based on their interpretation of data or published study results + knowledge_assertion = "knowledge_assertion" + # statistical associations calculated between variables in a clinical or omics dataset, by an automated analysis pipeline + statistical_association = "statistical_association" + # knowledge generated through manual curation or interpretation of data or published study results curated = "curated" # predictions generated computationally through inference over less direct forms of evidence (without human intervention or review) predicted = "predicted" @@ -71,10 +75,14 @@ class AgentTypeEnum(str, Enum): """ The type of agent that supports an edge or node. This is a general categorization of the type of agent that supports a statement, and is not intended to be a comprehensive description of the agent. For example, a statement may be supported by a single publication, but that publication may contain multiple types of evidence, such as a computational prediction and a manual curation. In this case, the agent type would be "publication", and the evidence would be described in more detail in the evidence graph. """ + # a human agent, such as a curator or expert + manual_agent = "manual_agent" # agent type is not provided or known not_provided = "not_provided" # a computational model, such as a machine learning model computational_model = "computational_model" + # a data analysis pipeline, such as a bioinformatics pipeline + data_analysis_pipeline = "data_analysis_pipeline" diff --git a/src/information_resource_registry/datamodel/pydanticmodel_v2.py b/src/information_resource_registry/datamodel/pydanticmodel_v2.py index 5f62cf4..f128c06 100644 --- a/src/information_resource_registry/datamodel/pydanticmodel_v2.py +++ b/src/information_resource_registry/datamodel/pydanticmodel_v2.py @@ -47,7 +47,11 @@ class KnowledgeLevelEnum(str, Enum): """ The level of knowledge that supports an edge or node. This is a general categorization of the type of evidence that supports a statement, and is not intended to be a comprehensive description of the evidence. For example, a statement may be supported by a single publication, but that publication may contain multiple types of evidence, such as a computational prediction and a manual curation. In this case, the knowledge level would be "curated", and the evidence would be described in more detail in the evidence graph. """ - # knowledge generated through manual curation or interpretation of data or published study results + # knowledge asserted by a human expert, based on their interpretation of data or published study results + knowledge_assertion = "knowledge_assertion" + # statistical associations calculated between variables in a clinical or omics dataset, by an automated analysis pipeline + statistical_association = "statistical_association" + # knowledge generated through manual curation or interpretation of data or published study results curated = "curated" # predictions generated computationally through inference over less direct forms of evidence (without human intervention or review) predicted = "predicted" @@ -68,10 +72,14 @@ class AgentTypeEnum(str, Enum): """ The type of agent that supports an edge or node. This is a general categorization of the type of agent that supports a statement, and is not intended to be a comprehensive description of the agent. For example, a statement may be supported by a single publication, but that publication may contain multiple types of evidence, such as a computational prediction and a manual curation. In this case, the agent type would be "publication", and the evidence would be described in more detail in the evidence graph. """ + # a human agent, such as a curator or expert + manual_agent = "manual_agent" # agent type is not provided or known not_provided = "not_provided" # a computational model, such as a machine learning model computational_model = "computational_model" + # a data analysis pipeline, such as a bioinformatics pipeline + data_analysis_pipeline = "data_analysis_pipeline" diff --git a/src/information_resource_registry/schema/information_resource_registry.yaml b/src/information_resource_registry/schema/information_resource_registry.yaml index 892ee36..307f8c5 100644 --- a/src/information_resource_registry/schema/information_resource_registry.yaml +++ b/src/information_resource_registry/schema/information_resource_registry.yaml @@ -165,9 +165,16 @@ enums: knowledge level would be "curated", and the evidence would be described in more detail in the evidence graph. permissible_values: + knowledge_assertion: + description: >- + knowledge asserted by a human expert, based on their interpretation of data or published study results + statistical_association: + description: >- + statistical associations calculated between variables in a clinical or omics dataset, by an automated + analysis pipeline curated: description: >- - knowledge generated through manual curation or interpretation of data or published study results + knowledge generated through manual curation or interpretation of data or published study results predicted: description: >- predictions generated computationally through inference over less direct forms of evidence (without human @@ -202,9 +209,15 @@ enums: agent type would be "publication", and the evidence would be described in more detail in the evidence graph. permissible_values: + manual_agent: + description: >- + a human agent, such as a curator or expert not_provided: description: >- agent type is not provided or known computational_model: description: >- a computational model, such as a machine learning model + data_analysis_pipeline: + description: >- + a data analysis pipeline, such as a bioinformatics pipeline diff --git a/src/information_resource_registry/scripts/verify_infores.py b/src/information_resource_registry/scripts/verify_infores.py index a1bc67f..e515534 100755 --- a/src/information_resource_registry/scripts/verify_infores.py +++ b/src/information_resource_registry/scripts/verify_infores.py @@ -65,13 +65,18 @@ def validate(self): "correlation", "observed", "other", - "mixed"]: + "mixed", + "statistical_association", + "knowledge_assertion"]: print(infores) print("Invalid infores knowledge level:" + infores.get("knowledge level") + " for " + infores.get("name")) raise ValueError("invalid knowledge level for " + infores.get("name") + " for " + infores.get("id")) - if infores.get("agent type") not in ["not_provided", "computational_model"]: + if infores.get("agent type") not in ["not_provided", + "computational_model", + "data_analysis_pipeline", + "manual_agent"]: print(infores) print("Invalid infores agent type:" + infores.get("agent type") + " for " + infores.get("name")) raise ValueError("invalid agent type for " + infores.get("name") + " for " + infores.get("id")) From f704831d3e21b31d5b798fcabfb91246f90be29d Mon Sep 17 00:00:00 2001 From: Sierra Taylor Moxon Date: Mon, 15 Jul 2024 15:52:19 -0700 Subject: [PATCH 3/4] fixing tests --- project/information_resource_registry.py | 2 +- ...formation_resource_registry.context.jsonld | 2 +- .../information_resource_registry.jsonld | 4 +- project/owl/information_resource.owl.ttl | 54 +++++++++---------- .../information_resource_registry.shacl.ttl | 46 ++++++++-------- .../information_resource_registry.py | 2 +- 6 files changed, 55 insertions(+), 55 deletions(-) diff --git a/project/information_resource_registry.py b/project/information_resource_registry.py index 8e41264..6f0e295 100644 --- a/project/information_resource_registry.py +++ b/project/information_resource_registry.py @@ -1,5 +1,5 @@ # Auto generated from information_resource_registry.yaml by pythongen.py version: 0.0.1 -# Generation date: 2024-07-15T15:46:55 +# Generation date: 2024-07-15T15:48:21 # Schema: Information-Resource-Registry-Schema # # id: https://w3id.org/biolink/information_resource_registry.yaml diff --git a/project/jsonld/information_resource_registry.context.jsonld b/project/jsonld/information_resource_registry.context.jsonld index 15c3565..33668f6 100644 --- a/project/jsonld/information_resource_registry.context.jsonld +++ b/project/jsonld/information_resource_registry.context.jsonld @@ -1,7 +1,7 @@ { "comments": { "description": "Auto generated by LinkML jsonld context generator", - "generation_date": "2024-07-15T15:46:54", + "generation_date": "2024-07-15T15:48:19", "source": "information_resource_registry.yaml" }, "@context": { diff --git a/project/jsonld/information_resource_registry.jsonld b/project/jsonld/information_resource_registry.jsonld index 48240d5..0f79fe1 100644 --- a/project/jsonld/information_resource_registry.jsonld +++ b/project/jsonld/information_resource_registry.jsonld @@ -628,9 +628,9 @@ ], "metamodel_version": "1.7.0", "source_file": "information_resource_registry.yaml", - "source_file_date": "2024-07-15T15:42:31", + "source_file_date": "2024-07-15T15:47:44", "source_file_size": 8462, - "generation_date": "2024-07-15T15:46:54", + "generation_date": "2024-07-15T15:48:19", "@type": "SchemaDefinition", "@context": [ "project/jsonld/information_resource_registry.context.jsonld", diff --git a/project/owl/information_resource.owl.ttl b/project/owl/information_resource.owl.ttl index 67f8190..1d27371 100644 --- a/project/owl/information_resource.owl.ttl +++ b/project/owl/information_resource.owl.ttl @@ -12,10 +12,10 @@ infores:InformationResourceContainer a owl:Class ; rdfs:label "InformationResourceContainer" ; rdfs:subClassOf [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom infores:InformationResource ; owl:onProperty infores:information_resources ], [ a owl:Restriction ; - owl:allValuesFrom infores:InformationResource ; + owl:minCardinality 0 ; owl:onProperty infores:information_resources ], linkml:ClassDefinition ; skos:definition "A collection of information resources" ; @@ -49,41 +49,41 @@ biolink:information_resource_registry.yaml.owl.ttl a owl:Ontology ; infores:InformationResource a owl:Class ; rdfs:label "InformationResource" ; rdfs:subClassOf [ a owl:Restriction ; - owl:minCardinality 0 ; + owl:allValuesFrom xsd:string ; owl:onProperty infores:xref ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty infores:synonym ], - [ a owl:Restriction ; - owl:allValuesFrom infores:InformationResourceStatusEnum ; - owl:onProperty infores:status ], + owl:onProperty infores:id ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty infores:name ], + [ a owl:Restriction ; + owl:allValuesFrom infores:AgentTypeEnum ; + owl:onProperty infores:agent_type ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty infores:id ], + owl:onProperty infores:knowledge_level ], [ a owl:Restriction ; - owl:minCardinality 0 ; - owl:onProperty infores:synonym ], + owl:maxCardinality 1 ; + owl:onProperty infores:status ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty infores:description ], + owl:onProperty infores:name ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty infores:description ], + owl:onProperty infores:status ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty infores:knowledge_level ], + owl:onProperty infores:xref ], [ a owl:Restriction ; - owl:allValuesFrom infores:AgentTypeEnum ; - owl:onProperty infores:agent_type ], + owl:minCardinality 0 ; + owl:onProperty infores:knowledge_level ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; owl:onProperty infores:description ], [ a owl:Restriction ; owl:maxCardinality 1 ; - owl:onProperty infores:agent_type ], + owl:onProperty infores:id ], [ a owl:Restriction ; owl:allValuesFrom infores:KnowledgeLevelEnum ; owl:onProperty infores:knowledge_level ], @@ -92,28 +92,28 @@ infores:InformationResource a owl:Class ; owl:onProperty infores:name ], [ a owl:Restriction ; owl:allValuesFrom xsd:string ; - owl:onProperty infores:id ], + owl:onProperty infores:synonym ], [ a owl:Restriction ; - owl:allValuesFrom xsd:string ; - owl:onProperty infores:xref ], + owl:maxCardinality 1 ; + owl:onProperty infores:description ], [ a owl:Restriction ; owl:maxCardinality 1 ; + owl:onProperty infores:agent_type ], + [ a owl:Restriction ; + owl:allValuesFrom infores:InformationResourceStatusEnum ; owl:onProperty infores:status ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty infores:knowledge_level ], + owl:minCardinality 1 ; + owl:onProperty infores:id ], [ a owl:Restriction ; - owl:maxCardinality 1 ; - owl:onProperty infores:name ], + owl:minCardinality 0 ; + owl:onProperty infores:synonym ], [ a owl:Restriction ; owl:minCardinality 0 ; - owl:onProperty infores:status ], + owl:onProperty infores:description ], [ a owl:Restriction ; owl:minCardinality 0 ; owl:onProperty infores:agent_type ], - [ a owl:Restriction ; - owl:minCardinality 1 ; - owl:onProperty infores:id ], linkml:ClassDefinition ; skos:altLabel "knowledgebase" ; skos:definition "A database or knowledgebase and its supporting ecosystem of interfaces and services that deliver content to consumers (e.g. web portals, APIs, query endpoints, streaming services, data downloads, etc.). A single Information Resource by this definition may span many different datasets or databases, and include many access endpoints and user interfaces. Information Resources include project-specific resources such as a Translator Knowledge Provider, and community knowledgebases like ChemBL, OMIM, or DGIdb." ; diff --git a/project/shacl/information_resource_registry.shacl.ttl b/project/shacl/information_resource_registry.shacl.ttl index 2f542bd..2b91933 100644 --- a/project/shacl/information_resource_registry.shacl.ttl +++ b/project/shacl/information_resource_registry.shacl.ttl @@ -20,43 +20,43 @@ infores:InformationResource a sh:NodeShape ; sh:description "A database or knowledgebase and its supporting ecosystem of interfaces and services that deliver content to consumers (e.g. web portals, APIs, query endpoints, streaming services, data downloads, etc.). A single Information Resource by this definition may span many different datasets or databases, and include many access endpoints and user interfaces. Information Resources include project-specific resources such as a Translator Knowledge Provider, and community knowledgebases like ChemBL, OMIM, or DGIdb." ; sh:ignoredProperties ( rdf:type ) ; sh:property [ sh:datatype xsd:string ; - sh:description "A unique identifier for an entity. Must be either a CURIE shorthand for a URI or a complete URI" ; + sh:description "A human-readable name for an attribute or entity." ; sh:maxCount 1 ; - sh:minCount 1 ; - sh:order 2 ; - sh:path infores:id ], + sh:order 1 ; + sh:path rdfs:label ], + [ sh:description "the status of the infores identifier, the default is \"released\"" ; + sh:in ( "released" "deprecated" "draft" "modified" ) ; + sh:maxCount 1 ; + sh:order 0 ; + sh:path infores:status ], [ sh:datatype xsd:string ; sh:description "A free-text description of an entity or attribute." ; sh:maxCount 1 ; sh:order 5 ; sh:path rdfs:comment ], - [ sh:datatype xsd:string ; - sh:description "A database cross reference or alternative identifier for a NamedThing or edge between two NamedThings. This property should point to a database record or webpage that supports the existence of the edge, or gives more detail about the edge. This property can be used on a node or edge to provide multiple URIs or CURIE cross references." ; - sh:order 3 ; - sh:path infores:xref ], [ sh:description "The type of agent that supports an edge or node. This is a general categorization of the type of agent that supports a statement, and is not intended to be a comprehensive description of the agent. For example, a statement may be supported by a single publication, but that publication may contain multiple types of evidence, such as a computational prediction and a manual curation. In this case, the agent type would be \"publication\", and the evidence would be described in more detail in the evidence graph." ; sh:in ( "manual_agent" "not_provided" "computational_model" "data_analysis_pipeline" ) ; sh:maxCount 1 ; sh:order 7 ; sh:path infores:agent_type ], - [ sh:description "the status of the infores identifier, the default is \"released\"" ; - sh:in ( "released" "deprecated" "draft" "modified" ) ; - sh:maxCount 1 ; - sh:order 0 ; - sh:path infores:status ], - [ sh:datatype xsd:string ; - sh:description "Alternate human-readable names for a thing" ; - sh:order 4 ; - sh:path infores:synonym ], - [ sh:datatype xsd:string ; - sh:description "A human-readable name for an attribute or entity." ; - sh:maxCount 1 ; - sh:order 1 ; - sh:path rdfs:label ], [ sh:description "The level of knowledge that supports an edge or node. This is a general categorization of the type of evidence that supports a statement, and is not intended to be a comprehensive description of the evidence. For example, a statement may be supported by a single publication, but that publication may contain multiple types of evidence, such as a computational prediction and a manual curation. In this case, the knowledge level would be \"curated\", and the evidence would be described in more detail in the evidence graph." ; sh:in ( "knowledge_assertion" "statistical_association" "curated" "predicted" "text_mined" "correlation" "observed" "other" "mixed" ) ; sh:maxCount 1 ; sh:order 6 ; - sh:path infores:knowledge_level ] ; + sh:path infores:knowledge_level ], + [ sh:datatype xsd:string ; + sh:description "A unique identifier for an entity. Must be either a CURIE shorthand for a URI or a complete URI" ; + sh:maxCount 1 ; + sh:minCount 1 ; + sh:order 2 ; + sh:path infores:id ], + [ sh:datatype xsd:string ; + sh:description "A database cross reference or alternative identifier for a NamedThing or edge between two NamedThings. This property should point to a database record or webpage that supports the existence of the edge, or gives more detail about the edge. This property can be used on a node or edge to provide multiple URIs or CURIE cross references." ; + sh:order 3 ; + sh:path infores:xref ], + [ sh:datatype xsd:string ; + sh:description "Alternate human-readable names for a thing" ; + sh:order 4 ; + sh:path infores:synonym ] ; sh:targetClass infores:InformationResource . diff --git a/src/information_resource_registry/datamodel/information_resource_registry.py b/src/information_resource_registry/datamodel/information_resource_registry.py index 4db5016..282f7bc 100644 --- a/src/information_resource_registry/datamodel/information_resource_registry.py +++ b/src/information_resource_registry/datamodel/information_resource_registry.py @@ -1,5 +1,5 @@ # Auto generated from information_resource_registry.yaml by pythongen.py version: 0.0.1 -# Generation date: 2024-07-15T15:47:06 +# Generation date: 2024-07-15T15:48:30 # Schema: Information-Resource-Registry-Schema # # id: https://w3id.org/biolink/information_resource_registry.yaml From b98c1b5e1788523c14e5652c7b771ada4126db15 Mon Sep 17 00:00:00 2001 From: Sierra Taylor Moxon Date: Mon, 15 Jul 2024 15:52:43 -0700 Subject: [PATCH 4/4] regenerating python project files --- .../datamodel/information_resource_registry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/information_resource_registry/datamodel/information_resource_registry.py b/src/information_resource_registry/datamodel/information_resource_registry.py index 282f7bc..7085188 100644 --- a/src/information_resource_registry/datamodel/information_resource_registry.py +++ b/src/information_resource_registry/datamodel/information_resource_registry.py @@ -1,5 +1,5 @@ # Auto generated from information_resource_registry.yaml by pythongen.py version: 0.0.1 -# Generation date: 2024-07-15T15:48:30 +# Generation date: 2024-07-15T15:52:30 # Schema: Information-Resource-Registry-Schema # # id: https://w3id.org/biolink/information_resource_registry.yaml