class pyMussaGL:
def __init__(self):
- seq = mussa.Sequence()
- s = "AAGGCCTTAAGGCCTT" * 100
- seq = mussa.Sequence(s)
- assert len(s) == seq.size() == len(seq)
- self.glseq = mussa.GlSequence(seq)
+ self.s = "AAGGCCTT" * 5
+ self.seq = mussa.Sequence(self.s)
+ self.glseq = mussa.GlSequence(self.seq)
+ print self.glseq.width
glutInit(sys.argv)
glutInitDisplayMode(GLUT_RGBA | GLUT_DEPTH )
glutCreateWindow('mussa')
glClearColor(1,1,1,0)
- glOrtho(-50, len(seq)+50, -50, 50, -50, 50)
+ glOrtho(-10, len(self.s)+10, -50, 50, -50, 50)
glutDisplayFunc(self.display)
print "init done"
def display(self):
glClear(GL_COLOR_BUFFER_BIT)
- self.glseq.draw()
- glutSwapBuffers()
+ self.glseq.draw(-50, self.glseq.width+50)
+ #glutSwapBuffers()
if __name__ == "__main__":
p = pyMussaGL()