From 67472b942129130ea77cb0a15e14ef42fd4d3b91 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Tue, 21 Jun 2016 09:55:11 +0000 Subject: Logger: switch for logging SQLALCHEMY --- wqflask/dbFunction/webqtlDatabaseFunction.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'wqflask/dbFunction') diff --git a/wqflask/dbFunction/webqtlDatabaseFunction.py b/wqflask/dbFunction/webqtlDatabaseFunction.py index b14c9312..846d5146 100644 --- a/wqflask/dbFunction/webqtlDatabaseFunction.py +++ b/wqflask/dbFunction/webqtlDatabaseFunction.py @@ -80,16 +80,11 @@ def retrieve_species(group): result = fetchone("select Species.Name from Species, InbredSet where InbredSet.Name = '%s' and InbredSet.SpeciesId = Species.Id" % (group)) return result[0] -########################################################################### -#input: cursor, groupName (string) -#output: mappingMethodId (int) info, value will be Null or else -#function: retrieve mappingMethodId info from InbredSet table -########################################################################### - def getMappingMethod(cursor=None, groupName=None): - cursor.execute("select MappingMethodId from InbredSet where Name= '%s'" % groupName) - mappingMethodId = cursor.fetchone()[0] - return mappingMethodId + if USE_GN_SERVER: + return gn_server("/cross/"+group+".json")["mapping_method_id"] + else: + return fetchone("select MappingMethodId from InbredSet where Name= '%s'" % groupName) ########################################################################### #input: cursor, inbredSetId (int), strainId (int) -- cgit v1.2.3