aboutsummaryrefslogtreecommitdiff
path: root/wqflask/dbFunction/webqtlDatabaseFunction.py
diff options
context:
space:
mode:
authorPjotr Prins2016-06-21 09:55:11 +0000
committerPjotr Prins2016-06-21 09:55:11 +0000
commit67472b942129130ea77cb0a15e14ef42fd4d3b91 (patch)
tree7c24d7caf3fd79bcb9ac673978adc53447165141 /wqflask/dbFunction/webqtlDatabaseFunction.py
parent74ab1eff68fdad4183ce2a7490cfbc9ac1f4513f (diff)
downloadgenenetwork2-67472b942129130ea77cb0a15e14ef42fd4d3b91.tar.gz
Logger: switch for logging SQLALCHEMY
Diffstat (limited to 'wqflask/dbFunction/webqtlDatabaseFunction.py')
-rw-r--r--wqflask/dbFunction/webqtlDatabaseFunction.py13
1 files changed, 4 insertions, 9 deletions
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)