X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=bellerophon.h;h=36555bf0d406addb3cc7685ee55fdac341dffe68;hp=b309545e29c18d3ed3669e6e70df3243754551ca;hb=df7e3ff9f68ef157b0328a2d353c3258c5d45d89;hpb=f7fbd74ffedcf62217109c22e828453eaefa1458 diff --git a/bellerophon.h b/bellerophon.h index b309545..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,26 +24,41 @@ typedef map SeqMap; //maps sequence to all distance for that seqeun class Bellerophon : public Chimera { public: - Bellerophon(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(); } - void getChimeras(); - void print(ostream&); - - void setCons(string){}; - void setQuantiles(string) {}; + int getChimeras(); + 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; - void generatePreferences(vector, vector, int); + 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&); }; /***********************************************************/