]> git.donarmstrong.com Git - mothur.git/blobdiff - sharedrabundvector.h
sffinfo bug with flow grams right index when clipQualRight=0
[mothur.git] / sharedrabundvector.h
index b69bc30657a1667665709df1d21653c05d574b3a..419d15a15af7b73872c2678675aff1a4f564c759 100644 (file)
  *
  */
 
-#include <Carbon/Carbon.h>
 #include "datavector.hpp"
 #include "sharedordervector.h"
 #include "sharedsabundvector.h"
+#include "sharedrabundfloatvector.h"
 #include "rabundvector.hpp"
+//#include "groupmap.h"
 
-/* This class is a child to datavector.  It represents OTU information at a certain distance. 
+/*  DataStructure for a shared file.
+       This class is a child to datavector.  It represents OTU information at a certain distance. 
        It is similiar to an rabundvector except each member of data knows which group it belongs to.
        Each member of the internal container "data" is a struct of type individual. 
        An individual which knows the OTU from which it came, 
        the group it is in and its abundance.  */
 
 
-
 class SharedRAbundVector : public DataVector {
        
 public:
        SharedRAbundVector();
        SharedRAbundVector(int);
        //SharedRAbundVector(string, vector<int>);
-       SharedRAbundVector(const SharedRAbundVector& bv) : DataVector(bv), data(bv.data), maxRank(bv.maxRank), numBins(bv.numBins), numSeqs(bv.numSeqs){};
-//     SharedRAbundVector(ifstream&);
+       SharedRAbundVector(const SharedRAbundVector& bv) : DataVector(bv), data(bv.data), maxRank(bv.maxRank), numBins(bv.numBins), numSeqs(bv.numSeqs), group(bv.group), index(bv.index){};
+    SharedRAbundVector(ifstream&);
        ~SharedRAbundVector();
 
        int getNumBins();               
        int getNumSeqs();                                                       
        int getMaxRank();
        string getGroup();
-       void setGroup(string);                                                  
+       void setGroup(string);
+       string getBinLabel();
+       void setBinLabel(string);
+       int getGroupIndex();
+       void setGroupIndex(int);                                                                
 
        void set(int, int, string);                     //OTU, abundance, groupname
+       void setData(vector <individual>);
        individual get(int);
+       vector <individual> getData();
        int getAbundance(int);
-       void push_back(int, int, string);  //abundance, OTU, groupname
+       int numNZ();
+       void sortD();  //Sorts the data in descending order.
+       void push_front(int, int, string); //abundance, otu, groupname
+       void insert(int, int, string); //abundance, otu, groupname
+       void push_back(int, string);  //abundance, groupname
        void pop_back();
        void resize(int);
        int size();
+       void clear();
        vector<individual>::reverse_iterator rbegin();
        vector<individual>::reverse_iterator rend();
        
        void print(ostream&);
+       void printHeaders(ostream&);
                
        RAbundVector getRAbundVector();
+       RAbundVector getRAbundVector2();
        SAbundVector getSAbundVector();
        OrderVector getOrderVector(map<string,int>*);
        SharedOrderVector getSharedOrderVector();
        SharedSAbundVector getSharedSAbundVector();
        SharedRAbundVector getSharedRAbundVector();
+       vector<SharedRAbundVector*> getSharedRAbundVectors();
+       vector<SharedRAbundFloatVector*> getSharedRAbundFloatVectors(vector<SharedRAbundVector*>);
        
 private:
        vector<individual>  data; 
+       vector<SharedRAbundVector*> lookup;
+       //GlobalData* globaldata;
+       //GroupMap* groupmap;
        int maxRank;
        int numBins;
        int numSeqs;
-       string group;   
+       string group;
+       int index;      
+       
+       int eliminateZeroOTUS(vector<SharedRAbundVector*>&);
 };