]> git.donarmstrong.com Git - mothur.git/blobdiff - chimera.h
fixed some issues while testing 1.6
[mothur.git] / chimera.h
index 2febd00e4be6ac8e4c1e8b0f0493cc47ed487834..5df383ddcc56e62e853babb4f23e0978ce76d9c1 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 {
+               string leftParent;
+               string rightParent; 
+               float score;  
+               int midpoint;
+};
+
+struct linePair {
+                       int start;
+                       int end;
+                       linePair(int i, int j) : start(i), end(j) {}
+                       linePair(){}
+};
 
 /***********************************************************************/
 
@@ -28,14 +62,23 @@ 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 setKmerSize(int k)                 {       kmerSize = k;           }
+               virtual void setSVG(int s)                              {       svg = s;                        }
+               virtual void setName(string n)                  {       name = 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
@@ -44,8 +87,9 @@ class Chimera {
                
        protected:
                
-               bool filter, correction;
-               int processors, window, increment;
+               bool filter, correction, svg;
+               int processors, window, increment, numWanted, kmerSize;
+               string seqMask, quanfile, filterString, name;
                        
 
 };