aboutsummaryrefslogtreecommitdiff
path: root/scripts/insert_data.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-11-30 10:25:02 +0300
committerFrederick Muriuki Muriithi2023-11-30 10:25:02 +0300
commit9d167a5fa97480d813b16fd1420349af2008071f (patch)
tree31b81a6528e2353425fd4e438706aff9a4c93e7f /scripts/insert_data.py
parentad7f0b3cf99ec37be96b819dacd927be86df91ff (diff)
downloadgn-uploader-9d167a5fa97480d813b16fd1420349af2008071f.tar.gz
Bug: Fix insertion error
Fix a bug that was causing the data insertion to fail.
Diffstat (limited to 'scripts/insert_data.py')
-rw-r--r--scripts/insert_data.py8
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,