]> git.donarmstrong.com Git - mothur.git/blobdiff - bellerophon.h
changes while testing
[mothur.git] / bellerophon.h
index dd5b3da8035cf1528c07a2964f17b9b1aa051cab..36555bf0d406addb3cc7685ee55fdac341dffe68 100644 (file)
@@ -12,7 +12,6 @@
 
 
 #include "chimera.h"
-#include "filterseqscommand.h"
 #include "sparsematrix.hpp"
 #include "sequence.hpp"
 #include "dist.h"
@@ -25,26 +24,41 @@ typedef map<int, float> SeqMap;  //maps sequence to all distance for that seqeun
 class Bellerophon : public Chimera {
        
        public:
-               Bellerophon(string, string);    
-               ~Bellerophon() {};
+               Bellerophon(string, bool, bool, int, int, int, string); //fastafile, filter, correction, window, increment, processors, outputDir);     
+               ~Bellerophon() { delete distCalculator; for (int i = 0; i < seqs.size(); i++) { delete seqs[i];  }  seqs.clear(); }
                
                int getChimeras();
-               void print(ostream&, ostream&);
-               
-               void setCons(string){};
-               void setQuantiles(string) {};
+               int print(ostream&, ostream&, string);
                
+               #ifdef USE_MPI
+               int print(MPI_File&, MPI_File&, string);
+               #endif
                
        private:
+               struct linePair {
+                       unsigned long long start;
+                       int num;
+                       linePair(unsigned long long i, int j) : start(i), num(j) {}
+               };
+               
+               vector<linePair> lines;
+       
                Dist* distCalculator;
-               FilterSeqsCommand* filterSeqs;
                vector<Sequence*> seqs;
-               vector<Preference> pref;
+               vector< vector<Preference> > pref; //pref[0] = preference scores for all seqs in window 0.
                string fastafile;
-               int iters;
+               int iters, count, window, increment, numSeqs, processors; //iters = number of windows
+               bool correction;
                
-               void generatePreferences(vector<SeqMap>, vector<SeqMap>, int);
+               int generatePreferences(vector<SeqMap>, vector<SeqMap>, int);
                int createSparseMatrix(int, int, SparseMatrix*, vector<Sequence>);
+               vector<Preference> getBestPref();
+               int driverChimeras(vector<int>, linePair);
+               int createProcesses(vector<int>);
+               int writePrefs(string, linePair);
+               int readPrefs(string);
+               vector<string> getBestWindow(linePair line);
+               int fillPref(int, vector<string>&);
 };
 
 /***********************************************************/