+void SharedRAbundFloatVector::printHeaders(ostream& output){
+ try {
+ string snumBins = toString(numBins);
+ output << "label\tGroup\tnumOtus\t";
+ if (m->sharedHeaderMode == "tax") {
+ for (int i = 0; i < numBins; i++) {
+
+ //if there is a bin label use it otherwise make one
+ string binLabel = "PhyloType";
+ string sbinNumber = toString(i+1);
+ if (sbinNumber.length() < snumBins.length()) {
+ int diff = snumBins.length() - sbinNumber.length();
+ for (int h = 0; h < diff; h++) { binLabel += "0"; }
+ }
+ binLabel += sbinNumber;
+ if (i < m->currentBinLabels.size()) { binLabel = m->currentBinLabels[i]; }
+
+ output << binLabel << '\t';
+ }
+ output << endl;
+ }else {
+ for (int i = 0; i < numBins; i++) {
+ //if there is a bin label use it otherwise make one
+ string binLabel = "Otu";
+ string sbinNumber = toString(i+1);
+ if (sbinNumber.length() < snumBins.length()) {
+ int diff = snumBins.length() - sbinNumber.length();
+ for (int h = 0; h < diff; h++) { binLabel += "0"; }
+ }
+ binLabel += sbinNumber;
+ if (i < m->currentBinLabels.size()) { binLabel = m->currentBinLabels[i]; }
+
+ output << binLabel << '\t';
+ }
+
+ output << endl;
+ }
+
+ m->printedHeaders = true;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "SharedRAbundVector", "printHeaders");
+ exit(1);
+ }
+}
+/***********************************************************************/