Egglib 2.1.11
C++ library reference manual
Staden.hpp
1 /*
2  Copyright 2008-2009 Stéphane De Mita, Mathieu Siol
3 
4  This file is part of EggLib.
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_STADEN_HPP
21 #define EGGLIB_STADEN_HPP
22 
23 #include <string>
24 #include <istream>
25 #include "Align.hpp"
26 
27 namespace egglib {
28 
38  class Staden {
39 
40  public:
41 
42 
66  static Align parse(const std::string& string, bool deleteConsensus=true);
67 
68 
89  static Align parse(std::istream& stream, bool deleteConsensus=true);
90 
91 
92  private:
93 
95  Staden() { }
96 
98  Staden(const Staden& source) { }
99 
101  ~Staden() { }
102 
103 
104  /* Gets the start position of sequences
105  *
106  * The functions gives total number of characters before the start of sequences
107  * and reads through until the next backspace (ignores the first line).
108  */
109  static void getShift();
110 
111  // Translates according to the Staden format
112  static char transforme(char);
113 
114  // Imports one sequence
115  static bool readOneSequence();
116 
117  // Imports and concatenates one sequence
118  static bool readAppendOneSequence();
119 
120  // Replaces dots by the matching character from CONSENSUS
121  static void undot(bool delete_consensus=true);
122 
123  // The number of characters before the start of sequences
124  static int shift;
125 
126  // The dynamically filled container (will result in an aligment)
127  static Container container;
128 
129  // The current position
130  static int currpos;
131 
132  // The number of nucleos read by last readAppendOneSequence()
133  static int cache_bp;
134 
135  // The reading stream
136  static std::istream* stream;
137 
138  // Stores unique 8 characters discriminating readings
139  static std::vector<std::string> ID;
140  };
141 }
142 
143 #endif
Handles a set of sequence alignment (aligned or not)
Definition: Container.hpp:45
static Align parse(const std::string &string, bool deleteConsensus=true)
Parses a string.
Definition: Staden.cpp:190
Parser of Staden output format.
Definition: Staden.hpp:38
Definition: ABC.cpp:37
Handles a sequence alignment.
Definition: Align.hpp:76

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