From 9337909f5d9e3eb2b094988d0083b6f37a47c8cd Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Wed, 26 Mar 2025 16:02:02 -0500 Subject: Add function to compute publication differences. --- scripts/phenotypes_bulk_edit.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'scripts') diff --git a/scripts/phenotypes_bulk_edit.py b/scripts/phenotypes_bulk_edit.py index 175282e..269f15e 100644 --- a/scripts/phenotypes_bulk_edit.py +++ b/scripts/phenotypes_bulk_edit.py @@ -135,6 +135,17 @@ def __fetch_new_pubmed_ids__(pubmed_ids): return tuple() +def publications_differences(file_data, db_data, pubmed_ids): + """Compute differences in the publications.""" + logger.info("Computing differences in publications.") + db_pubmed_ids = reduce(lambda coll, curr: coll.union(set([curr["PubMed_ID"]])), + db_data, + set([None])) + new_pubmeds = __fetch_new_pubmed_ids__(tuple( + pubmed_ids.difference(db_pubmed_ids))) + pass + + """Compute differences between data in DB and edited data.""" logger.info("Computing differences.") # 1. Basic Phenotype data differences -- cgit v1.2.3