aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2025-03-26 16:02:02 -0500
committerFrederick Muriuki Muriithi2025-03-26 16:02:02 -0500
commit9337909f5d9e3eb2b094988d0083b6f37a47c8cd (patch)
treee5387ba6d6c6f239ffb14d35df9301a3304bb8e5 /scripts
parentaec3fdf6dc62b3976163850e5857d5e4a0544b98 (diff)
downloadgn-uploader-9337909f5d9e3eb2b094988d0083b6f37a47c8cd.tar.gz
Add function to compute publication differences.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/phenotypes_bulk_edit.py11
1 files changed, 11 insertions, 0 deletions
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