X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=bellerophon.h;h=36555bf0d406addb3cc7685ee55fdac341dffe68;hp=3d05617d50ad0a9dccb05da2d21bc872e8ca842f;hb=df7e3ff9f68ef157b0328a2d353c3258c5d45d89;hpb=aa9238c0a9e6e7aa0ed8b8b606b08ad4fd7dcfe3 diff --git a/bellerophon.h b/bellerophon.h index 3d05617..36555bf 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&); + 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 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&); }; /***********************************************************/