From 93c1742a91c478667b8645c458cce2108eb24b14 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Thu, 23 Jun 2016 05:20:34 +0000 Subject: Refactored dir name dbFunction to db --- wqflask/base/data_set.py | 2 +- wqflask/base/trait.py | 2 +- .../basicStatistics/BasicStatisticsFunctions.py | 2 +- wqflask/db/__init__.py | 0 wqflask/db/webqtlDatabaseFunction.py | 267 +++++++++++++++++++++ wqflask/dbFunction/__init__.py | 0 wqflask/dbFunction/webqtlDatabaseFunction.py | 267 --------------------- .../wqflask/correlation/correlation_functions.py | 2 +- wqflask/wqflask/correlation/show_corr_results.py | 2 +- .../wqflask/correlation_matrix/show_corr_matrix.py | 2 +- wqflask/wqflask/do_search.py | 4 +- wqflask/wqflask/gsearch.py | 2 +- .../marker_regression/MarkerRegressionPage.py | 2 +- wqflask/wqflask/search_results.py | 2 +- wqflask/wqflask/show_trait/show_trait.py | 2 +- wqflask/wqflask/update_search_results.py | 2 +- 16 files changed, 280 insertions(+), 280 deletions(-) create mode 100644 wqflask/db/__init__.py create mode 100644 wqflask/db/webqtlDatabaseFunction.py delete mode 100644 wqflask/dbFunction/__init__.py delete mode 100644 wqflask/dbFunction/webqtlDatabaseFunction.py (limited to 'wqflask') diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py index f75447f6..a7b6e402 100644 --- a/wqflask/base/data_set.py +++ b/wqflask/base/data_set.py @@ -40,7 +40,7 @@ import reaper from base import webqtlConfig from base import species -from dbFunction import webqtlDatabaseFunction +from db import webqtlDatabaseFunction from utility import webqtlUtil from utility.benchmark import Bench from utility import chunks diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py index b51b8c72..3dc4ddda 100644 --- a/wqflask/base/trait.py +++ b/wqflask/base/trait.py @@ -9,7 +9,7 @@ from htmlgen import HTMLgen2 as HT from base import webqtlConfig from base.webqtlCaseData import webqtlCaseData from base.data_set import create_dataset -from dbFunction import webqtlDatabaseFunction +from db import webqtlDatabaseFunction from utility import webqtlUtil from wqflask import app diff --git a/wqflask/basicStatistics/BasicStatisticsFunctions.py b/wqflask/basicStatistics/BasicStatisticsFunctions.py index e748a822..1e5646a1 100644 --- a/wqflask/basicStatistics/BasicStatisticsFunctions.py +++ b/wqflask/basicStatistics/BasicStatisticsFunctions.py @@ -16,7 +16,7 @@ from htmlgen import HTMLgen2 as HT #from utility import Plot from utility import webqtlUtil from base import webqtlConfig -from dbFunction import webqtlDatabaseFunction +from db import webqtlDatabaseFunction def basicStatsTable(vals, trait_type=None, cellid=None, heritability=None): print("basicStatsTable called - len of vals", len(vals)) diff --git a/wqflask/db/__init__.py b/wqflask/db/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/wqflask/db/webqtlDatabaseFunction.py b/wqflask/db/webqtlDatabaseFunction.py new file mode 100644 index 00000000..e30929d2 --- /dev/null +++ b/wqflask/db/webqtlDatabaseFunction.py @@ -0,0 +1,267 @@ +# Copyright (C) University of Tennessee Health Science Center, Memphis, TN. +# +# This program is free software: you can redistribute it and/or modify it +# under the terms of the GNU Affero General Public License +# as published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the GNU Affero General Public License for more details. +# +# This program is available from Source Forge: at GeneNetwork Project +# (sourceforge.net/projects/genenetwork/). +# +# Contact Drs. Robert W. Williams and Xiaodong Zhou (2010) +# at rwilliams@uthsc.edu and xzhou15@uthsc.edu +# +# +# +# This module is used by GeneNetwork project (www.genenetwork.org) + +from inspect import stack +from flask import Flask, g + +import MySQLdb +import string +import urllib2 +import json +from base import webqtlConfig +from utility.tools import USE_GN_SERVER, LOG_SQL +from utility.benchmark import Bench + +from utility.logger import getLogger +logger = getLogger(__name__ ) + +########################################################################### +#output: cursor instance +#function: connect to database and return cursor instance +########################################################################### +def getCursor(): + try: + logger.warning("Creating new MySQLdb cursor") + con = MySQLdb.Connect(db=webqtlConfig.DB_NAME, host=webqtlConfig.MYSQL_SERVER, user=webqtlConfig.DB_USER, passwd=webqtlConfig.DB_PASSWD) + cursor = con.cursor() + return cursor + except: + return None + +def fetchone(query): + """Return tuple containing one row by calling SQL directly + + """ + with Bench("SQL",LOG_SQL): + def helper(query): + res = g.db.execute(query) + return res.fetchone() + callername = stack()[1][3] + return logger.sql(callername, query, helper) + +def gn_server(path): + """Return JSON record by calling GN_SERVER + + """ + with Bench("GN_SERVER",LOG_SQL): + res = urllib2.urlopen("http://localhost:8880/"+path) + rest = res.read() + res2 = json.loads(rest) + logger.info(res2) + return res2 + +def retrieve_species(group): + """Get the species of a group (e.g. returns string "mouse" on "BXD" + + """ + if USE_GN_SERVER: + result = gn_server("/cross/"+group+".json") + return result["species"] + else: + result = fetchone("select Species.Name from Species, InbredSet where InbredSet.Name = '%s' and InbredSet.SpeciesId = Species.Id" % (group)) + return result[0] + +def getMappingMethod(cursor=None, groupName=None): + 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) +#output: isMappingId (bull) info, value will be 0,1,2 or else, 0 or Null means +# "can not do mapping", >0 means "can do mapping", >1 means "there exsists +# redundant data, user needs to choose one to do mapping function" +#function: retrieve isMappingId info from StrainXRef table +########################################################################### + +def isMapping(cursor=None, inbredSetId=None, strainId=None): + cursor.execute("select IsMapping from StrainXRef where InbredSetId='%d' and StrainId = '%d'" %(inbredSetId, strainId)) + isMappingId = cursor.fetchone()[0] + return isMappingId + +########################################################################### +#input: cursor, groupName (string) +#output: all species data info (array), value will be Null or else +#function: retrieve all species info from Species table +########################################################################### + +def getAllSpecies(cursor=None): + cursor.execute("select Id, Name, MenuName, FullName, TaxonomyId,OrderId from Species Order by OrderId") + allSpecies = cursor.fetchall() + return allSpecies + + +def retrieve_species_id(group): + return g.db.execute("select SpeciesId from InbredSet where Name = %s", (group)).fetchone()[0] + + +def getTissueDataSet(cursor=None): + """Retrieve all TissueProbeSetFreezeId,Name,FullName info from +TissueProbeSetFreeze table. These data will listed in the dropdown +menu in the first page of Tissue Correlation + + """ + tissProbeSetFreezeIdList=[] + nameList =[] + fullNameList = [] + + query = "select Id,Name,FullName from TissueProbeSetFreeze; " + try: + cursor.execute(query) + result = cursor.fetchall() + + for row in result: + tissProbeSetFreezeIdList.append(row[0]) + nameList.append(row[1]) + fullNameList.append(row[2]) + except: + return None + + return tissProbeSetFreezeIdList,nameList,fullNameList + +########################################################################### +# input: cursor,GeneSymbol (string), and TissueProbeSetFreezeId (string) +# output: geneId (string), dataId (string) +# function: retrieve geneId and DataId from TissueProbeSetXRef table +########################################################################### + +def getGeneIdDataIdForTissueBySymbol(cursor=None, GeneSymbol=None, TissueProbeSetFreezeId= 0): + query ="select GeneId, DataId from TissueProbeSetXRef where Symbol = '%s' and TissueProbeSetFreezeId=%s order by Mean desc" %(GeneSymbol,TissueProbeSetFreezeId) + try: + cursor.execute(query) + result = cursor.fetchone() + geneId = result[0] + dataId = result[1] + except: + geneId = 0 + dataId = 0 + + return geneId,dataId + +########################################################################### +# input: cursor, TissueProbeSetFreezeId (int) +# output: chipId (int) +# function: retrieve chipId from TissueProbeFreeze table +########################################################################### + +def getChipIdByTissueProbeSetFreezeId(cursor=None, TissueProbeSetFreezeId=None): + query = "select TissueProbeFreezeId from TissueProbeSetFreeze where Id =%s" % TissueProbeSetFreezeId + try: + cursor.execute(query) + result = cursor.fetchone() + TissueProbeFreezeId = result[0] + except: + TissueProbeFreezeId =0 + + query1 = "select ChipId from TissueProbeFreeze where Id =%s" % TissueProbeFreezeId + try: + cursor.execute(query1) + result1 = cursor.fetchone() + chipId = result1[0] + except: + chipId =0 + + return chipId + +########################################################################### +# input: cursor, TissueProbeSetFreezeId (int) +# output: TissueCount (int) +# function: retrieve how many tissue used in the specific dataset based on TissueProbeSetFreezeId +########################################################################### +def getTissueCountByTissueProbeSetFreezeId(cursor=None, TissueProbeSetFreezeId=None): + query1 ="select DataId from TissueProbeSetXRef where TissueProbeSetFreezeId =%s limit 1" % TissueProbeSetFreezeId + try: + cursor.execute(query1) + result1 = cursor.fetchone() + DataId = result1[0] + + query2 =" select count(*) from TissueProbeSetData where Id=%s" % DataId + try: + cursor.execute(query2) + result2 = cursor.fetchone() + TissueCount = result2[0] + except: + TissueCount =0 + except: + TissueCount =0 + + return TissueCount + +########################################################################### +# input: cursor, TissueProbeSetFreezeId (int) +# output: DataSetName(string),DataSetFullName(string) +# function: retrieve DataSetName, DataSetFullName based on TissueProbeSetFreezeId +########################################################################### +def getDataSetNamesByTissueProbeSetFreezeId(cursor=None, TissueProbeSetFreezeId=None): + query ="select Name, FullName from TissueProbeSetFreeze where Id=%s" % TissueProbeSetFreezeId + try: + cursor.execute(query) + result = cursor.fetchone() + DataSetName = result[0] + DataSetFullName =result[1] + except: + DataSetName =None + DataSetFullName =None + + return DataSetName, DataSetFullName + +########################################################################### +# input: cursor, geneIdLst (list) +# output: geneIdSymbolPair(dict),key is geneId, value is geneSymbol +# function: retrieve GeneId, GeneSymbol based on geneId List +########################################################################### +def getGeneIdSymbolPairByGeneId(cursor=None, geneIdLst =None): + geneIdSymbolPair={} + for geneId in geneIdLst: + geneIdSymbolPair[geneId]=None + + query ="select GeneId,GeneSymbol from GeneList where GeneId in (%s)" % string.join(geneIdLst, ", ") + try: + cursor.execute(query) + results = cursor.fetchall() + for item in results: + geneId =item[0] + geneSymbol =item[1] + geneIdSymbolPair[geneId]=geneSymbol + except: + geneIdSymbolPair=None + + return geneIdSymbolPair + + +def updateTissueProbesetXRefByProbesetId(cursor=None, probesetId=None): + query ="select Symbol,GeneId,Chr,Mb,description, Probe_Target_Description from ProbeSet where Id =%s"%probesetId + try: + cursor.execute(query) + result =cursor.fetchone() + + updateQuery =''' + Update TissueProbeSetXRef + Set Symbol='%s',GeneId='%s', Chr='%s', Mb='%s', description ='%s',Probe_Target_Description='%s' + where ProbesetId=%s + '''%(result[0],result[1],result[2],result[3],result[4],result[5],probesetId) + + cursor.execute(updateQuery) + + except: + return None diff --git a/wqflask/dbFunction/__init__.py b/wqflask/dbFunction/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/wqflask/dbFunction/webqtlDatabaseFunction.py b/wqflask/dbFunction/webqtlDatabaseFunction.py deleted file mode 100644 index e30929d2..00000000 --- a/wqflask/dbFunction/webqtlDatabaseFunction.py +++ /dev/null @@ -1,267 +0,0 @@ -# Copyright (C) University of Tennessee Health Science Center, Memphis, TN. -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU Affero General Public License -# as published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the GNU Affero General Public License for more details. -# -# This program is available from Source Forge: at GeneNetwork Project -# (sourceforge.net/projects/genenetwork/). -# -# Contact Drs. Robert W. Williams and Xiaodong Zhou (2010) -# at rwilliams@uthsc.edu and xzhou15@uthsc.edu -# -# -# -# This module is used by GeneNetwork project (www.genenetwork.org) - -from inspect import stack -from flask import Flask, g - -import MySQLdb -import string -import urllib2 -import json -from base import webqtlConfig -from utility.tools import USE_GN_SERVER, LOG_SQL -from utility.benchmark import Bench - -from utility.logger import getLogger -logger = getLogger(__name__ ) - -########################################################################### -#output: cursor instance -#function: connect to database and return cursor instance -########################################################################### -def getCursor(): - try: - logger.warning("Creating new MySQLdb cursor") - con = MySQLdb.Connect(db=webqtlConfig.DB_NAME, host=webqtlConfig.MYSQL_SERVER, user=webqtlConfig.DB_USER, passwd=webqtlConfig.DB_PASSWD) - cursor = con.cursor() - return cursor - except: - return None - -def fetchone(query): - """Return tuple containing one row by calling SQL directly - - """ - with Bench("SQL",LOG_SQL): - def helper(query): - res = g.db.execute(query) - return res.fetchone() - callername = stack()[1][3] - return logger.sql(callername, query, helper) - -def gn_server(path): - """Return JSON record by calling GN_SERVER - - """ - with Bench("GN_SERVER",LOG_SQL): - res = urllib2.urlopen("http://localhost:8880/"+path) - rest = res.read() - res2 = json.loads(rest) - logger.info(res2) - return res2 - -def retrieve_species(group): - """Get the species of a group (e.g. returns string "mouse" on "BXD" - - """ - if USE_GN_SERVER: - result = gn_server("/cross/"+group+".json") - return result["species"] - else: - result = fetchone("select Species.Name from Species, InbredSet where InbredSet.Name = '%s' and InbredSet.SpeciesId = Species.Id" % (group)) - return result[0] - -def getMappingMethod(cursor=None, groupName=None): - 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) -#output: isMappingId (bull) info, value will be 0,1,2 or else, 0 or Null means -# "can not do mapping", >0 means "can do mapping", >1 means "there exsists -# redundant data, user needs to choose one to do mapping function" -#function: retrieve isMappingId info from StrainXRef table -########################################################################### - -def isMapping(cursor=None, inbredSetId=None, strainId=None): - cursor.execute("select IsMapping from StrainXRef where InbredSetId='%d' and StrainId = '%d'" %(inbredSetId, strainId)) - isMappingId = cursor.fetchone()[0] - return isMappingId - -########################################################################### -#input: cursor, groupName (string) -#output: all species data info (array), value will be Null or else -#function: retrieve all species info from Species table -########################################################################### - -def getAllSpecies(cursor=None): - cursor.execute("select Id, Name, MenuName, FullName, TaxonomyId,OrderId from Species Order by OrderId") - allSpecies = cursor.fetchall() - return allSpecies - - -def retrieve_species_id(group): - return g.db.execute("select SpeciesId from InbredSet where Name = %s", (group)).fetchone()[0] - - -def getTissueDataSet(cursor=None): - """Retrieve all TissueProbeSetFreezeId,Name,FullName info from -TissueProbeSetFreeze table. These data will listed in the dropdown -menu in the first page of Tissue Correlation - - """ - tissProbeSetFreezeIdList=[] - nameList =[] - fullNameList = [] - - query = "select Id,Name,FullName from TissueProbeSetFreeze; " - try: - cursor.execute(query) - result = cursor.fetchall() - - for row in result: - tissProbeSetFreezeIdList.append(row[0]) - nameList.append(row[1]) - fullNameList.append(row[2]) - except: - return None - - return tissProbeSetFreezeIdList,nameList,fullNameList - -########################################################################### -# input: cursor,GeneSymbol (string), and TissueProbeSetFreezeId (string) -# output: geneId (string), dataId (string) -# function: retrieve geneId and DataId from TissueProbeSetXRef table -########################################################################### - -def getGeneIdDataIdForTissueBySymbol(cursor=None, GeneSymbol=None, TissueProbeSetFreezeId= 0): - query ="select GeneId, DataId from TissueProbeSetXRef where Symbol = '%s' and TissueProbeSetFreezeId=%s order by Mean desc" %(GeneSymbol,TissueProbeSetFreezeId) - try: - cursor.execute(query) - result = cursor.fetchone() - geneId = result[0] - dataId = result[1] - except: - geneId = 0 - dataId = 0 - - return geneId,dataId - -########################################################################### -# input: cursor, TissueProbeSetFreezeId (int) -# output: chipId (int) -# function: retrieve chipId from TissueProbeFreeze table -########################################################################### - -def getChipIdByTissueProbeSetFreezeId(cursor=None, TissueProbeSetFreezeId=None): - query = "select TissueProbeFreezeId from TissueProbeSetFreeze where Id =%s" % TissueProbeSetFreezeId - try: - cursor.execute(query) - result = cursor.fetchone() - TissueProbeFreezeId = result[0] - except: - TissueProbeFreezeId =0 - - query1 = "select ChipId from TissueProbeFreeze where Id =%s" % TissueProbeFreezeId - try: - cursor.execute(query1) - result1 = cursor.fetchone() - chipId = result1[0] - except: - chipId =0 - - return chipId - -########################################################################### -# input: cursor, TissueProbeSetFreezeId (int) -# output: TissueCount (int) -# function: retrieve how many tissue used in the specific dataset based on TissueProbeSetFreezeId -########################################################################### -def getTissueCountByTissueProbeSetFreezeId(cursor=None, TissueProbeSetFreezeId=None): - query1 ="select DataId from TissueProbeSetXRef where TissueProbeSetFreezeId =%s limit 1" % TissueProbeSetFreezeId - try: - cursor.execute(query1) - result1 = cursor.fetchone() - DataId = result1[0] - - query2 =" select count(*) from TissueProbeSetData where Id=%s" % DataId - try: - cursor.execute(query2) - result2 = cursor.fetchone() - TissueCount = result2[0] - except: - TissueCount =0 - except: - TissueCount =0 - - return TissueCount - -########################################################################### -# input: cursor, TissueProbeSetFreezeId (int) -# output: DataSetName(string),DataSetFullName(string) -# function: retrieve DataSetName, DataSetFullName based on TissueProbeSetFreezeId -########################################################################### -def getDataSetNamesByTissueProbeSetFreezeId(cursor=None, TissueProbeSetFreezeId=None): - query ="select Name, FullName from TissueProbeSetFreeze where Id=%s" % TissueProbeSetFreezeId - try: - cursor.execute(query) - result = cursor.fetchone() - DataSetName = result[0] - DataSetFullName =result[1] - except: - DataSetName =None - DataSetFullName =None - - return DataSetName, DataSetFullName - -########################################################################### -# input: cursor, geneIdLst (list) -# output: geneIdSymbolPair(dict),key is geneId, value is geneSymbol -# function: retrieve GeneId, GeneSymbol based on geneId List -########################################################################### -def getGeneIdSymbolPairByGeneId(cursor=None, geneIdLst =None): - geneIdSymbolPair={} - for geneId in geneIdLst: - geneIdSymbolPair[geneId]=None - - query ="select GeneId,GeneSymbol from GeneList where GeneId in (%s)" % string.join(geneIdLst, ", ") - try: - cursor.execute(query) - results = cursor.fetchall() - for item in results: - geneId =item[0] - geneSymbol =item[1] - geneIdSymbolPair[geneId]=geneSymbol - except: - geneIdSymbolPair=None - - return geneIdSymbolPair - - -def updateTissueProbesetXRefByProbesetId(cursor=None, probesetId=None): - query ="select Symbol,GeneId,Chr,Mb,description, Probe_Target_Description from ProbeSet where Id =%s"%probesetId - try: - cursor.execute(query) - result =cursor.fetchone() - - updateQuery =''' - Update TissueProbeSetXRef - Set Symbol='%s',GeneId='%s', Chr='%s', Mb='%s', description ='%s',Probe_Target_Description='%s' - where ProbesetId=%s - '''%(result[0],result[1],result[2],result[3],result[4],result[5],probesetId) - - cursor.execute(updateQuery) - - except: - return None diff --git a/wqflask/wqflask/correlation/correlation_functions.py b/wqflask/wqflask/correlation/correlation_functions.py index b25005d3..80a0818c 100644 --- a/wqflask/wqflask/correlation/correlation_functions.py +++ b/wqflask/wqflask/correlation/correlation_functions.py @@ -34,7 +34,7 @@ import string from utility import webqtlUtil from base.mrna_assay_tissue_data import MrnaAssayTissueData from base.trait import GeneralTrait -from dbFunction import webqtlDatabaseFunction +from db import webqtlDatabaseFunction from flask import Flask, g diff --git a/wqflask/wqflask/correlation/show_corr_results.py b/wqflask/wqflask/correlation/show_corr_results.py index 7738cbed..71f03d05 100644 --- a/wqflask/wqflask/correlation/show_corr_results.py +++ b/wqflask/wqflask/correlation/show_corr_results.py @@ -46,7 +46,7 @@ from utility.TDCell import TDCell from base.trait import GeneralTrait from base import data_set from utility import webqtlUtil, helper_functions, corr_result_helpers -from dbFunction import webqtlDatabaseFunction +from db import webqtlDatabaseFunction import utility.webqtlUtil #this is for parallel computing only. from wqflask.correlation import correlation_functions from utility.benchmark import Bench diff --git a/wqflask/wqflask/correlation_matrix/show_corr_matrix.py b/wqflask/wqflask/correlation_matrix/show_corr_matrix.py index 7b67e626..caf48a45 100644 --- a/wqflask/wqflask/correlation_matrix/show_corr_matrix.py +++ b/wqflask/wqflask/correlation_matrix/show_corr_matrix.py @@ -48,7 +48,7 @@ from utility.TDCell import TDCell from base.trait import GeneralTrait from base import data_set from utility import webqtlUtil, helper_functions, corr_result_helpers -from dbFunction import webqtlDatabaseFunction +from db import webqtlDatabaseFunction import utility.webqtlUtil #this is for parallel computing only. from wqflask.correlation import correlation_functions from utility.benchmark import Bench diff --git a/wqflask/wqflask/do_search.py b/wqflask/wqflask/do_search.py index bf0a06d2..ff64b518 100644 --- a/wqflask/wqflask/do_search.py +++ b/wqflask/wqflask/do_search.py @@ -10,7 +10,7 @@ from pprint import pformat as pf import sys # sys.path.append("..") Never in a running webserver -from dbFunction import webqtlDatabaseFunction +from db import webqtlDatabaseFunction import logging from utility.logger import getLogger @@ -966,7 +966,7 @@ if __name__ == "__main__": from base.data_set import create_dataset from base.templatePage import templatePage from utility import webqtlUtil - from dbFunction import webqtlDatabaseFunction + from db import webqtlDatabaseFunction db_conn = MySQLdb.Connect(db=webqtlConfig.DB_NAME, host=webqtlConfig.MYSQL_SERVER, diff --git a/wqflask/wqflask/gsearch.py b/wqflask/wqflask/gsearch.py index 23b7f869..5072f931 100644 --- a/wqflask/wqflask/gsearch.py +++ b/wqflask/wqflask/gsearch.py @@ -3,7 +3,7 @@ from __future__ import absolute_import, print_function, division from flask import Flask, g from base.data_set import create_dataset from base.trait import GeneralTrait -from dbFunction import webqtlDatabaseFunction +from db import webqtlDatabaseFunction from utility.benchmark import Bench diff --git a/wqflask/wqflask/marker_regression/MarkerRegressionPage.py b/wqflask/wqflask/marker_regression/MarkerRegressionPage.py index a9e0328c..deb47ad0 100644 --- a/wqflask/wqflask/marker_regression/MarkerRegressionPage.py +++ b/wqflask/wqflask/marker_regression/MarkerRegressionPage.py @@ -37,7 +37,7 @@ from base.webqtlTrait import webqtlTrait from base.templatePage import templatePage from utility import webqtlUtil from base import webqtlConfig -from dbFunction import webqtlDatabaseFunction +from db import webqtlDatabaseFunction from base.GeneralObject import GeneralObject import reaper diff --git a/wqflask/wqflask/search_results.py b/wqflask/wqflask/search_results.py index 1a034bdd..3d57dce0 100644 --- a/wqflask/wqflask/search_results.py +++ b/wqflask/wqflask/search_results.py @@ -32,7 +32,7 @@ from base.trait import GeneralTrait from wqflask import parser from wqflask import do_search from utility import webqtlUtil,tools -from dbFunction import webqtlDatabaseFunction +from db import webqtlDatabaseFunction from utility import formatting diff --git a/wqflask/wqflask/show_trait/show_trait.py b/wqflask/wqflask/show_trait/show_trait.py index a8ff0fdf..7c961091 100644 --- a/wqflask/wqflask/show_trait/show_trait.py +++ b/wqflask/wqflask/show_trait/show_trait.py @@ -18,7 +18,7 @@ from wqflask.show_trait.SampleList import SampleList from utility import webqtlUtil, Plot, Bunch, helper_functions from base.trait import GeneralTrait from base import data_set -from dbFunction import webqtlDatabaseFunction +from db import webqtlDatabaseFunction from basicStatistics import BasicStatisticsFunctions from pprint import pformat as pf diff --git a/wqflask/wqflask/update_search_results.py b/wqflask/wqflask/update_search_results.py index 166649a4..7681e7fb 100644 --- a/wqflask/wqflask/update_search_results.py +++ b/wqflask/wqflask/update_search_results.py @@ -5,7 +5,7 @@ import json from flask import Flask, g from base.data_set import create_dataset from base.trait import GeneralTrait -from dbFunction import webqtlDatabaseFunction +from db import webqtlDatabaseFunction from utility.benchmark import Bench -- cgit v1.2.3