keep track of a subsequences parent
[mussa.git] / alg / sequence.hpp
index 4a99e708be9e0767ef76e0af2e05f8aed4be44db..5010729243fc8b5caae76424419789db81c0b866 100644 (file)
@@ -163,7 +163,7 @@ public:
   size_type stop() const;
 
   //! return a subsequence, copying over any appropriate annotation
-  Sequence subseq(int start=0, int count = std::string::npos) const;
+  Sequence subseq(int start=0, int count = std::string::npos);
   //! return a reverse compliment (this needs to be improved?)
   std::string rev_comp() const;
 
@@ -229,6 +229,8 @@ public:
   void load_museq(boost::filesystem::path load_file_path, int seq_num); 
   
 private:
+  //! parent sequence
+  Sequence *parent;
   //! hold a shared pointer to our sequence string
   boost::shared_ptr<seq_string> seq;
   //! start offset into the sequence
@@ -256,6 +258,7 @@ private:
   friend class boost::serialization::access;
   template<class Archive>
   void serialize(Archive& ar, const unsigned int /*version*/) {
+    ar & BOOST_SERIALIZATION_NVP(parent);
     ar & BOOST_SERIALIZATION_NVP(seq);
     ar & BOOST_SERIALIZATION_NVP(seq_start);
     ar & BOOST_SERIALIZATION_NVP(seq_count);