X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=chimera.h;h=24ab3f74e5b783becc8106beffeef09a22191cb8;hb=794b3f789d6160c99b75edb9cf9af5cf3df4b9da;hp=ef62b5357981272c93cd2c9869c5b507f0c1daaa;hpb=aa9238c0a9e6e7aa0ed8b8b606b08ad4fd7dcfe3;p=mothur.git diff --git a/chimera.h b/chimera.h index ef62b53..24ab3f7 100644 --- a/chimera.h +++ b/chimera.h @@ -17,13 +17,14 @@ /***********************************************************************/ struct Preference { string name; - vector leftParent; //keep the name of closest left associated with the two scores - vector rightParent; //keep the name of closest right associated with the two scores - vector score; //so you can keep last score and calc this score and keep whichever is bigger. - vector closestLeft; //keep the closest left associated with the two scores - vector closestRight; //keep the closest right associated with the two scores + string leftParent; //keep the name of closest left + string rightParent; //keep the name of closest + float score; //preference score + float closestLeft; //keep the closest left + float closestRight; //keep the closest right int midpoint; - + Preference() { name = ""; leftParent = ""; rightParent = ""; score = 0.0; closestLeft = 10000.0; closestRight = 10000.0; midpoint = 0; } + ~Preference() {} }; /***********************************************************************/ struct score_struct { @@ -76,9 +77,9 @@ struct sim { }; struct linePair { - int start; - int end; - linePair(int i, int j) : start(i), end(j) {} + unsigned long int start; + unsigned long int end; + linePair(unsigned long int i, unsigned long int j) : start(i), end(j) {} linePair(){} }; @@ -88,55 +89,30 @@ class Chimera { public: - Chimera(){ m = MothurOut::getInstance(); } - Chimera(string) { m = MothurOut::getInstance(); } - Chimera(string, bool, string) { m = MothurOut::getInstance(); } - Chimera(string, string) { m = MothurOut::getInstance(); } + Chimera(){ m = MothurOut::getInstance(); length = 0; unaligned = false; } virtual ~Chimera(){ for (int i = 0; i < templateSeqs.size(); i++) { delete templateSeqs[i]; } }; - virtual void setFilter(bool f) { filter = f; } - virtual void setCorrection(bool c) { correction = c; } - virtual void setProcessors(int p) { processors = p; } - virtual void setWindow(int w) { window = w; } - virtual void setIncrement(int i) { increment = i; } - virtual void setNumWanted(int n) { numWanted = n; } - virtual void setKmerSize(int k) { kmerSize = k; } - virtual void setSVG(int s) { svg = s; } - virtual void setName(string n) { name = n; } - virtual void setMatch(int m) { match = m; } - virtual void setMisMatch(int m) { misMatch = m; } - virtual void setDivR(float d) { divR = d; } - virtual void setParents(int p) { parents = p; } - virtual void setMinSim(int s) { minSim = s; } - virtual void setMinCoverage(int c) { minCov = c; } - virtual void setMinBS(int b) { minBS = b; } - virtual void setMinSNP(int s) { minSNP = s; } - virtual void setIters(int i) { iters = i; } virtual bool getUnaligned() { return unaligned; } - virtual void setTemplateFile(string t) { templateFileName = t; templateSeqs = readSeqs(t); } virtual int getLength() { return length; } - - virtual void setCons(string){}; - virtual void setQuantiles(string){}; - virtual int doPrep(){ return 0; } virtual vector readSeqs(string); - virtual vector< vector > readQuantiles(); virtual void setMask(string); virtual map runFilter(Sequence*); virtual string createFilter(vector, float); - virtual void printHeader(ostream&){}; virtual int getChimeras(Sequence*){ return 0; } virtual int getChimeras(){ return 0; } - virtual int print(ostream&, ostream&){ return 0; } + virtual int print(ostream&, ostream&){ return 0; } + + #ifdef USE_MPI + virtual int print(MPI_File&, MPI_File&){ return 0; } + #endif protected: vector templateSeqs; - bool filter, correction, svg, unaligned; - int processors, window, increment, numWanted, kmerSize, match, misMatch, minSim, minCov, minBS, minSNP, parents, iters, length; - float divR; - string seqMask, quanfile, filterString, name, outputDir, templateFileName; + bool filter, unaligned; + int length; + string seqMask, filterString, outputDir, templateFileName; Sequence* getSequence(string); //find sequence from name MothurOut* m; };