throw errors when spirit parsing fails
[mussa.git] / alg / mussa.hpp
index cc806073fd92658475ad85608f77af7d10fae7b5..64f46499b2ccd0eb450d051e219335eb59256c2e 100644 (file)
@@ -40,6 +40,7 @@ signals:
     void progress(const std::string& description, int cur, int max);
 
 public:
+    typedef std::set<Sequence> motif_set;
     enum analysis_modes { TransitiveNway, RadialNway, EntropyNway, 
                           RecursiveNway };
 
@@ -168,18 +169,20 @@ public:
      */
     void set_motifs(const std::vector<Sequence>& motifs, 
                     const std::vector<Color>& colors);
-    //! 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(boost::filesystem::path filename);
+    //! load motifs from an ifstream
+    /*! \sa Mussa::load_motifs(boost::filesystem::path)
+     */
+    void load_motifs(std::istream &);
     //! return our motifs;
-    const std::set<Sequence>& motifs() const;
+    const motif_set& motifs() const;
 
     //! return color mapper
     boost::shared_ptr<AnnotationColors> colorMapper();
@@ -214,7 +217,7 @@ public:
     NwayPaths the_paths;
 
     //! motif list
-    std::set<Sequence> motif_sequences;
+    motif_set motif_sequences;
     //! color manager
     boost::shared_ptr<AnnotationColors> color_mapper;
     //! path to our analysis