SHORE API
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
psl.hpp
Go to the documentation of this file.
1 
2 /*
3  * Copyright 2008,2009,2010,2011,2012 Stephan Ossowski, Korbinian Schneeberger,
4  * Felix Ott, Joerg Hagmann, Alf Scotland, Sebastian Bender
5  *
6  * This file is part of SHORE.
7  *
8  * SHORE is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * SHORE is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with SHORE. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
25 
26 #ifndef SHORE_IO_PSL_HPP__
27 #define SHORE_IO_PSL_HPP__
28 
30 #include "shore/fmtio/read.hpp"
31 #include "shore/fmtio/text.hpp"
33 
34 namespace shore {
35 
82 {
83  private:
84 
85  shore::line_reader m_rfile;
86  shore::read_reader m_rread;
87 
88  shore::alignment m_current;
89 
90  std::string m_seqbuf;
91 
92  std::vector<shore::sequence_record> m_ref;
93 
94  shore::feed<shore::read> m_leftovers;
95 
96 
97  void parse();
98 
99  public:
100 
102 
103  psl_reader(const std::string &fn,
104  const std::string &ref_fn,const std::string &reads_fn);
105 
106  const shore::alignment &current() const;
107 
108  bool has_data();
109 
110  void next();
111 
112  shore::feed<shore::read> &leftovers();
113 };
114 
117 
118 } // namespace
119 
120 #endif // SHORE_IO_PSL_HPP__
121