about summary refs log tree commit diff
path: root/wqflask/base/species.py
diff options
context:
space:
mode:
authorZachary Sloan2013-04-09 19:36:43 +0000
committerZachary Sloan2013-04-09 19:36:43 +0000
commitc7c306c69254ca49ddeccc495a8a096fcf03974d (patch)
treed022224c537e4b297836e94209a292b17c6765a8 /wqflask/base/species.py
parent27d0c86528fdbeaed56a7f5eaa71a950c522f183 (diff)
downloadgenenetwork2-c7c306c69254ca49ddeccc495a8a096fcf03974d.tar.gz
Nick's code works fine with human data
Added option to limit results based on lod score (which also
changes the y-axis of the plot)
Diffstat (limited to 'wqflask/base/species.py')
-rw-r--r--wqflask/base/species.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/wqflask/base/species.py b/wqflask/base/species.py
index 689e5c05..191f4535 100644
--- a/wqflask/base/species.py
+++ b/wqflask/base/species.py
@@ -16,8 +16,7 @@ class TheSpecies(object):
         print("self.dataset is:", pf(self.dataset.__dict__))
         self.chromosomes = Chromosomes(self.dataset)
         self.genome_mb_length = self.chromosomes.get_genome_mb_length()
-        
-        
+
     #@property
     #def chromosomes(self):
     #    chromosomes = [("All", -1)]
@@ -31,7 +30,8 @@ class TheSpecies(object):
     #    return chromosomes
 
 class IndChromosome(object):
-    def __init__(self, length):
+    def __init__(self, name, length):
+        self.name = name
         self.length = length
         
     @property
@@ -50,7 +50,7 @@ class Chromosomes(object):
 
         results = g.db.execute("""
                 Select
-                        Chr_Length.Name, Length from Chr_Length, InbredSet
+                        Chr_Length.Name, Chr_Length.OrderId, Length from Chr_Length, InbredSet
                 where
                         Chr_Length.SpeciesId = InbredSet.SpeciesId AND
                         InbredSet.Name = %s
@@ -59,7 +59,7 @@ class Chromosomes(object):
         print("bike:", results)
 
         for item in results:
-            self.chromosomes[item.Name] = IndChromosome(item.Length)
+            self.chromosomes[item.OrderId] = IndChromosome(item.Name, item.Length)
         
         self.set_mb_graph_interval()
         #self.get_cm_length_list()