+string CollectSharedCommand::getOutputFileNameTag(string type, string inputName=""){
+ try {
+ string outputFileName = "";
+ map<string, vector<string> >::iterator it;
+
+ //is this a type this command creates
+ it = outputTypes.find(type);
+ if (it == outputTypes.end()) { m->mothurOut("[ERROR]: this command doesn't create a " + type + " output file.\n"); }
+ else {
+ if (type == "sharedchao") { outputFileName = "shared.chao"; }
+ else if (type == "sharedsobs") { outputFileName = "shared.sobs"; }
+ else if (type == "sharedace") { outputFileName = "shared.ace"; }
+ else if (type == "jabund") { outputFileName = "jabund"; }
+ else if (type == "sorabund") { outputFileName = "sorabund"; }
+ else if (type == "jclass") { outputFileName = "jclass"; }
+ else if (type == "sorclass") { outputFileName = "sorclass"; }
+ else if (type == "jest") { outputFileName = "jest"; }
+ else if (type == "sorest") { outputFileName = "sorest"; }
+ else if (type == "thetayc") { outputFileName = "thetayc"; }
+ else if (type == "thetan") { outputFileName = "thetan"; }
+ else if (type == "kstest") { outputFileName = "kstest"; }
+ else if (type == "whittaker") { outputFileName = "whittaker"; }
+ else if (type == "sharednseqs") { outputFileName = "shared.nseqs"; }
+ else if (type == "ochiai") { outputFileName = "ochiai"; }
+ else if (type == "anderberg") { outputFileName = "anderberg"; }
+ else if (type == "kulczynski") { outputFileName = "kulczynski"; }
+ else if (type == "kulczynskicody") { outputFileName = "kulczynskicody"; }
+ else if (type == "lennon") { outputFileName = "lennon"; }
+ else if (type == "morisitahorn") { outputFileName = "morisitahorn"; }
+ else if (type == "braycurtis") { outputFileName = "braycurtis"; }
+ else if (type == "odum") { outputFileName = "odum"; }
+ else if (type == "canberra") { outputFileName = "canberra"; }
+ else if (type == "structeuclidean") { outputFileName = "structeuclidean"; }
+ else if (type == "structchord") { outputFileName = "structchord"; }
+ else if (type == "hellinger") { outputFileName = "hellinger"; }
+ else if (type == "manhattan") { outputFileName = "manhattan"; }
+ else if (type == "structpearson") { outputFileName = "structpearson"; }
+ else if (type == "soergel") { outputFileName = "soergel"; }
+ else if (type == "spearman") { outputFileName = "spearman"; }
+ else if (type == "structkulczynski") { outputFileName = "structkulczynski";}
+ else if (type == "structchi2") { outputFileName = "structchi2"; }
+ else if (type == "speciesprofile") { outputFileName = "speciesprofile"; }
+ else if (type == "hamming") { outputFileName = "hamming"; }
+ else if (type == "gower") { outputFileName = "gower"; }
+ else if (type == "memchi2") { outputFileName = "memchi2"; }
+ else if (type == "memchord") { outputFileName = "memchord"; }
+ else if (type == "memeuclidean") { outputFileName = "memeuclidean"; }
+ else if (type == "mempearson") { outputFileName = "mempearson"; }
+ else { m->mothurOut("[ERROR]: No definition for type " + type + " output file tag.\n"); m->control_pressed = true; }
+ }
+ return outputFileName;
+ }
+ catch(exception& e) {
+ m->errorOut(e, "CollectSharedCommand", "getOutputFileNameTag");
+ exit(1);
+ }
+}
+//**********************************************************************************************************************