+ if (list != NULL) { delete list; }
+ delete input;
+
+ outFilled.close();
+ remove(listNames[k].c_str());
+ rename(filledInList.c_str(), listNames[k].c_str());
+ }
+
+ return labelBin;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "ClusterSplitCommand", "completeListFile");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************
+int ClusterSplitCommand::mergeLists(vector<string> listNames, map<float, int> userLabels, ListVector* listSingle){
+ try {
+ if (outputDir == "") { outputDir += hasPath(distfile); }
+ fileroot = outputDir + getRootName(getSimpleName(distfile));
+
+ openOutputFile(fileroot+ tag + ".sabund", outSabund);
+ openOutputFile(fileroot+ tag + ".rabund", outRabund);
+ openOutputFile(fileroot+ tag + ".list", outList);
+
+ outputNames.push_back(fileroot+ tag + ".sabund");
+ outputNames.push_back(fileroot+ tag + ".rabund");
+ outputNames.push_back(fileroot+ tag + ".list");
+
+ map<float, int>::iterator itLabel;
+
+ //for each label needed
+ for(itLabel = userLabels.begin(); itLabel != userLabels.end(); itLabel++) {
+
+ string thisLabel;
+ if (itLabel->first == -1) { thisLabel = "unique"; }
+ else { thisLabel = toString(itLabel->first, length-1); }
+
+ outList << thisLabel << '\t' << itLabel->second << '\t';
+
+ RAbundVector* rabund = new RAbundVector();
+ rabund->setLabel(thisLabel);
+