X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=getoturepcommand.cpp;h=d476cc3499844c88014bcef9e1a005459fab3dda;hp=a041b38aadac3c3cc28bf7313eeb4e8bde6e4535;hb=d1c97b8c04bb75faca1e76ffad60b37a4d789d3d;hpb=a54ba6143022dc7294f4fdc468fc10b627c64b0e diff --git a/getoturepcommand.cpp b/getoturepcommand.cpp index a041b38..d476cc3 100644 --- a/getoturepcommand.cpp +++ b/getoturepcommand.cpp @@ -261,11 +261,15 @@ GetOTURepCommand::GetOTURepCommand(string option) { else if (countfile == "not open") { abort = true; countfile = ""; } else { m->setCountTableFile(countfile); - ct.readTable(countfile); + ct.readTable(countfile, true); if (ct.hasGroupInfo()) { hasGroups = true; } } - + groupfile = validParameter.validFile(parameters, "group", true); + if (groupfile == "not open") { groupfile = ""; abort = true; } + else if (groupfile == "not found") { groupfile = ""; } + else { m->setGroupFile(groupfile); } + method = validParameter.validFile(parameters, "method", false); if (method == "not found"){ method = "distance"; } if ((method != "distance") && (method != "abundance")) { m->mothurOut(method + " is not a valid option for the method parameter. The only options are: distance and abundance, aborting."); m->mothurOutEndLine(); abort = true; @@ -337,11 +341,7 @@ GetOTURepCommand::GetOTURepCommand(string option) { else { allLines = 1; } } - groupfile = validParameter.validFile(parameters, "group", true); - if (groupfile == "not open") { groupfile = ""; abort = true; } - else if (groupfile == "not found") { groupfile = ""; } - else { m->setGroupFile(groupfile); } - + sorted = validParameter.validFile(parameters, "sorted", false); if (sorted == "not found"){ sorted = ""; } if (sorted == "none") { sorted=""; } if ((sorted != "") && (sorted != "name") && (sorted != "bin") && (sorted != "size") && (sorted != "group")) { @@ -1106,7 +1106,7 @@ int GetOTURepCommand::processFastaNames(string filename, string label, FastaMap* CountTable thisCt; if (countfile != "") { - thisCt.readTable(countfile); + thisCt.readTable(countfile, true); if (tempGroup != "noGroup") { out2 << "Representative_Sequence\ttotal\t" << tempGroup << endl; } } @@ -1253,7 +1253,7 @@ int GetOTURepCommand::processNames(string filename, string label) { CountTable thisCt; if (countfile != "") { - thisCt.readTable(countfile); + thisCt.readTable(countfile, true); if (tempGroup != "noGroup") { out2 << "Representative_Sequence\ttotal\t" << tempGroup << endl; } }