aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base/species.py
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask/base/species.py')
-rw-r--r--wqflask/base/species.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/wqflask/base/species.py b/wqflask/base/species.py
index 79d867c8..ce763fc3 100644
--- a/wqflask/base/species.py
+++ b/wqflask/base/species.py
@@ -10,6 +10,9 @@ from utility import Bunch
from pprint import pformat as pf
+from utility.logger import getLogger
+logger = getLogger(__name__ )
+
class TheSpecies(object):
def __init__(self, dataset):
self.dataset = dataset
@@ -48,16 +51,17 @@ class Chromosomes(object):
self.dataset = dataset
self.chromosomes = collections.OrderedDict()
- results = g.db.execute("""
+
+ query = """
Select
Chr_Length.Name, Chr_Length.OrderId, Length from Chr_Length, InbredSet
where
Chr_Length.SpeciesId = InbredSet.SpeciesId AND
- InbredSet.Name = %s
+ InbredSet.Name = '%s'
Order by OrderId
- """, self.dataset.group.name).fetchall()
- #print("group: ", self.dataset.group.name)
- #print("bike:", results)
+ """ % self.dataset.group.name
+ logger.sql(query)
+ results = g.db.execute(query).fetchall()
for item in results:
self.chromosomes[item.OrderId] = IndChromosome(item.Name, item.Length)
@@ -120,4 +124,4 @@ class Chromosomes(object):
# Testing
#if __name__ == '__main__':
-# foo = dict(bar=dict(length)) \ No newline at end of file
+# foo = dict(bar=dict(length))