#include <boost/filesystem/path.hpp>
#include <boost/filesystem/fstream.hpp>
-#include <boost/serialization/base_object.hpp>
-#include <boost/serialization/export.hpp>
-#include <boost/serialization/list.hpp>
-#include <boost/serialization/nvp.hpp>
-#include <boost/serialization/string.hpp>
-#include <boost/serialization/shared_ptr.hpp>
-#include <boost/serialization/utility.hpp>
-#include <boost/serialization/version.hpp>
-#include <boost/serialization/vector.hpp>
-
#include <boost/shared_ptr.hpp>
#include <boost/enable_shared_from_this.hpp>
ar & BOOST_SERIALIZATION_NVP(sequence);
}
};
-BOOST_CLASS_EXPORT(motif);
class Sequence;
typedef boost::shared_ptr<Sequence> SequenceRef;
class Sequence
{
public:
+
+
typedef SeqString::value_type value_type;
typedef SeqString::difference_type difference_type;
typedef SeqString::iterator iterator;
void load_annot(const boost::filesystem::path file_path, int start_index, int end_index);
//! load sequence annotations
//! \throws mussa_load_error
- void load_annot(std::fstream& data_stream, int start_index, int end_index);
+ void load_annot(std::istream& data_stream, int start_index, int end_index);
//! parse annotation file
/*! \throws annotation_load_error
*/
//! create an initialized annotation with the "standard" types.
SeqSpanRef make_annotation(std::string name, std::string type, size_type start, size_type stop) const;
const SeqSpanRefList& annotations() const;
+
const MotifList& motifs() const;
//! add a motif to our list of motifs
//! annotate the current sequence with other sequences
void find_sequences(std::list<Sequence>::iterator start,
std::list<Sequence>::iterator end);
+ SeqSpanRef seqspan() { return seq; }
void save(boost::filesystem::fstream &save_file);
- void load_museq(boost::filesystem::path load_file_path, int seq_num);
+ //void load_museq(boost::filesystem::path load_file_path, int seq_num);
+ static SequenceRef load_museq(boost::filesystem::fstream& load_file);
protected:
SeqSpanRef seq;
//! look for a string sequence type and and it to an annotation list
void add_string_annotation(std::string a_seq, std::string name);
- // boost::serialization support
- friend class boost::serialization::access;
- template<class Archive>
- void serialize(Archive& ar, const unsigned int /*version*/) {
- ar & BOOST_SERIALIZATION_NVP(seq);
- ar & BOOST_SERIALIZATION_NVP(header);
- ar & BOOST_SERIALIZATION_NVP(species);
- ar & BOOST_SERIALIZATION_NVP(annotation_list);
- ar & BOOST_SERIALIZATION_NVP(motif_list);
- }
};
-BOOST_CLASS_EXPORT(Sequence);
+
#endif