# make up a simple sequence
self.s = "AAGGCCTT" * 5
self.seq = mussa.Sequence(self.s)
+
+ # add our annotation
+ annot = mussa.annot(0, 5, "name", "type")
+ self.seq.add_annotation(annot)
+
# AnnotationColors is required, even though it'd be nice
# if it were optional
self.glseq = mussa.GlSequence(self.seq, mussa.AnnotationColors())
- assert len(self.s) == self.glseq.length
+ assert len(self.s) == self.glseq.size
# set up opengl buffer
glutInit(sys.argv)
def display(self):
"""Update showing buffer"""
glClear(GL_COLOR_BUFFER_BIT)
- self.glseq.draw(-50, self.glseq.width+50)
+ self.glseq.draw(-50, self.glseq.size+50)
#glutSwapBuffers()
if __name__ == "__main__":