diff options
author | Frederick Muriuki Muriithi | 2022-02-21 17:55:08 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2022-02-21 17:55:08 +0300 |
commit | 393700a432e25336c5afd1f008152202853f5bc2 (patch) | |
tree | 745e946f9441d33cfb4461e0dfc62c82baa40cc9 /gn3/db | |
parent | a35fce27875d9db80dce1976b6f8ee8c00ecfe0a (diff) | |
download | genenetwork3-393700a432e25336c5afd1f008152202853f5bc2.tar.gz |
Fix minor issues introduced while fixing linting errors
Diffstat (limited to 'gn3/db')
-rw-r--r-- | gn3/db/partial_correlations.py | 12 | ||||
-rw-r--r-- | gn3/db/traits.py | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/gn3/db/partial_correlations.py b/gn3/db/partial_correlations.py index a28b111..72dbf1a 100644 --- a/gn3/db/partial_correlations.py +++ b/gn3/db/partial_correlations.py @@ -48,7 +48,7 @@ def temp_traits_data(conn, traits): "FROM TempData, Temp, Strain " "WHERE TempData.StrainId = Strain.Id " "AND TempData.Id = Temp.DataId " - "AND Temp.name IN ({', '.join(['%s'] * len(traits))}) " + f"AND Temp.name IN ({', '.join(['%s'] * len(traits))}) " "ORDER BY Strain.Name") with conn.cursor(cursorclass=DictCursor) as cursor: cursor.execute( @@ -386,7 +386,7 @@ def temp_traits_info( """ query = ( "SELECT Name as trait_name, name, description FROM Temp " - "WHERE Name IN ({', '.join(['%s'] * len(traits))})") + f"WHERE Name IN ({', '.join(['%s'] * len(traits))})") with conn.cursor(cursorclass=DictCursor) as cursor: cursor.execute( query, @@ -450,7 +450,7 @@ def publish_datasets_groups(conn: Any, dataset_names: Tuple[str]): "InbredSet.Id " "FROM InbredSet, PublishFreeze " "WHERE PublishFreeze.InbredSetId = InbredSet.Id " - "AND PublishFreeze.Name IN ({', '.join(['%s'] * len(dataset_names))})") + f"AND PublishFreeze.Name IN ({', '.join(['%s'] * len(dataset_names))})") with conn.cursor(cursorclass=DictCursor) as cursor: cursor.execute(query, tuple(dataset_names)) return organise_groups_by_dataset(cursor.fetchall()) @@ -500,7 +500,7 @@ def probeset_datasets_groups(conn, dataset_names): "FROM InbredSet, ProbeSetFreeze, ProbeFreeze " "WHERE ProbeFreeze.InbredSetId = InbredSet.Id " "AND ProbeFreeze.Id = ProbeSetFreeze.ProbeFreezeId " - "AND ProbeSetFreeze.Name IN ({', '.join(['%s'] * len(dataset_names))})") + f"AND ProbeSetFreeze.Name IN ({', '.join(['%s'] * len(dataset_names))})") with conn.cursor(cursorclass=DictCursor) as cursor: cursor.execute(query, tuple(dataset_names)) return organise_groups_by_dataset(cursor.fetchall()) @@ -547,7 +547,7 @@ def geno_datasets_groups(conn, dataset_names): "SELECT GenoFreeze.Name AS dataset_name, InbredSet.Name, InbredSet.Id " "FROM InbredSet, GenoFreeze " "WHERE GenoFreeze.InbredSetId = InbredSet.Id " - "AND GenoFreeze.Name IN ({', '.join(['%s'] * len(dataset_names))})") + f"AND GenoFreeze.Name IN ({', '.join(['%s'] * len(dataset_names))})") with conn.cursor(cursorclass=DictCursor) as cursor: cursor.execute(query, tuple(dataset_names)) return organise_groups_by_dataset(cursor.fetchall()) @@ -575,7 +575,7 @@ def temp_datasets_groups(conn, dataset_names): "SELECT Temp.Name AS dataset_name, InbredSet.Name, InbredSet.Id " "FROM InbredSet, Temp " "WHERE Temp.InbredSetId = InbredSet.Id " - "AND Temp.Name IN ({', '.join(['%s'] * len(dataset_names))})") + f"AND Temp.Name IN ({', '.join(['%s'] * len(dataset_names))})") with conn.cursor(cursorclass=DictCursor) as cursor: cursor.execute(query, tuple(dataset_names)) return organise_groups_by_dataset(cursor.fetchall()) diff --git a/gn3/db/traits.py b/gn3/db/traits.py index 90d1e9d..6f979d8 100644 --- a/gn3/db/traits.py +++ b/gn3/db/traits.py @@ -402,7 +402,7 @@ def retrieve_probeset_trait_info(trait_data_source: Dict[str, Any], conn: Any): "probe_set_note_by_rw", "flag") columns = (f"ProbeSet.{x}" for x in keys) query = ( - f"SELECT {','.join(columns)} " + f"SELECT {', '.join(columns)} " "FROM " "ProbeSet, ProbeSetFreeze, ProbeSetXRef " "WHERE " |