add function for marking 'N' regions
[mussa.git] / alg / glsequence.hpp
index cbb933c6d3836717e4340e97aac5451bb55b8f12..7882d23a9340db77cbea53fdd2a3893726f46660 100644 (file)
@@ -35,6 +35,8 @@ public:
   static DrawableRef default_drawable();
   static DrawableRef copy_drawable(DrawableRef s);
   
+  //! search through sequence and add an annotation highlighting all the non AGCT characters
+  void add_annotations_for_undefined_sequence(Drawable::draw_func_ptr draw=0);
   //! set our starting x (horizontal) coordinate
   void setX(float x);
   //! get our starting x (horizontal) coordinate
@@ -54,6 +56,8 @@ public:
   const ColorRef color() const;
   //! return our draw color
   ColorRef color();
+  //! return our annotation color mapper
+  AnnotationColorsRef colorMapper() { return color_mapper; }
 
   //! draw a track 
   /*! left and right are the edges of the current viewport
@@ -100,9 +104,15 @@ public:
   friend bool operator==(const GlSequence &left, const GlSequence &right);
 
 protected:
-  boost::shared_ptr<AnnotationColors> color_mapper;
+  AnnotationColorsRef color_mapper;
   const GLfloat char_pix_per_world_unit;
 
+  //! initalize a SeqSpanRef covering start, count
+  SeqSpanRef GlSequence::make_undefined_sequence_annotation(
+    Drawable::draw_func_ptr draw,
+    size_type start,
+    size_type count);
+
   //! Return the pixel width of the opengl viewport.
   static int get_viewport_width_in_pixels();
   //! draw a from left to right +/- height/2