aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-10-16 14:44:25 +0300
committerFrederick Muriuki Muriithi2023-10-16 14:44:25 +0300
commit9e7c5761a1f9ba089ac700ee1a7a02d7c17683e1 (patch)
tree3b8f566551f403d84ac76a92f13eb30401602519 /scripts
parent88e051bd31c491ffead08d4d4951945063835ab6 (diff)
downloadgn-uploader-9e7c5761a1f9ba089ac700ee1a7a02d7c17683e1.tar.gz
Fix bug: Provide the platform_id to `insert_means`
Diffstat (limited to 'scripts')
-rw-r--r--scripts/insert_data.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/insert_data.py b/scripts/insert_data.py
index f273c3a..7e27f93 100644
--- a/scripts/insert_data.py
+++ b/scripts/insert_data.py
@@ -126,8 +126,8 @@ def __format_query__(query, params):
return f"{insert_str}\nVALUES\n\t{values_str};"
def insert_means(
- filepath: str, speciesid: int, datasetid: int, dbconn: mdb.Connection,
- rconn: Redis) -> int: # pylint: disable=[unused-argument]
+ filepath: str, speciesid: int, platform_id: int, datasetid: int,
+ dbconn: mdb.Connection, rconn: Redis) -> int: # pylint: disable=[unused-argument]
"Insert the means/averages data into the database"
headings = read_file_headings(filepath)
strains = strains_info(dbconn, headings[1:], speciesid)
@@ -227,7 +227,8 @@ if __name__ == "__main__":
extract_args = {
"average": lambda args, dbconn, rconn: (
- args.filepath, args.speciesid, args.datasetid, dbconn, rconn),
+ args.filepath, args.speciesid, args.platformid, args.datasetid, dbconn,
+ rconn),
"standard-error": lambda args, dbconn, rconn: (
args.filepath, args.speciesid, args.platformid, args.datasetid,
dbconn, rconn),