]> git.donarmstrong.com Git - mothur.git/blobdiff - collectsharedcommand.cpp
sffinfo bug with flow grams right index when clipQualRight=0
[mothur.git] / collectsharedcommand.cpp
index baebeb16298b28c3cd6372fe06a2de547e7bfbdc..dd1ec270334e09f1d316ce060c2ab8c185e0d313 100644 (file)
 //**********************************************************************************************************************
 vector<string> CollectSharedCommand::setParameters(){  
        try {
-               CommandParameter pshared("shared", "InputTypes", "", "", "none", "none", "none",false,true); parameters.push_back(pshared);
-               CommandParameter plabel("label", "String", "", "", "", "", "",false,false); parameters.push_back(plabel);
-               CommandParameter pfreq("freq", "Number", "", "100", "", "", "",false,false); parameters.push_back(pfreq);
-               CommandParameter pcalc("calc", "Multiple", "sharedchao-sharedsobs-sharedace-jabund-sorabund-jclass-sorclass-jest-sorest-thetayc-thetan-kstest-whittaker-sharednseqs-ochiai-anderberg-kulczynski-kulczynskicody-lennon-morisitahorn-braycurtis-odum-canberra-structeuclidean-structchord-hellinger-manhattan-structpearson-soergel-spearman-structkulczynski-speciesprofile-structchi2-hamming-gower-memchi2-memchord-memeuclidean-mempearson", "sharedsobs-sharedchao-sharedace-jabund-sorabund-jclass-sorclass-jest-sorest-thetayc-thetan", "", "", "",true,false); parameters.push_back(pcalc);
-               CommandParameter pall("all", "Boolean", "", "F", "", "", "",false,false); parameters.push_back(pall);
-               CommandParameter pgroups("groups", "String", "", "", "", "", "",false,false); parameters.push_back(pgroups);
-               CommandParameter pinputdir("inputdir", "String", "", "", "", "", "",false,false); parameters.push_back(pinputdir);
-               CommandParameter poutputdir("outputdir", "String", "", "", "", "", "",false,false); parameters.push_back(poutputdir);
+               CommandParameter pshared("shared", "InputTypes", "", "", "none", "none", "none","",false,true,true); parameters.push_back(pshared);
+               CommandParameter plabel("label", "String", "", "", "", "", "","",false,false); parameters.push_back(plabel);
+               CommandParameter pfreq("freq", "Number", "", "100", "", "", "","",false,false); parameters.push_back(pfreq);
+               CommandParameter pcalc("calc", "Multiple", "sharedchao-sharedsobs-sharedace-jabund-sorabund-jclass-sorclass-jest-sorest-thetayc-thetan-kstest-whittaker-sharednseqs-ochiai-anderberg-kulczynski-kulczynskicody-lennon-morisitahorn-braycurtis-odum-canberra-structeuclidean-structchord-hellinger-manhattan-structpearson-soergel-spearman-structkulczynski-speciesprofile-structchi2-hamming-gower-memchi2-memchord-memeuclidean-mempearson", "sharedsobs-sharedchao-sharedace-jabund-sorabund-jclass-sorclass-jest-sorest-thetayc-thetan", "", "", "","",true,false,true); parameters.push_back(pcalc);
+               CommandParameter pall("all", "Boolean", "", "F", "", "", "","",false,false); parameters.push_back(pall);
+               CommandParameter pgroups("groups", "String", "", "", "", "", "","",false,false); parameters.push_back(pgroups);
+               CommandParameter pinputdir("inputdir", "String", "", "", "", "", "","",false,false); parameters.push_back(pinputdir);
+               CommandParameter poutputdir("outputdir", "String", "", "", "", "", "","",false,false); parameters.push_back(poutputdir);
                
                vector<string> myArray;
                for (int i = 0; i < parameters.size(); i++) {   myArray.push_back(parameters[i].name);          }
@@ -98,63 +98,59 @@ string CollectSharedCommand::getHelpString(){
        }
 }
 //**********************************************************************************************************************
-string CollectSharedCommand::getOutputFileNameTag(string type, string inputName=""){   
-       try {
-        string outputFileName = "";
-               map<string, vector<string> >::iterator it;
+string CollectSharedCommand::getOutputPattern(string type) {
+    try {
+        string pattern = "";
         
-        //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);
-       }
+        if (type == "sharedchao")               {  pattern =  "[filename],shared.chao";     }
+        else if (type == "sharedsobs")          {  pattern =  "[filename],shared.sobs";     }
+        else if (type == "sharedace")           {  pattern =  "[filename],shared.ace";      }
+        else if (type == "jabund")              {  pattern =  "[filename],jabund";          }
+        else if (type == "sorabund")            {  pattern =  "[filename],sorabund";        }
+        else if (type == "jclass")              {  pattern =  "[filename],jclass";          }
+        else if (type == "sorclass")            {  pattern =  "[filename],sorclass";        }
+        else if (type == "jest")                {  pattern =  "[filename],jest";            }
+        else if (type == "sorest")              {  pattern =  "[filename],sorest";          }
+        else if (type == "thetayc")             {  pattern =  "[filename],thetayc";         }
+        else if (type == "thetan")              {  pattern =  "[filename],thetan";          }
+        else if (type == "kstest")              {  pattern =  "[filename],kstest";          }
+        else if (type == "whittaker")           {  pattern =  "[filename],whittaker";       }
+        else if (type == "sharednseqs")         {  pattern =  "[filename],shared.nseqs";    }
+        else if (type == "ochiai")              {  pattern =  "[filename],ochiai";          }
+        else if (type == "anderberg")           {  pattern =  "[filename],anderberg";       }
+        else if (type == "kulczynski")          {  pattern =  "[filename],kulczynski";      }
+        else if (type == "kulczynskicody")      {  pattern =  "[filename],kulczynskicody";  }
+        else if (type == "lennon")              {  pattern =  "[filename],lennon";          }
+        else if (type == "morisitahorn")        {  pattern =  "[filename],morisitahorn";    }
+        else if (type == "braycurtis")          {  pattern =  "[filename],braycurtis";      }
+        else if (type == "odum")                {  pattern =  "[filename],odum";            }
+        else if (type == "canberra")            {  pattern =  "[filename],canberra";        }
+        else if (type == "structeuclidean")     {  pattern =  "[filename],structeuclidean"; }
+        else if (type == "structchord")         {  pattern =  "[filename],structchord";     }
+        else if (type == "hellinger")           {  pattern =  "[filename],hellinger";       }
+        else if (type == "manhattan")           {  pattern =  "[filename],manhattan";       }
+        else if (type == "structpearson")       {  pattern =  "[filename],structpearson";   }
+        else if (type == "soergel")             {  pattern =  "[filename],soergel";         }
+        else if (type == "spearman")            {  pattern =  "[filename],spearman";        }
+        else if (type == "structkulczynski")    {  pattern =  "[filename],structkulczynski";}
+        else if (type == "structchi2")          {  pattern =  "[filename],structchi2";      }
+        else if (type == "speciesprofile")      {  pattern =  "[filename],speciesprofile";  }
+        else if (type == "hamming")             {  pattern =  "[filename],hamming";         }
+        else if (type == "gower")               {  pattern =  "[filename],gower";           }
+        else if (type == "memchi2")             {  pattern =  "[filename],memchi2";         }
+        else if (type == "memchord")            {  pattern =  "[filename],memchord";        }
+        else if (type == "memeuclidean")        {  pattern =  "[filename],memeuclidean";    }
+        else if (type == "mempearson")          {  pattern =  "[filename],mempearson";      }
+        else { m->mothurOut("[ERROR]: No definition for type " + type + " output pattern.\n"); m->control_pressed = true;  }
+        
+        return pattern;
+    }
+    catch(exception& e) {
+        m->errorOut(e, "CollectSharedCommand", "getOutputPattern");
+        exit(1);
+    }
 }
+
 //**********************************************************************************************************************
 CollectSharedCommand::CollectSharedCommand(){  
        try {
@@ -340,128 +336,130 @@ CollectSharedCommand::CollectSharedCommand(string option)  {
                        if (abort == false) {
                                
                                string fileNameRoot = outputDir + m->getRootName(m->getSimpleName(sharedfile));
-                               
+                               map<string, string> variables; 
+                variables["[filename]"] = fileNameRoot;
+                
                                ValidCalculators validCalculator;
                                
                                for (int i=0; i<Estimators.size(); i++) {
                                        if (validCalculator.isValidCalculator("shared", Estimators[i]) == true) { 
                                                if (Estimators[i] == "sharedchao") { 
-                                                       cDisplays.push_back(new CollectDisplay(new SharedChao1(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("sharedchao"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("sharedchao")); outputTypes["sharedchao"].push_back(fileNameRoot+getOutputFileNameTag("sharedchao"));
+                                                       cDisplays.push_back(new CollectDisplay(new SharedChao1(), new SharedOneColumnFile(getOutputFileName("sharedchao", variables))));
+                                                       outputNames.push_back(getOutputFileName("sharedchao", variables)); outputTypes["sharedchao"].push_back(getOutputFileName("sharedchao", variables));
                                                }else if (Estimators[i] == "sharedsobs") { 
-                                                       cDisplays.push_back(new CollectDisplay(new SharedSobsCS(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("sharedsobs"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("sharedsobs")); outputTypes["sharedsobs"].push_back(fileNameRoot+getOutputFileNameTag("sharedsobs"));
+                                                       cDisplays.push_back(new CollectDisplay(new SharedSobsCS(), new SharedOneColumnFile(getOutputFileName("sharedsobs", variables))));
+                                                       outputNames.push_back(getOutputFileName("sharedsobs", variables)); outputTypes["sharedsobs"].push_back(getOutputFileName("sharedsobs", variables));
                                                }else if (Estimators[i] == "sharedace") { 
-                                                       cDisplays.push_back(new CollectDisplay(new SharedAce(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("sharedace"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("sharedace")); outputTypes["sharedace"].push_back(fileNameRoot+getOutputFileNameTag("sharedace"));
+                                                       cDisplays.push_back(new CollectDisplay(new SharedAce(), new SharedOneColumnFile(getOutputFileName("sharedace", variables))));
+                                                       outputNames.push_back(getOutputFileName("sharedace", variables)); outputTypes["sharedace"].push_back(getOutputFileName("sharedace", variables));
                                                }else if (Estimators[i] == "jabund") {  
-                                                       cDisplays.push_back(new CollectDisplay(new JAbund(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("jabund"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("jabund")); outputTypes["jabund"].push_back(fileNameRoot+getOutputFileNameTag("jabund"));
+                                                       cDisplays.push_back(new CollectDisplay(new JAbund(), new SharedOneColumnFile(getOutputFileName("jabund", variables))));
+                                                       outputNames.push_back(getOutputFileName("jabund", variables)); outputTypes["jabund"].push_back(getOutputFileName("jabund", variables));
                                                }else if (Estimators[i] == "sorabund") { 
-                                                       cDisplays.push_back(new CollectDisplay(new SorAbund(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("sorabund"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("sorabund")); outputTypes["sorabund"].push_back(fileNameRoot+getOutputFileNameTag("sorabund"));
+                                                       cDisplays.push_back(new CollectDisplay(new SorAbund(), new SharedOneColumnFile(getOutputFileName("sorabund", variables))));
+                                                       outputNames.push_back(getOutputFileName("sorabund", variables)); outputTypes["sorabund"].push_back(getOutputFileName("sorabund", variables));
                                                }else if (Estimators[i] == "jclass") { 
-                                                       cDisplays.push_back(new CollectDisplay(new Jclass(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("jclass"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("jclass")); outputTypes["jclass"].push_back(fileNameRoot+getOutputFileNameTag("jclass"));
+                                                       cDisplays.push_back(new CollectDisplay(new Jclass(), new SharedOneColumnFile(getOutputFileName("jclass", variables))));
+                                                       outputNames.push_back(getOutputFileName("jclass", variables)); outputTypes["jclass"].push_back(getOutputFileName("jclass", variables));
                                                }else if (Estimators[i] == "sorclass") { 
-                                                       cDisplays.push_back(new CollectDisplay(new SorClass(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("sorclass"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("sorclass")); outputTypes["sorclass"].push_back(fileNameRoot+getOutputFileNameTag("sorclass"));
+                                                       cDisplays.push_back(new CollectDisplay(new SorClass(), new SharedOneColumnFile(getOutputFileName("sorclass", variables))));
+                                                       outputNames.push_back(getOutputFileName("sorclass", variables)); outputTypes["sorclass"].push_back(getOutputFileName("sorclass", variables));
                                                }else if (Estimators[i] == "jest") { 
-                                                       cDisplays.push_back(new CollectDisplay(new Jest(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("jest"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("jest")); outputTypes["jest"].push_back(fileNameRoot+getOutputFileNameTag("jest"));
+                                                       cDisplays.push_back(new CollectDisplay(new Jest(), new SharedOneColumnFile(getOutputFileName("jest", variables))));
+                                                       outputNames.push_back(getOutputFileName("jest", variables)); outputTypes["jest"].push_back(getOutputFileName("jest", variables));
                                                }else if (Estimators[i] == "sorest") { 
-                                                       cDisplays.push_back(new CollectDisplay(new SorEst(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("sorest"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("sorest")); outputTypes["sorest"].push_back(fileNameRoot+getOutputFileNameTag("sorest"));
+                                                       cDisplays.push_back(new CollectDisplay(new SorEst(), new SharedOneColumnFile(getOutputFileName("sorest", variables))));
+                                                       outputNames.push_back(getOutputFileName("sorest", variables)); outputTypes["sorest"].push_back(getOutputFileName("sorest", variables));
                                                }else if (Estimators[i] == "thetayc") { 
-                                                       cDisplays.push_back(new CollectDisplay(new ThetaYC(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("thetayc"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("thetayc")); outputTypes["thetayc"].push_back(fileNameRoot+getOutputFileNameTag("thetayc"));
+                                                       cDisplays.push_back(new CollectDisplay(new ThetaYC(), new SharedOneColumnFile(getOutputFileName("thetayc", variables))));
+                                                       outputNames.push_back(getOutputFileName("thetayc", variables)); outputTypes["thetayc"].push_back(getOutputFileName("thetayc", variables));
                                                }else if (Estimators[i] == "thetan") { 
-                                                       cDisplays.push_back(new CollectDisplay(new ThetaN(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("thetan"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("thetan")); outputTypes["thetan"].push_back(fileNameRoot+getOutputFileNameTag("thetan"));
+                                                       cDisplays.push_back(new CollectDisplay(new ThetaN(), new SharedOneColumnFile(getOutputFileName("thetan", variables))));
+                                                       outputNames.push_back(getOutputFileName("thetan", variables)); outputTypes["thetan"].push_back(getOutputFileName("thetan", variables));
                                                }else if (Estimators[i] == "kstest") { 
-                                                       cDisplays.push_back(new CollectDisplay(new KSTest(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("kstest"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("kstest")); outputTypes["kstest"].push_back(fileNameRoot+getOutputFileNameTag("kstest"));
+                                                       cDisplays.push_back(new CollectDisplay(new KSTest(), new SharedOneColumnFile(getOutputFileName("kstest", variables))));
+                                                       outputNames.push_back(getOutputFileName("kstest", variables)); outputTypes["kstest"].push_back(getOutputFileName("kstest", variables));
                                                }else if (Estimators[i] == "whittaker") { 
-                                                       cDisplays.push_back(new CollectDisplay(new Whittaker(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("whittaker"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("whittaker")); outputTypes["whittaker"].push_back(fileNameRoot+getOutputFileNameTag("whittaker"));
+                                                       cDisplays.push_back(new CollectDisplay(new Whittaker(), new SharedOneColumnFile(getOutputFileName("whittaker", variables))));
+                                                       outputNames.push_back(getOutputFileName("whittaker", variables)); outputTypes["whittaker"].push_back(getOutputFileName("whittaker", variables));
                                                }else if (Estimators[i] == "sharednseqs") { 
-                                                       cDisplays.push_back(new CollectDisplay(new SharedNSeqs(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("sharednseqs"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("sharednseqs")); outputTypes["shared.nseqs"].push_back(fileNameRoot+getOutputFileNameTag("sharednseqs"));
+                                                       cDisplays.push_back(new CollectDisplay(new SharedNSeqs(), new SharedOneColumnFile(getOutputFileName("sharednseqs", variables))));
+                                                       outputNames.push_back(getOutputFileName("sharednseqs", variables)); outputTypes["shared.nseqs"].push_back(getOutputFileName("sharednseqs", variables));
                                                }else if (Estimators[i] == "ochiai") { 
-                                                       cDisplays.push_back(new CollectDisplay(new Ochiai(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("ochiai"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("ochiai")); outputTypes["ochiai"].push_back(fileNameRoot+getOutputFileNameTag("ochiai"));
+                                                       cDisplays.push_back(new CollectDisplay(new Ochiai(), new SharedOneColumnFile(getOutputFileName("ochiai", variables))));
+                                                       outputNames.push_back(getOutputFileName("ochiai", variables)); outputTypes["ochiai"].push_back(getOutputFileName("ochiai", variables));
                                                }else if (Estimators[i] == "anderberg") { 
-                                                       cDisplays.push_back(new CollectDisplay(new Anderberg(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("anderberg"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("anderberg")); outputTypes["anderberg"].push_back(fileNameRoot+getOutputFileNameTag("anderberg"));
+                                                       cDisplays.push_back(new CollectDisplay(new Anderberg(), new SharedOneColumnFile(getOutputFileName("anderberg", variables))));
+                                                       outputNames.push_back(getOutputFileName("anderberg", variables)); outputTypes["anderberg"].push_back(getOutputFileName("anderberg", variables));
                                                }else if (Estimators[i] == "kulczynski") { 
-                                                       cDisplays.push_back(new CollectDisplay(new Kulczynski(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("kulczynski"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("kulczynski")); outputTypes["kulczynski"].push_back(fileNameRoot+getOutputFileNameTag("kulczynski"));
+                                                       cDisplays.push_back(new CollectDisplay(new Kulczynski(), new SharedOneColumnFile(getOutputFileName("kulczynski", variables))));
+                                                       outputNames.push_back(getOutputFileName("kulczynski", variables)); outputTypes["kulczynski"].push_back(getOutputFileName("kulczynski", variables));
                                                }else if (Estimators[i] == "kulczynskicody") { 
-                                                       cDisplays.push_back(new CollectDisplay(new KulczynskiCody(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("kulczynskicody"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("kulczynskicody")); outputTypes["kulczynskicody"].push_back(fileNameRoot+getOutputFileNameTag("kulczynskicody"));
+                                                       cDisplays.push_back(new CollectDisplay(new KulczynskiCody(), new SharedOneColumnFile(getOutputFileName("kulczynskicody", variables))));
+                                                       outputNames.push_back(getOutputFileName("kulczynskicody", variables)); outputTypes["kulczynskicody"].push_back(getOutputFileName("kulczynskicody", variables));
                                                }else if (Estimators[i] == "lennon") { 
-                                                       cDisplays.push_back(new CollectDisplay(new Lennon(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("lennon"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("lennon")); outputTypes["lennon"].push_back(fileNameRoot+getOutputFileNameTag("lennon"));
+                                                       cDisplays.push_back(new CollectDisplay(new Lennon(), new SharedOneColumnFile(getOutputFileName("lennon", variables))));
+                                                       outputNames.push_back(getOutputFileName("lennon", variables)); outputTypes["lennon"].push_back(getOutputFileName("lennon", variables));
                                                }else if (Estimators[i] == "morisitahorn") { 
-                                                       cDisplays.push_back(new CollectDisplay(new MorHorn(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("morisitahorn"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("morisitahorn")); outputTypes["morisitahorn"].push_back(fileNameRoot+getOutputFileNameTag("morisitahorn"));
+                                                       cDisplays.push_back(new CollectDisplay(new MorHorn(), new SharedOneColumnFile(getOutputFileName("morisitahorn", variables))));
+                                                       outputNames.push_back(getOutputFileName("morisitahorn", variables)); outputTypes["morisitahorn"].push_back(getOutputFileName("morisitahorn", variables));
                                                }else if (Estimators[i] == "braycurtis") { 
-                                                       cDisplays.push_back(new CollectDisplay(new BrayCurtis(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("braycurtis"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("braycurtis")); outputTypes["braycurtis"].push_back(fileNameRoot+getOutputFileNameTag("braycurtis"));
+                                                       cDisplays.push_back(new CollectDisplay(new BrayCurtis(), new SharedOneColumnFile(getOutputFileName("braycurtis", variables))));
+                                                       outputNames.push_back(getOutputFileName("braycurtis", variables)); outputTypes["braycurtis"].push_back(getOutputFileName("braycurtis", variables));
                                                }else if (Estimators[i] == "odum") { 
-                                                       cDisplays.push_back(new CollectDisplay(new Odum(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("odum"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("odum")); outputTypes["odum"].push_back(fileNameRoot+getOutputFileNameTag("odum"));
+                                                       cDisplays.push_back(new CollectDisplay(new Odum(), new SharedOneColumnFile(getOutputFileName("odum", variables))));
+                                                       outputNames.push_back(getOutputFileName("odum", variables)); outputTypes["odum"].push_back(getOutputFileName("odum", variables));
                                                }else if (Estimators[i] == "canberra") { 
-                                                       cDisplays.push_back(new CollectDisplay(new Canberra(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("canberra"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("canberra")); outputTypes["canberra"].push_back(fileNameRoot+getOutputFileNameTag("canberra"));
+                                                       cDisplays.push_back(new CollectDisplay(new Canberra(), new SharedOneColumnFile(getOutputFileName("canberra", variables))));
+                                                       outputNames.push_back(getOutputFileName("canberra", variables)); outputTypes["canberra"].push_back(getOutputFileName("canberra", variables));
                                                }else if (Estimators[i] == "structeuclidean") { 
-                                                       cDisplays.push_back(new CollectDisplay(new StructEuclidean(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("structeuclidean"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("structeuclidean")); outputTypes["structeuclidean"].push_back(fileNameRoot+getOutputFileNameTag("structeuclidean"));
+                                                       cDisplays.push_back(new CollectDisplay(new StructEuclidean(), new SharedOneColumnFile(getOutputFileName("structeuclidean", variables))));
+                                                       outputNames.push_back(getOutputFileName("structeuclidean", variables)); outputTypes["structeuclidean"].push_back(getOutputFileName("structeuclidean", variables));
                                                }else if (Estimators[i] == "structchord") { 
-                                                       cDisplays.push_back(new CollectDisplay(new StructChord(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("structchord"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("structchord")); outputTypes["structchord"].push_back(fileNameRoot+getOutputFileNameTag("structchord"));
+                                                       cDisplays.push_back(new CollectDisplay(new StructChord(), new SharedOneColumnFile(getOutputFileName("structchord", variables))));
+                                                       outputNames.push_back(getOutputFileName("structchord", variables)); outputTypes["structchord"].push_back(getOutputFileName("structchord", variables));
                                                }else if (Estimators[i] == "hellinger") { 
-                                                       cDisplays.push_back(new CollectDisplay(new Hellinger(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("hellinger"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("hellinger")); outputTypes["hellinger"].push_back(fileNameRoot+getOutputFileNameTag("hellinger"));
+                                                       cDisplays.push_back(new CollectDisplay(new Hellinger(), new SharedOneColumnFile(getOutputFileName("hellinger", variables))));
+                                                       outputNames.push_back(getOutputFileName("hellinger", variables)); outputTypes["hellinger"].push_back(getOutputFileName("hellinger", variables));
                                                }else if (Estimators[i] == "manhattan") { 
-                                                       cDisplays.push_back(new CollectDisplay(new Manhattan(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("manhattan"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("manhattan")); outputTypes["manhattan"].push_back(fileNameRoot+getOutputFileNameTag("manhattan"));
+                                                       cDisplays.push_back(new CollectDisplay(new Manhattan(), new SharedOneColumnFile(getOutputFileName("manhattan", variables))));
+                                                       outputNames.push_back(getOutputFileName("manhattan", variables)); outputTypes["manhattan"].push_back(getOutputFileName("manhattan", variables));
                                                }else if (Estimators[i] == "structpearson") { 
-                                                       cDisplays.push_back(new CollectDisplay(new StructPearson(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("structpearson"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("structpearson")); outputTypes["structpearson"].push_back(fileNameRoot+getOutputFileNameTag("structpearson"));
+                                                       cDisplays.push_back(new CollectDisplay(new StructPearson(), new SharedOneColumnFile(getOutputFileName("structpearson", variables))));
+                                                       outputNames.push_back(getOutputFileName("structpearson", variables)); outputTypes["structpearson"].push_back(getOutputFileName("structpearson", variables));
                                                }else if (Estimators[i] == "soergel") { 
-                                                       cDisplays.push_back(new CollectDisplay(new Soergel(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("soergel"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("soergel")); outputTypes["soergel"].push_back(fileNameRoot+getOutputFileNameTag("soergel"));
+                                                       cDisplays.push_back(new CollectDisplay(new Soergel(), new SharedOneColumnFile(getOutputFileName("soergel", variables))));
+                                                       outputNames.push_back(getOutputFileName("soergel", variables)); outputTypes["soergel"].push_back(getOutputFileName("soergel", variables));
                                                }else if (Estimators[i] == "spearman") { 
-                                                       cDisplays.push_back(new CollectDisplay(new Spearman(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("spearman"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("spearman")); outputTypes["spearman"].push_back(fileNameRoot+getOutputFileNameTag("spearman"));
+                                                       cDisplays.push_back(new CollectDisplay(new Spearman(), new SharedOneColumnFile(getOutputFileName("spearman", variables))));
+                                                       outputNames.push_back(getOutputFileName("spearman", variables)); outputTypes["spearman"].push_back(getOutputFileName("spearman", variables));
                                                }else if (Estimators[i] == "structkulczynski") { 
-                                                       cDisplays.push_back(new CollectDisplay(new StructKulczynski(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("structkulczynski"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("structkulczynski")); outputTypes["structkulczynski"].push_back(fileNameRoot+getOutputFileNameTag("structkulczynski"));
+                                                       cDisplays.push_back(new CollectDisplay(new StructKulczynski(), new SharedOneColumnFile(getOutputFileName("structkulczynski", variables))));
+                                                       outputNames.push_back(getOutputFileName("structkulczynski", variables)); outputTypes["structkulczynski"].push_back(getOutputFileName("structkulczynski", variables));
                                                }else if (Estimators[i] == "speciesprofile") { 
-                                                       cDisplays.push_back(new CollectDisplay(new SpeciesProfile(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("speciesprofile"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("speciesprofile")); outputTypes["speciesprofile"].push_back(fileNameRoot+getOutputFileNameTag("speciesprofile"));
+                                                       cDisplays.push_back(new CollectDisplay(new SpeciesProfile(), new SharedOneColumnFile(getOutputFileName("speciesprofile", variables))));
+                                                       outputNames.push_back(getOutputFileName("speciesprofile", variables)); outputTypes["speciesprofile"].push_back(getOutputFileName("speciesprofile", variables));
                                                }else if (Estimators[i] == "hamming") { 
-                                                       cDisplays.push_back(new CollectDisplay(new Hamming(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("hamming"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("hamming")); outputTypes["hamming"].push_back(fileNameRoot+getOutputFileNameTag("hamming"));
+                                                       cDisplays.push_back(new CollectDisplay(new Hamming(), new SharedOneColumnFile(getOutputFileName("hamming", variables))));
+                                                       outputNames.push_back(getOutputFileName("hamming", variables)); outputTypes["hamming"].push_back(getOutputFileName("hamming", variables));
                                                }else if (Estimators[i] == "structchi2") { 
-                                                       cDisplays.push_back(new CollectDisplay(new StructChi2(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("structchi2"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("structchi2")); outputTypes["structchi2"].push_back(fileNameRoot+getOutputFileNameTag("structchi2"));
+                                                       cDisplays.push_back(new CollectDisplay(new StructChi2(), new SharedOneColumnFile(getOutputFileName("structchi2", variables))));
+                                                       outputNames.push_back(getOutputFileName("structchi2", variables)); outputTypes["structchi2"].push_back(getOutputFileName("structchi2", variables));
                                                }else if (Estimators[i] == "gower") { 
-                                                       cDisplays.push_back(new CollectDisplay(new Gower(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("gower"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("gower")); outputTypes["gower"].push_back(fileNameRoot+getOutputFileNameTag("gower"));
+                                                       cDisplays.push_back(new CollectDisplay(new Gower(), new SharedOneColumnFile(getOutputFileName("gower", variables))));
+                                                       outputNames.push_back(getOutputFileName("gower", variables)); outputTypes["gower"].push_back(getOutputFileName("gower", variables));
                                                }else if (Estimators[i] == "memchi2") { 
-                                                       cDisplays.push_back(new CollectDisplay(new MemChi2(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("memchi2"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("memchi2")); outputTypes["memchi2"].push_back(fileNameRoot+getOutputFileNameTag("memchi2"));
+                                                       cDisplays.push_back(new CollectDisplay(new MemChi2(), new SharedOneColumnFile(getOutputFileName("memchi2", variables))));
+                                                       outputNames.push_back(getOutputFileName("memchi2", variables)); outputTypes["memchi2"].push_back(getOutputFileName("memchi2", variables));
                                                }else if (Estimators[i] == "memchord") { 
-                                                       cDisplays.push_back(new CollectDisplay(new MemChord(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("memchord"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("memchord")); outputTypes["memchord"].push_back(fileNameRoot+getOutputFileNameTag("memchord"));
+                                                       cDisplays.push_back(new CollectDisplay(new MemChord(), new SharedOneColumnFile(getOutputFileName("memchord", variables))));
+                                                       outputNames.push_back(getOutputFileName("memchord", variables)); outputTypes["memchord"].push_back(getOutputFileName("memchord", variables));
                                                }else if (Estimators[i] == "memeuclidean") { 
-                                                       cDisplays.push_back(new CollectDisplay(new MemEuclidean(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("memeuclidean"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("memeuclidean")); outputTypes["memeuclidean"].push_back(fileNameRoot+getOutputFileNameTag("memeuclidean"));
+                                                       cDisplays.push_back(new CollectDisplay(new MemEuclidean(), new SharedOneColumnFile(getOutputFileName("memeuclidean", variables))));
+                                                       outputNames.push_back(getOutputFileName("memeuclidean", variables)); outputTypes["memeuclidean"].push_back(getOutputFileName("memeuclidean", variables));
                                                }else if (Estimators[i] == "mempearson") { 
-                                                       cDisplays.push_back(new CollectDisplay(new MemPearson(), new SharedOneColumnFile(fileNameRoot+getOutputFileNameTag("mempearson"))));
-                                                       outputNames.push_back(fileNameRoot+getOutputFileNameTag("mempearson")); outputTypes["mempearson"].push_back(fileNameRoot+getOutputFileNameTag("mempearson"));
+                                                       cDisplays.push_back(new CollectDisplay(new MemPearson(), new SharedOneColumnFile(getOutputFileName("mempearson", variables))));
+                                                       outputNames.push_back(getOutputFileName("mempearson", variables)); outputTypes["mempearson"].push_back(getOutputFileName("mempearson", variables));
                                                }
                                                
                                        }