7 * Created by Sarah Westcott on 1/26/09.
8 * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
14 #include "listvector.hpp"
16 /* This class is used by the read.tree command to build the tree container. */
28 TreeMap() { m = MothurOut::getInstance(); }
34 void setIndex(string, int); //sequencename, index
35 int getIndex(string); //returns vector index of sequence
36 bool isValidGroup(string); //return true if string is a valid group
37 void removeSeq(string); //removes a sequence, this is to accomadate trees that do not contain all the seqs in your groupfile
38 string getGroup(string);
39 void addSeq(string, string);
40 void addGroup(string s) { setNamesOfGroups(s); }
41 vector<string> getNamesOfGroups() {
42 sort(namesOfGroups.begin(), namesOfGroups.end());
45 vector<string> namesOfSeqs;
46 map<string,int> seqsPerGroup; //groupname, number of seqs in that group.
47 map<string, GroupIndex> treemap; //sequence name and <groupname, vector index>
49 void makeSim(vector<string>); //takes groupmap info and fills treemap for use by tree.shared command.
50 void makeSim(ListVector*); //takes listvector info and fills treemap for use by tree.shared command.
53 vector<string> namesOfGroups;
57 map<string, GroupIndex>::iterator it;
58 map<string, int>::iterator it2;
59 void setNamesOfGroups(string);