]> git.donarmstrong.com Git - mothur.git/blobdiff - counttable.cpp
added count file to trim.seqs, get.groups, get.lineage, get.seqs, heatmap.sim, list...
[mothur.git] / counttable.cpp
index bc9d4da05966b6b3fc3ec5fe0e751c21be7f180f..cd623ecbcf5fbea1cdd25fa8c9c2b872746da162 100644 (file)
@@ -661,6 +661,22 @@ vector<string> CountTable::getNamesOfSeqs() {
        }
 }
 /************************************************************/
+//returns the names of all unique sequences in file mapped to their seqCounts
+map<string, int> CountTable::getNameMap() {
+    try {
+        map<string, int> names;
+        for (map<string, int>::iterator it = indexNameMap.begin(); it != indexNameMap.end(); it++) {
+            names[it->first] = totals[it->second];
+        }
+        
+        return names;
+    }
+       catch(exception& e) {
+               m->errorOut(e, "CountTable", "getNameMap");
+               exit(1);
+       }
+}
+/************************************************************/
 //returns the names of all unique sequences in file
 vector<string> CountTable::getNamesOfSeqs(string group) {
     try {