X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=mussa.git;a=blobdiff_plain;f=alg%2Fseq_span.hpp;h=f5e574814c532b7ea95246695fc837e7d534bd40;hp=5a2da1268d3a62cf807f323d7e39bb450fea5841;hb=f3e6762bedaf3775619a36f4103c8cf35d2ca887;hpb=a5fdb434dd0e6d18fe98e9ee57cb5169ce4c5842 diff --git a/alg/seq_span.hpp b/alg/seq_span.hpp index 5a2da12..f5e5748 100644 --- a/alg/seq_span.hpp +++ b/alg/seq_span.hpp @@ -2,6 +2,7 @@ #define SEQ_SPAN_HPP_ #include +#include #include #include @@ -18,6 +19,8 @@ //! These classes provide for the internal implementation for the Sequence class #include "seq.hpp" +#include "annotations.hpp" +#include "drawable.hpp" class SeqSpan; typedef boost::shared_ptr SeqSpanRef; @@ -128,11 +131,16 @@ public: std::string sequence() const; //! are both sequences derived from the same sequence tree? static bool isFamily(const SeqSpan& a, const SeqSpan& b); + + //! access annotations dictionary + AnnotationsRef annotations() const { return seq_annotations; } + //! set annotations dictionary + void setAnnotations(AnnotationsRef a) { seq_annotations = a; } + //! get data for drawing + DrawableRef drawable() const { return seq_drawable; } + //! store drawing data + void setDrawable(DrawableRef d) { seq_drawable = d; } - //! fill in our rc_seq variable - void initialize_rc_seq() const; - - friend class Sequence; private: //! do not statically initialize, only create with new SeqSpan() {}; @@ -148,10 +156,18 @@ protected: //! keep a reference to who our parent span is SeqSpanRef parent; - + //! hold a reverse complement version of our sequence if needed - SeqStringRef rc_seq; + SeqStringRef rc_seq; + //! fill in our rc_seq variable + void initialize_rc_seq() const; + //! annotations provides a python-dictionary like place for metadata + AnnotationsRef seq_annotations; + //! store information needed for drawing + DrawableRef seq_drawable; + + friend class Sequence; // boost::serialization support friend class boost::serialization::access; template