5 #include "tree/tree.hh"
7 #include "CassiopeeConfig.h"
9 #include <boost/archive/text_oarchive.hpp>
10 #include <boost/archive/text_iarchive.hpp>
11 #include <boost/archive/binary_oarchive.hpp>
12 #include <boost/archive/binary_iarchive.hpp>
14 #include <boost/serialization/list.hpp>
31 return pos == p.pos && in+del == p.
in + p.
del;
108 friend class boost::serialization::access;
109 template<
class Archive>
110 void serialize(Archive & ar,
const unsigned int )
122 #ifndef __CASSIOPEE_H_
123 #define __CASSIOPEE_H_
169 void graph(
int depth);
177 string getSuffix(
long pos);
187 tree<TreeNode>* getTree();
202 char getCharAtSuffix(
long pos);
209 void filltree(
long pos);
221 bool index_loaded_from_file();
224 list<TreeNode> serialized_nodes;
226 bool loaded_from_file;
228 const char* filename;
232 const long MAX_SUFFIX;
233 long suffix_position;
239 long graphNode(tree<TreeNode>::iterator node,
long counter, ofstream& myfile,
int maxdepth);
244 char* loadSuffix(
long pos);
261 void fillTreeWithSuffix(tree<TreeNode>::iterator sib,
long suffix_pos,
long pos);
262 void fillTreeWithSuffix(
long suffix_pos,
long pos);
277 static void transform_fasta(
const string in,
const string out);
292 static bool isequal(
char a,
char b);
302 static bool ismatchequal(
char a,
const char b[],
int len);
303 static const char K_MATCH[];
304 static const char M_MATCH[];
305 static const char R_MATCH[];
306 static const char Y_MATCH[];
307 static const char S_MATCH[];
308 static const char W_MATCH[];
309 static const char B_MATCH[];
310 static const char V_MATCH[];
311 static const char H_MATCH[];
312 static const char D_MATCH[];
313 static const char N_MATCH[];
319 inline bool operator() (
const Match* struct1,
const Match* struct2)
321 return (struct1->pos < struct2->pos);
344 void removeDuplicates();
382 void search(
string suffix,
bool clear);
391 void search(
string suffix);
398 void search(
string suffixes[]);
403 bool isequal(
char a,
char b);
427 static bool same_match (
Match* first,
Match* second)
428 {
return ( *first == *second ); }
440 void getMatchesFromNode(tree<TreeNode>::iterator sib,
const int nbSubst,
const int nbIn,
const int nbDel);
455 void searchAtNode(
string suffix,
const long suffix_pos,
const tree<TreeNode>::iterator root,
int nbSubst,
int nbIn,
int nbDel,
int nbN);
468 void searchAtNode(
string suffix,
const long suffix_pos,
const tree<TreeNode>::iterator root,
const tree<TreeNode>::iterator start_node,
int nbSubst,
int nbIn,
int nbDel,
int nbN);
474 bool searchAtreduction(
const string suffix,
const tree<TreeNode>::iterator sib,
long counter,
long tree_reducted_pos,
int nbSubst,
int nbIn,
int nbDel,
int nbN);
Definition: Cassiopee.h:317
bool do_reduction
Definition: Cassiopee.h:197
char c
Definition: Cassiopee.h:69
int max_indel
Definition: Cassiopee.h:409
Definition: Cassiopee.h:24
int subst
Definition: Cassiopee.h:45
Match * match_limits
Definition: Cassiopee.h:349
int in
Definition: Cassiopee.h:37
list< Match * > matches
Definition: Cassiopee.h:354
int max_subst
Definition: Cassiopee.h:413
list< Match > matches
Definition: Cassiopee.h:192
bool ambiguity
Definition: Cassiopee.h:360
int nmax
Definition: Cassiopee.h:365
int del
Definition: Cassiopee.h:41
bool operator==(const Match &p) const
Definition: Cassiopee.h:30
Definition: Cassiopee.h:329
Definition: Cassiopee.h:135
long next_length
Definition: Cassiopee.h:87
long max_depth
Definition: Cassiopee.h:214
long next_pos
Definition: Cassiopee.h:82
int mode
Definition: Cassiopee.h:374
Definition: Cassiopee.h:272
Definition: Cassiopee.h:283
list< long > positions
Definition: Cassiopee.h:75
Definition: Cassiopee.h:64