diff options
author | Frederick Muriuki Muriithi | 2025-03-26 16:02:02 -0500 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2025-03-26 16:02:02 -0500 |
commit | 9337909f5d9e3eb2b094988d0083b6f37a47c8cd (patch) | |
tree | e5387ba6d6c6f239ffb14d35df9301a3304bb8e5 | |
parent | aec3fdf6dc62b3976163850e5857d5e4a0544b98 (diff) | |
download | gn-uploader-9337909f5d9e3eb2b094988d0083b6f37a47c8cd.tar.gz |
Add function to compute publication differences.
-rw-r--r-- | scripts/phenotypes_bulk_edit.py | 11 |
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 |