load and display a motif list
[mussa.git] / alg / mussa.hpp
index c5a5ba00fe27af295202bd9bb3b50eb6ae019a11..ded2a8b77f62d3072a9f963eef8247127642c7e2 100644 (file)
 #include <list>
 #include <string>
 #include <vector>
+#include <set>
+#include <istream>
 
+#include "alg/annotation_colors.hpp"
 #include "alg/nway_paths.hpp"
 #include "alg/sequence.hpp"
 
@@ -30,7 +33,8 @@ class Mussa
     enum analysis_modes { TransitiveNway, RadialNway, EntropyNway, 
                           RecursiveNway };
 
-    Mussa();  
+    Mussa();
+    Mussa(const Mussa &);
 
     void save();
     void save_muway(std::string save_path);
@@ -110,6 +114,21 @@ class Mussa
     void save_old();
     void load_old(char * load_file_path, int s_num);
 
+    // manage motif lists
+    //! load motifs from an ifstream
+    /*! The file should look something like
+     *  <sequence> <red> <green> <blue>
+     *  where sequence is a string of IUPAC symbols
+     *  and red,green,blue are a white space separated list of floats
+     *  in the range [0.0, 1.0]
+     */
+    void load_motifs(std::istream &);
+    //! load a list of motifs from a file named filename
+    void load_motifs(std::string filename);
+
+    //! return color mapper
+    AnnotationColors& colorMapper();
+
   private:
     // Private variables
     // parameters needed for a mussa analysis
@@ -135,6 +154,11 @@ class Mussa
     //! N-way data, ie the mussa results  
     NwayPaths the_paths;
 
+    //! motif list
+    std::set<std::string> motif_sequences;
+    //! color manager
+    AnnotationColors color_mapper;
+
     // Private methods
     //! loads sequence and annotations from fasta and annotation file
     void seqcomp();