diff options
author | Frederick Muriuki Muriithi | 2024-03-22 06:56:16 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-03-22 06:56:16 +0300 |
commit | 51b349d6acf11b2807b191c2b8e50d4315eb69b0 (patch) | |
tree | a7ec170cb5eccad90593b8b040f3765a87a572b5 /scripts | |
parent | 3e48d8020029d6a98fcb056366d145277f22fc61 (diff) | |
download | gn-uploader-51b349d6acf11b2807b191c2b8e50d4315eb69b0.tar.gz |
Map names in files to names in database.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/insert_data.py | 5 |
1 files changed, 4 insertions, 1 deletions
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() |