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