Egglib 2.1.11
C++ library reference manual
Fasta.hpp
1 /*
2  Copyright 2008-2009 Stéphane De Mita, Mathieu Siol
3 
4  This file is part of the EggLib library.
5 
6  EggLib is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  EggLib is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with EggLib. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef EGGLIB_FASTA_HPP
21 #define EGGLIB_FASTA_HPP
22 
23 #include <istream>
24 #include <iostream>
25 #include <string>
26 #include "Container.hpp"
27 
28 namespace egglib {
29 
74  class Fasta {
75 
76  public:
77 
93  static Container parsef(const char* fname, bool importGroupLabels=false);
94 
95 
116  static void parsef(const char* fname, Container& container, bool importGroupLabels=false);
117 
118 
134  static Container parse(const std::string& str, bool importGroupLabels=false);
135 
136 
157  static void parse(const std::string& str, Container& container, bool importGroupLabels=false);
158 
159 
175  static Container parse(std::istream& stream, bool importGroupLabels=false);
176 
177 
198  static void parse(std::istream& stream, Container& container, bool importGroupLabels=false);
199 
200 
216  static void formatf(const char* fname, const Container& container, bool exportGroupLabels=false, unsigned int lineLength=50);
217 
218 
234  static void format(std::ostream& file, const Container& container, bool exportGroupLabels=false, unsigned int lineLength=50);
235 
236 
256  static std::string format(const Container& container, bool exportGroupLabels=false, unsigned int lineLength=50);
257 
258 
259 
260  protected:
261 
263  Fasta() { }
264 
266  Fasta(const Fasta& source) { }
267 
269  Fasta& operator=(const Fasta& source) { return *this; }
270 
272  virtual ~Fasta() { }
273 
274 
275  };
276 }
277 
278 #endif
Fasta()
This class cannot be instantiated.
Definition: Fasta.hpp:263
static void formatf(const char *fname, const Container &container, bool exportGroupLabels=false, unsigned int lineLength=50)
Export sequences as fasta.
Definition: Fasta.cpp:131
Handles a set of sequence alignment (aligned or not)
Definition: Container.hpp:45
Fasta(const Fasta &source)
This class cannot be instantiated.
Definition: Fasta.hpp:266
virtual ~Fasta()
This class cannot be instantiated.
Definition: Fasta.hpp:272
static Container parse(const std::string &str, bool importGroupLabels=false)
Imports a fasta file.
Definition: Fasta.cpp:48
static Container parsef(const char *fname, bool importGroupLabels=false)
Imports a fasta file.
Definition: Fasta.cpp:30
Fasta & operator=(const Fasta &source)
This class cannot be or copied.
Definition: Fasta.hpp:269
Definition: ABC.cpp:37
static void format(std::ostream &file, const Container &container, bool exportGroupLabels=false, unsigned int lineLength=50)
Export sequences as fasta.
Definition: Fasta.cpp:147
Fasta parser/formatter.
Definition: Fasta.hpp:74

Hosted by 
Get EggLib at SourceForge.net. Fast, secure and Free Open Source software downloads