X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=getlistcountcommand.cpp;fp=getlistcountcommand.cpp;h=23c0eaf0dd1852e9406fc600ce09ae8e80042431;hb=260ae19c36cb11a53ddc5a75b5e507f8dd8b31d6;hp=43280edd76b1c924ed87572412977f682d3d7b17;hpb=d84bb41d7dadcfa2c67ce5edb9b94060e5659fa7;p=mothur.git diff --git a/getlistcountcommand.cpp b/getlistcountcommand.cpp index 43280ed..23c0eaf 100644 --- a/getlistcountcommand.cpp +++ b/getlistcountcommand.cpp @@ -46,7 +46,7 @@ GetListCountCommand::GetListCountCommand(string option) { it = parameters.find("list"); //user has given a template file if(it != parameters.end()){ - path = hasPath(it->second); + path = m->hasPath(it->second); //if the user has not given a path then, add inputdir. else leave path alone. if (path == "") { parameters["list"] = inputDir + it->second; } } @@ -70,7 +70,7 @@ GetListCountCommand::GetListCountCommand(string option) { label = validParameter.validFile(parameters, "label", false); if (label == "not found") { label = ""; } else { - if(label != "all") { splitAtDash(label, labels); allLines = 0; } + if(label != "all") { m->splitAtDash(label, labels); allLines = 0; } else { allLines = 1; } } @@ -160,7 +160,7 @@ int GetListCountCommand::execute(){ userLabels.erase(list->getLabel()); } - if ((anyLabelsToProcess(list->getLabel(), userLabels, "") == true) && (processedLabels.count(lastLabel) != 1)) { + if ((m->anyLabelsToProcess(list->getLabel(), userLabels, "") == true) && (processedLabels.count(lastLabel) != 1)) { string saveLabel = list->getLabel(); delete list; @@ -245,9 +245,9 @@ int GetListCountCommand::execute(){ void GetListCountCommand::process(ListVector* list) { try { string binnames; - if (outputDir == "") { outputDir += hasPath(listfile); } - string outputFileName = outputDir + getRootName(getSimpleName(listfile)) + list->getLabel() + ".otu"; - openOutputFile(outputFileName, out); + if (outputDir == "") { outputDir += m->hasPath(listfile); } + string outputFileName = outputDir + m->getRootName(m->getSimpleName(listfile)) + list->getLabel() + ".otu"; + m->openOutputFile(outputFileName, out); outputNames.push_back(outputFileName); m->mothurOut(list->getLabel()); m->mothurOutEndLine(); @@ -262,7 +262,7 @@ void GetListCountCommand::process(ListVector* list) { out << i+1 << '\t' << binnames << endl; }else{ //sort = name vector names; - splitAtComma(binnames, names); + m->splitAtComma(binnames, names); for (int j = 0; j < names.size(); j++) { out << names[j] << '\t' << i+1 << endl;