More robust eol handling for Sequence::load_fasta
[mussa.git] / alg / sequence.hpp
index f67ca834c98d81732e6cab5e3019fe9ed8d1dbb8..4aa6713c0b720df1afbd29c622fc7815b543812e 100644 (file)
@@ -84,16 +84,23 @@ class Sequence
                                std::string::size_type count=0);
 
     //! load sequence AGCT from fasta file
-    /*! \throws mussa_load_error 
-     */
+    //! \throw mussa_load_error
+    //! \throw sequence_empty_error
+    //! \throw sequence_empty_file_error
     void load_fasta(const boost::filesystem::path file_path, int seq_num=1, 
                     int start_index=0, int end_index=0);
+    //! load sequence from stream
+    //! \throw mussa_load_error
+    //! \throw sequence_empty_error
+    //! \throw sequence_empty_file_error
+    void load_fasta(std::iostream& file, int seq_num=1, 
+                    int start_index=0, int end_index=0);
     //! load sequence annotations
     //! \throws mussa_load_error 
     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::istream& data_stream, int start_index, int end_index);
+    void load_annot(std::fstream& data_stream, int start_index, int end_index);
     void parse_annot(std::string data, int start_index, int end_index);
     const std::list<annot>& annotations() const;
     const std::list<motif>& motifs() const;