diff --git a/app/app/plover.py b/app/app/plover.py index 62dd21f..2110a5d 100644 --- a/app/app/plover.py +++ b/app/app/plover.py @@ -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"]] diff --git a/app/config_kg2c.json b/app/config_kg2c.json index ab7a138..38dae34 100644 --- a/app/config_kg2c.json +++ b/app/config_kg2c.json @@ -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", @@ -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": {}