scorepair.h

Go to the documentation of this file.
00001 #ifndef SCOREPAIR_H
00002 #define SCOREPAIR_H
00003 //#define HAVE_NAMESPACE_STD
00004 
00005 #include <string>
00006 #include <map>
00007 #include <vector>
00008 #include <set>
00009 //#include "forest.h"
00010 #include "hatrees.h"
00011 //#include "libpq++.h"
00012 #include <pqxx>
00013 
00014 using namespace std;
00015 using namespace pqxx;
00016 
00017 //enum pairquality { good, bad, modify };
00018 //void deleteCluster(PgDatabase &pgdb, const string &clusterid);
00019 void deleteCluster(connection &pgdb, const string &clusterid);
00020 
00021 class scorepair {
00022         public:
00023                 void read(istream &in, int cut);
00024                 void clear() { names.clear(); seqlens.clear(); rel.clear(); }
00025 
00026                 // 1=good, 9=bad, 5=modify; reading subclstr
00027                 int quality();
00028                 void showcluster(ostream &ou);
00029 
00030                 /* return all those that are not included in any cluster */
00031                 set<string> badMembers() const;
00032                 //void loadTable(PgDatabase &pgdb);
00033                 void clusterArray(vector<set<string> > &clar);
00034                 vector<set<string> > getClusters();  // too expensive don't call
00035 
00036                 void addNewCluster(connection &pgdb, const string &clusterid, 
00037                                 int &clusterIdCnt);
00038 
00039         private:
00040                 multimap<string, string> rel;  // use integer for speed
00041                 vector<string> names;  // name -> identifier
00042                 vector<int> seqlens;
00043                 hatrees<string> subclstr;
00044 };
00045 
00046 #endif

Generated on Wed Aug 10 11:56:50 2011 for Softwares from Orpara by  doxygen 1.5.6