diff options
author | Frederick Muriuki Muriithi | 2023-11-30 10:25:02 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-11-30 10:25:02 +0300 |
commit | 9d167a5fa97480d813b16fd1420349af2008071f (patch) | |
tree | 31b81a6528e2353425fd4e438706aff9a4c93e7f | |
parent | ad7f0b3cf99ec37be96b819dacd927be86df91ff (diff) | |
download | gn-uploader-9d167a5fa97480d813b16fd1420349af2008071f.tar.gz |
Bug: Fix insertion error
Fix a bug that was causing the data insertion to fail.
-rw-r--r-- | scripts/insert_data.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/scripts/insert_data.py b/scripts/insert_data.py index 4dbf27c..63e85ef 100644 --- a/scripts/insert_data.py +++ b/scripts/insert_data.py @@ -169,8 +169,7 @@ def insert_probesets(filepath: str, print() cursor.executemany(probeset_query, probeset_params) probeset_names = probeset_names + tuple( - name[0:name.index("::RAND_")] for name in ( - row["Name"] for row in probeset_params)) + row["Name"] for row in probeset_params) return probeset_names @@ -211,9 +210,8 @@ def insert_means(# pylint: disable=[too-many-locals, too-many-arguments] # which means that we cannot have 2 (or more) ProbeSets which share both # the name and chip_id (platform) at the same time. rand_str = f"::RAND_{random_string()}" - pset_ids = {# pylint: disable=[unnecessary-comprehension] - # Look into simply doing dict(probeset_ids(...)) - name: pset_id + pset_ids = { + name[0:name.index("::RAND_")]: pset_id for name, pset_id in probeset_ids( dbconn, platform_id, |