]> git.donarmstrong.com Git - mothur.git/blobdiff - chimera.h
checking in chimera files in progress after move to michigan
[mothur.git] / chimera.h
index fd6b53a26778ff247ba43ee5f5a5bc6b6fa6c5c8..366068b43f77cae77f6df9ce82766e253a8789e1 100644 (file)
--- a/chimera.h
+++ b/chimera.h
 
 
 #include "mothur.h"
-#include "sparsematrix.hpp"
 #include "sequence.hpp"
 
-typedef list<PCell>::iterator MatData;
-typedef map<int, float> SeqMap;  //maps sequence to all distance for that seqeunce
 
+struct Preference {
+               string name;
+               vector<string> leftParent; //keep the name of closest left associated with the two scores
+               vector<string> rightParent; //keep the name of closest right associated with the two scores
+               vector<float> score;  //so you can keep last score and calc this score and keep whichever is bigger.
+               vector<float> closestLeft;  //keep the closest left associated with the two scores
+               vector<float> closestRight; //keep the closest right associated with the two scores
+               int midpoint;
+
+};
+
+struct SeqDist {
+       Sequence* seq;
+       float dist;
+};
+
+//********************************************************************************************************************
+//sorts lowest to highest
+inline bool compareSeqDist(SeqDist left, SeqDist right){
+       return (left.dist < right.dist);        
+} 
+//********************************************************************************************************************
+
+struct sim {
+               Sequence* leftParent;
+               Sequence* rightParent; 
+               float score;  
+               int midpoint;
+};
+
+struct linePair {
+                       int start;
+                       int end;
+                       linePair(int i, int j) : start(i), end(j) {}
+                       linePair(){}
+};
 
 /***********************************************************************/
 
@@ -29,16 +62,21 @@ class Chimera {
                Chimera(string);
                Chimera(string, string);
                virtual ~Chimera(){};
-               virtual void setFilter(bool f)                  {       filter = f;                     }
+               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 setCons(string) {};
-               virtual void setQuantiles(string) {};
+               virtual void setCons(string){};
+               virtual void setQuantiles(string){};
                virtual vector<Sequence*> readSeqs(string);
+               virtual vector< vector<float> > readQuantiles();
                virtual void setMask(string);
+               virtual void runFilter(vector<Sequence*>);
+               virtual void createFilter(vector<Sequence*>);
+               
                
                //pure functions
                virtual void getChimeras() = 0; 
@@ -47,8 +85,8 @@ class Chimera {
        protected:
                
                bool filter, correction;
-               int processors, window, increment;
-               string seqMask;
+               int processors, window, increment, numWanted;
+               string seqMask, quanfile, filterString;
                        
 
 };