aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask/base')
-rwxr-xr-xwqflask/base/data_set.py1
-rwxr-xr-xwqflask/base/trait.py42
2 files changed, 22 insertions, 21 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index 50ef8f57..7088913c 100755
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -741,3 +741,4 @@ def geno_mrna_confidentiality(ob):
if confidential:
# Allow confidential data later
NoConfindetialDataForYouTodaySorry
+
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py
index 241bf2ab..2af4bc24 100755
--- a/wqflask/base/trait.py
+++ b/wqflask/base/trait.py
@@ -314,27 +314,27 @@ class GeneralTrait:
#XZ, 05/26/2010: From time to time, this query get error message because some geneid values in database are not number.
#XZ: So I have to test if geneid is number before execute the query.
#XZ: The geneid values in database should be cleaned up.
- try:
- junk = float(self.geneid)
- geneidIsNumber = 1
- except:
- geneidIsNumber = 0
-
- if geneidIsNumber:
- query = """
- SELECT
- HomologeneId
- FROM
- Homologene, Species, InbredSet
- WHERE
- Homologene.GeneId =%s AND
- InbredSet.Name = '%s' AND
- InbredSet.SpeciesId = Species.Id AND
- Species.TaxonomyId = Homologene.TaxonomyId
- """ % (escape(str(self.geneid)), escape(self.dataset.group.name))
- result = g.db.execute(query).fetchone()
- else:
- result = None
+ #try:
+ # float(self.geneid)
+ # geneidIsNumber = True
+ #except ValueError:
+ # geneidIsNumber = False
+
+ #if geneidIsNumber:
+ query = """
+ SELECT
+ HomologeneId
+ FROM
+ Homologene, Species, InbredSet
+ WHERE
+ Homologene.GeneId =%s AND
+ InbredSet.Name = '%s' AND
+ InbredSet.SpeciesId = Species.Id AND
+ Species.TaxonomyId = Homologene.TaxonomyId
+ """ % (escape(str(self.geneid)), escape(self.dataset.group.name))
+ result = g.db.execute(query).fetchone()
+ #else:
+ # result = None
if result:
self.homologeneid = result[0]