Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/kg2.10.1c' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
amykglen committed Oct 11, 2024
2 parents 4331e9b + 9d689ab commit a11d884
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 11 deletions.
6 changes: 5 additions & 1 deletion app/app/plover.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,16 @@ def build_indexes(self):
if "qualified_object_aspect" in edge:
edge[self.graph_object_aspect_property] = edge["qualified_object_aspect"]
del edge["qualified_object_aspect"]
# TODO: Remove this patch after these KG2.10.1pre issues are fixed in future KG2pre versions
edge["predicate"] = edge["predicate"].replace("biolink:biolink_", "biolink:")
if edge["primary_knowledge_source"] == "infores:biothings-multiomics-clinicaltrials":
edge["primary_knowledge_source"] = "infores:multiomics-clinicaltrials"

# Zip up specified 'zip' columns to form a list of dicts (e.g., list of supporting studies)
if self.kg_config.get("zip"):
for zipped_prop_name, zipped_prop_info in self.kg_config["zip"].items():
for edge in edges:
# TODO: Remove this patch after CTKP TSVs are fixed..
# TODO: Add generalized way of handling this situation (not CTKP-specific)
if "tested_intervention" in zipped_prop_info["properties"]:
edge["tested_intervention"] = edge["tested_intervention"] * len(edge["nctid"])
zip_cols = [edge[property_name] for property_name in zipped_prop_info["properties"]]
Expand Down
28 changes: 18 additions & 10 deletions app/config_kg2c.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"nodes_file": "https://kg2webhost.rtx.ai/kg2c-2.10.0-v1.0-nodes.jsonl.gz",
"edges_file": "https://kg2webhost.rtx.ai/kg2c-2.10.0-v1.0-edges.jsonl.gz",
"nodes_file": "https://kg2webhost.rtx.ai/kg2c-2.10.1-v1.0-nodes.jsonl.gz",
"edges_file": "https://kg2webhost.rtx.ai/kg2c-2.10.1-v1.0-edges.jsonl.gz",
"biolink_version": "4.2.1",
"kp_infores_curie": "infores:rtx-kg2",
"endpoint_name": "kg2c",
Expand Down Expand Up @@ -30,38 +30,46 @@
},
"iri": {
"attribute_type_id": "biolink:IriType",
"value_type_id": "metatype:Uri"
"value_type_id": "metatype:Uri",
"attribute_source": "{kp_infores_curie}"
},
"description": {
"attribute_type_id": "biolink:description",
"value_type_id": "metatype:String"
"value_type_id": "metatype:String",
"attribute_source": "{kp_infores_curie}"
},
"all_categories": {
"attribute_type_id": "biolink:category",
"value_type_id": "metatype:Uriorcurie",
"description": "Categories of all nodes in this synonym set in RTX-KG2."
"description": "Categories of all nodes in this synonym set in RTX-KG2.",
"attribute_source": "{kp_infores_curie}"
},
"all_names": {
"attribute_type_id": "biolink:synonym",
"value_type_id": "metatype:String",
"description": "Names of all nodes in this synonym set in RTX-KG2."
"description": "Names of all nodes in this synonym set in RTX-KG2.",
"attribute_source": "{kp_infores_curie}"
},
"equivalent_curies": {
"attribute_type_id": "biolink:xref",
"value_type_id": "metatype:Nodeidentifier",
"description": "Identifiers of all nodes in this synonym set in RTX-KG2."
"description": "Identifiers of all nodes in this synonym set in RTX-KG2.",
"attribute_source": "{kp_infores_curie}"
},
"publications": {
"attribute_type_id": "biolink:publications",
"value_type_id": "biolink:Uriorcurie"
"value_type_id": "biolink:Uriorcurie",
"attribute_source": "{kp_infores_curie}"
},
"kg2_ids": {
"attribute_type_id": "biolink:original_predicate",
"value_type_id": "metatype:String",
"description": "The IDs of the original RTX-KG2pre edge(s) corresponding to this edge prior to any synonymization or remapping."
"description": "The IDs of the original RTX-KG2pre edge(s) corresponding to this edge prior to any synonymization or remapping.",
"attribute_source": "{kp_infores_curie}"
},
"publications_info": {
"attribute_type_id": "bts:sentence"
"attribute_type_id": "bts:sentence",
"attribute_source": "{kp_infores_curie}"
}
},
"sources_template": {}
Expand Down

0 comments on commit a11d884

Please sign in to comment.