X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bellerophon.h;h=1333ec8f16d8d0985a2b289b65294ef1f94a95f3;hb=37309a2552995e5f7f2e04be99b808c803472311;hp=3d05617d50ad0a9dccb05da2d21bc872e8ca842f;hpb=aa9238c0a9e6e7aa0ed8b8b606b08ad4fd7dcfe3;p=mothur.git diff --git a/bellerophon.h b/bellerophon.h index 3d05617..1333ec8 100644 --- a/bellerophon.h +++ b/bellerophon.h @@ -12,7 +12,6 @@ #include "chimera.h" -#include "filterseqscommand.h" #include "sparsematrix.hpp" #include "sequence.hpp" #include "dist.h" @@ -25,22 +24,41 @@ typedef map 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(); int print(ostream&, ostream&); + #ifdef USE_MPI + int print(MPI_File&, MPI_File&); + #endif + private: + struct linePair { + int start; + int num; + linePair(long int i, int j) : start(i), num(j) {} + }; + + vector lines; + Dist* distCalculator; - FilterSeqsCommand* filterSeqs; vector seqs; - vector pref; + vector< vector > 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; int generatePreferences(vector, vector, int); int createSparseMatrix(int, int, SparseMatrix*, vector); + vector getBestPref(); + int driverChimeras(vector, linePair); + int createProcesses(vector); + int writePrefs(string, linePair); + int readPrefs(string); + vector getBestWindow(linePair line); + int fillPref(int, vector&); }; /***********************************************************/