From 19acd75e0382ce3a680e4a1570aca8e4b92c0e17 Mon Sep 17 00:00:00 2001 From: "E.C. Wood" Date: Mon, 17 Jul 2023 09:29:15 -0700 Subject: [PATCH] #281 need to start by getting category information on semmed nodes for filtering --- semmeddb_mysql_to_tuple_list_json.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/semmeddb_mysql_to_tuple_list_json.py b/semmeddb_mysql_to_tuple_list_json.py index 01a7832d..990471cd 100755 --- a/semmeddb_mysql_to_tuple_list_json.py +++ b/semmeddb_mysql_to_tuple_list_json.py @@ -45,15 +45,17 @@ def make_arg_parser(): test_mode = args.test connection = pymysql.connect(read_default_file=mysql_config_file, db=mysql_db_name) preds_dict = dict() - sql_statement = ("SELECT PMID, SUBJECT_CUI, PREDICATE, OBJECT_CUI, DP, SENTENCE, SUBJECT_SCORE, " + sql_statement = ("SELECT PMID, SUBJECT_CUI, SUBJECT_SEMTYPE, PREDICATE, OBJECT_CUI, OBJECT_SEMTYPE, DP, SENTENCE, SUBJECT_SCORE, " "OBJECT_SCORE, DATE_FORMAT(CURR_TIMESTAMP, '%Y-%m-%d %H:%i:%S') FROM ((PREDICATION NATURAL JOIN CITATIONS) " "NATURAL JOIN SENTENCE) NATURAL JOIN PREDICATION_AUX") if test_mode: sql_statement += " LIMIT 10000" results = {'data_dictionary': ['pmid', 'subject_cui_str', + 'subject_semtype', 'predicate', 'object_cui_str', + 'object_semtype', 'pub_date', 'sentence', 'subject_score',