From 9e7c5761a1f9ba089ac700ee1a7a02d7c17683e1 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Mon, 16 Oct 2023 14:44:25 +0300 Subject: Fix bug: Provide the platform_id to `insert_means` --- scripts/insert_data.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'scripts') 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), -- cgit v1.2.3