diff options
author | BonfaceKilz | 2020-08-03 17:11:06 +0300 |
---|---|---|
committer | BonfaceKilz | 2020-08-03 17:12:08 +0300 |
commit | 549726ec3c4c176f855b65ade299701d1865b261 (patch) | |
tree | a6fe81fc68a3c65e12adbcde1086133a8e3dad06 | |
parent | 8fa2d7cc9d3d6599d1c44a6f5e76decf932b2cbd (diff) | |
download | genenetwork2-549726ec3c4c176f855b65ade299701d1865b261.tar.gz |
Remove "+" when concatenating strings
* wqflask/wqflask/api/gen_menu.py (build_types, build_datasets): Replace '+'
when joining strings inside brackets
-rw-r--r-- | wqflask/wqflask/api/gen_menu.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/wqflask/wqflask/api/gen_menu.py b/wqflask/wqflask/api/gen_menu.py index 45814ed9..cc11e14b 100644 --- a/wqflask/wqflask/api/gen_menu.py +++ b/wqflask/wqflask/api/gen_menu.py @@ -113,13 +113,13 @@ def build_types(species, group): """ - query = ("SELECT DISTINCT Tissue.Name " + - "FROM ProbeFreeze, ProbeSetFreeze, InbredSet, " + - "Tissue, Species WHERE Species.Name = '{0}' " + - "AND Species.Id = InbredSet.SpeciesId AND " + - "InbredSet.Name = '{1}' AND ProbeFreeze.TissueId = " + - "Tissue.Id AND ProbeFreeze.InbredSetId = InbredSet.Id " + - "AND ProbeSetFreeze.ProbeFreezeId = ProbeFreeze.Id " + + query = ("SELECT DISTINCT Tissue.Name " + "FROM ProbeFreeze, ProbeSetFreeze, InbredSet, " + "Tissue, Species WHERE Species.Name = '{0}' " + "AND Species.Id = InbredSet.SpeciesId AND " + "InbredSet.Name = '{1}' AND ProbeFreeze.TissueId = " + "Tissue.Id AND ProbeFreeze.InbredSetId = InbredSet.Id " + "AND ProbeSetFreeze.ProbeFreezeId = ProbeFreeze.Id " "ORDER BY Tissue.Name").format(species, group) results = [] @@ -154,11 +154,11 @@ def build_datasets(species, group, type_name): datasets = [] if type_name == "Phenotypes": results = g.db.execute( - ("SELECT InfoFiles.GN_AccesionId, PublishFreeze.Name, " + - "PublishFreeze.FullName FROM InfoFiles, PublishFreeze, " + - "InbredSet WHERE InbredSet.Name = '{}' AND " + - "PublishFreeze.InbredSetId = InbredSet.Id AND " + - "InfoFiles.InfoPageName = PublishFreeze.Name " + + ("SELECT InfoFiles.GN_AccesionId, PublishFreeze.Name, " + "PublishFreeze.FullName FROM InfoFiles, PublishFreeze, " + "InbredSet WHERE InbredSet.Name = '{}' AND " + "PublishFreeze.InbredSetId = InbredSet.Id AND " + "InfoFiles.InfoPageName = PublishFreeze.Name " "ORDER BY PublishFreeze.CreateTime ASC").format(group)).fetchall() if bool(results): for result in results: |