X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=counttable.h;h=04e26d775bb84042ea409e2d18694eeaa216c4df;hb=01f8d2c7d982a6209211f5abbcf2a086fdf60d0a;hp=8c970199babf9d45f3a624d3456d39732fc3e5e2;hpb=fdfbfe59134dd7dd3e49d90609d129128ba2d370;p=mothur.git diff --git a/counttable.h b/counttable.h index 8c97019..04e26d7 100644 --- a/counttable.h +++ b/counttable.h @@ -37,6 +37,7 @@ #include "mothurout.h" +#include "listvector.hpp" class CountTable { @@ -46,10 +47,17 @@ class CountTable { ~CountTable() {} int readTable(string); + bool testGroups(string file); //used to check if file has group data without reading it. bool hasGroupInfo() { return hasGroups; } int getNumGroups() { return groups.size(); } vector getNamesOfGroups() { return groups; } //returns group names, if no group info vector is blank. + + int push_back(string); //add a sequence + int push_back(string, int); //add a sequence + int push_back(string, vector); //add a sequence with group info + int get(string); //returns unique sequence index for reading distance matrices like NameAssignment + int size() { return indexNameMap.size(); } vector getGroupCounts(string); //returns group counts for a seq passed in, if no group info is in file vector is blank. Order is the same as the groups returned by getGroups function. int getGroupCount(string, string); //returns number of seqs for that group for that seq @@ -58,7 +66,10 @@ class CountTable { int getNumSeqs() { return total; } //return total number of seqs int getNumUniqueSeqs() { return uniques; } //return number of unique/representative seqs int getGroupIndex(string); //returns index in getGroupCounts vector of specific group + vector getNamesOfSeqs(); + int mergeCounts(string, string); //combines counts for 2 seqs, saving under the first name passed in. + ListVector getListVector(); private: string filename;