+ //process each distance file
+ for (int i = 0; i < numGroups; i++) {
+
+ string options = "";
+ if (classic) { options = "fasta=" + (fastafile + "." + toString(i) + ".temp") + ", processors=" + toString(processors) + ", output=lt"; }
+ else { options = "fasta=" + (fastafile + "." + toString(i) + ".temp") + ", processors=" + toString(processors) + ", cutoff=" + toString(distCutoff); }
+ if (outputDir != "") { options += ", outputdir=" + outputDir; }
+
+ m->mothurOut("/******************************************/"); m->mothurOutEndLine();
+
+ Command* command = new DistanceCommand(options);
+
+ m->mothurOut("/******************************************/"); m->mothurOutEndLine();
+
+ command->execute();
+ delete command;
+
+ m->mothurRemove((fastafile + "." + toString(i) + ".temp"));
+
+ //remove old names files just in case
+ if (namefile != "") { m->mothurRemove((namefile + "." + toString(i) + ".temp")); }
+ else { m->mothurRemove((countfile + "." + toString(i) + ".temp")); }
+ }
+
+ vector<string> tempDistFiles;
+ for(int i=0;i<numGroups;i++){
+ if (outputDir == "") { outputDir = m->hasPath(fastafile); }
+ string tempDistFile = "";
+ if (classic) { tempDistFile = outputDir + m->getRootName(m->getSimpleName((fastafile + "." + toString(i) + ".temp"))) + "phylip.dist";}
+ else { tempDistFile = outputDir + m->getRootName(m->getSimpleName((fastafile + "." + toString(i) + ".temp"))) + "dist"; }
+ tempDistFiles.push_back(tempDistFile);
+ }
+
+ splitNames(seqGroup, numGroups, tempDistFiles);
+
+ if (m->control_pressed) { for (int i = 0; i < dists.size(); i++) { m->mothurRemove((dists[i].begin()->first)); m->mothurRemove((dists[i].begin()->second)); } dists.clear(); }