//! Attach annotation information to a sequence track
struct annot
{
+ annot();
+ annot(int start, int end, std::string type, std::string name);
+
int start, end;
std::string name, type;
};
+/* The way that motifs are found currently doesn't really
+ * indicate that the match was a reverse compliment
+ */
+struct motif : public annot
+{
+ std::string sequence;
+
+ //! this constructor is for when we're adding motifs to our annotations
+ motif(int start, std::string motif);
+};
+
//! sequence track for mussa.
class Sequence
{
std::string species;
std::list<annot> annots;
+ //! a seperate list for motifs since we're currently not saving them
+ std::list<motif> motif_list;
void motif_scan(std::string a_motif, std::vector<int> * motif_match_starts);
std::string rc_motif(std::string a_motif);
/*! \throws mussa_load_error
*/
void load_annot(const std::string file_path, int start_index, int end_index);
- const std::list<annot> annotations() const;
+ const std::list<annot>& annotations() const;
+ const std::list<motif>& motifs() const;
// simple access functions
void set_seq(const std::string& a_seq);
void clear();
const std::string& get_header() const;
+ //! add a motif to our list of motifs
+ void add_motif(std::string a_motif);
std::vector<int> find_motif(std::string a_motif);
void save(std::fstream &save_file);
void load_museq(std::string load_file_path, int seq_num);