aboutsummaryrefslogtreecommitdiff
path: root/web/webqtl/search/SearchResultPage.py
diff options
context:
space:
mode:
authorroot2012-05-22 12:47:55 -0500
committerroot2012-05-22 12:47:55 -0500
commit89dd9b4fe8e2e1011f28d8ff688bc9e14c344ef7 (patch)
tree0850bb0fda13b3e35175d9cc7c1286c55ecac97c /web/webqtl/search/SearchResultPage.py
parent8f48285647cfd6f7150c471ec7fd410518069245 (diff)
downloadgenenetwork2-89dd9b4fe8e2e1011f28d8ff688bc9e14c344ef7.tar.gz
Latest version of GN source codes
Diffstat (limited to 'web/webqtl/search/SearchResultPage.py')
-rwxr-xr-x[-rw-r--r--]web/webqtl/search/SearchResultPage.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/web/webqtl/search/SearchResultPage.py b/web/webqtl/search/SearchResultPage.py
index 14d10731..029a54c4 100644..100755
--- a/web/webqtl/search/SearchResultPage.py
+++ b/web/webqtl/search/SearchResultPage.py
@@ -20,8 +20,10 @@ from base.templatePage import templatePage
from utility import webqtlUtil
from dbFunction import webqtlDatabaseFunction
+import PubmedSearch
+
import logging
-logging.basicConfig(filename="/tmp/gn_log", level=logging.INFO)
+logging.basicConfig(filename="/tmp/gn_log_leiyan", level=logging.INFO)
_log = logging.getLogger("search")
class SearchResultPage(templatePage):
@@ -155,7 +157,16 @@ class SearchResultPage(templatePage):
geneIdListQuery = " geneId=%s" % string.join(string.split(geneIdListQuery), "-")
self.ANDkeyword = fd.formdata.getfirst('ANDkeyword', "")
+ _log.info("self.ANDkeyword[1]: " + self.ANDkeyword)
+ pubmedSearchObject = PubmedSearch.PubmedSearch(self.ANDkeyword, self.database[0].id)
+ self.ANDkeyword = pubmedSearchObject.getNewS()
+ _log.info("self.ANDkeyword[2]: " + self.ANDkeyword)
+
self.ORkeyword = fd.formdata.getfirst('ORkeyword', "")
+ _log.info("self.ORkeyword[1]: " + self.ORkeyword)
+ pubmedSearchObject = PubmedSearch.PubmedSearch(self.ORkeyword, self.database[0].id)
+ self.ORkeyword = pubmedSearchObject.getNewS()
+ _log.info("self.ORkeyword[2]: "+self.ORkeyword)
self.ORkeyword += geneIdListQuery
@@ -485,7 +496,7 @@ class SearchResultPage(templatePage):
self.results = []
for item in searchCountQuery:
start_time = datetime.datetime.now()
- _log.info("Executing query: %s"%(item))
+ _log.info("111 Executing query: %s"%(item))
self.cursor.execute(item)
allResults.append(self.cursor.fetchall())
end_time = datetime.datetime.now()
@@ -497,6 +508,7 @@ class SearchResultPage(templatePage):
#searchCountQuery retrieve all the results, for counting use only
if searchCountQuery != searchQuery:
for item in searchQuery:
+ _log.info("222 Executing query: %s"%(item))
self.cursor.execute(item)
self.results.append(self.cursor.fetchall())
else: