Esempio n. 1
0
 def setBottom(self, markers):
     #print markers
     self.bottomList = map(lambda (x, y): (x, y),
                           markers)  #legacy, can remove...
     self.bottom = YIntervalSeries("Candidate balancing selection")
     if len(markers) > 0:
         self.bottom.add(0.0, -1.0, -1.0, self.bottomList[0][1])
     for marker in self.bottomList:
         self.bottom.add(marker[0], -1.0, -1.0, marker[1])
Esempio n. 2
0
 def setTop(self, markers):
     #setBottom has to be done before, as setMarkers
     self.top = YIntervalSeries("Candidate neutral")
     self.limit = YIntervalSeries("Candidate positive selection")
     if len(markers) > 1:
         #if self.maxY > markers[0][1]:
         #    self.limit.add(0.0, markers[0][1], markers[0][0], markers[0][1])
         #else: #It does not really matter
         #    self.limit.add(0.0, -1, 1.1, 1.1)
         self.limit.add(0.0, markers[0][1], markers[0][1], 1.1)
     for i in range(len(markers)):
         self.top.add(markers[i][0], self.bottomList[i][1],
                      self.bottomList[i][1], markers[i][1])
         if self.maxY > markers[i][1]:
             self.limit.add(markers[i][0], markers[i][1], markers[i][1],
                            1.1)
         else:  #It does not really matter
             self.limit.add(markers[i][0], markers[i][1], markers[i][1],
                            1.1)