From 51b349d6acf11b2807b191c2b8e50d4315eb69b0 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Fri, 22 Mar 2024 06:56:16 +0300 Subject: Map names in files to names in database. --- scripts/insert_data.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/insert_data.py b/scripts/insert_data.py index efe81df..a60426a 100644 --- a/scripts/insert_data.py +++ b/scripts/insert_data.py @@ -280,8 +280,11 @@ def insert_se(# pylint: disable = [too-many-arguments] file=sys.stderr) return 1 + namemappings = { + _key[0:_key.find("::RAND_")]: _key for _key in annotations.keys() + } se_values = ( - {"DataId": annotations[str(item["ProbeSetName"])]["DataId"], **item} + {"DataId": annotations[namemappings[str(item["ProbeSetName"])]]["DataId"], **item} for item in ( row for psrows in read_datavalues(filepath, headings, strains).values() -- cgit v1.2.3