X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=treemap.h;h=9f10f375660be529a2b2b53e6a87745d426bba19;hb=d945488119ad368b180537f36ed40298ff170f39;hp=20bbcfee7090f0aad18e9eee8324358a2f69c5ba;hpb=60fdefb3a300b59c3bbeffdca8a5f1f30c6a43af;p=mothur.git diff --git a/treemap.h b/treemap.h index 20bbcfe..9f10f37 100644 --- a/treemap.h +++ b/treemap.h @@ -9,12 +9,9 @@ * */ -#include -#include -#include -#include -#include -#include "utilities.hpp" +#include "mothur.h" +#include "groupmap.h" +#include "listvector.hpp" /* This class is used by the read.tree command to build the tree container. */ @@ -23,10 +20,12 @@ struct GroupIndex { int vectorIndex; }; - +class GroupMap; +class ListVector; class TreeMap { public: + TreeMap() { m = MothurOut::getInstance(); } TreeMap(string); ~TreeMap(); void readMap(); @@ -34,18 +33,28 @@ public: int getNumSeqs(); void setIndex(string, int); //sequencename, index int getIndex(string); //returns vector index of sequence + bool isValidGroup(string); //return true if string is a valid group + void removeSeq(string); //removes a sequence, this is to accomadate trees that do not contain all the seqs in your groupfile string getGroup(string); + void addSeq(string, string); vector namesOfGroups; vector namesOfSeqs; + map seqsPerGroup; //groupname, number of seqs in that group. + map treemap; //sequence name and void print(ostream&); + void makeSim(vector); //takes groupmap info and fills treemap for use by tree.shared command. + void makeSim(ListVector*); //takes listvector info and fills treemap for use by tree.shared command. private: ifstream fileHandle; string groupFileName; int numGroups; map::iterator it; + map::iterator it2; void setNamesOfGroups(string); - map treemap; //sequence name and groupname + MothurOut* m; + + }; -#endif \ No newline at end of file +#endif