X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=subsamplecommand.cpp;h=a89d191a9127065922c3d498edce5cab41030f27;hb=89cfcfcc9e648d2f956f2ff419e64ba7907106d2;hp=4128191598d22e8e7280f403dca79494e61da948;hpb=67ea6ccd74dbd64828d31b952808255f206364ff;p=mothur.git diff --git a/subsamplecommand.cpp b/subsamplecommand.cpp index 4128191..a89d191 100644 --- a/subsamplecommand.cpp +++ b/subsamplecommand.cpp @@ -273,7 +273,7 @@ SubSampleCommand::SubSampleCommand(string option) { else if (countfile == "not found") { countfile = ""; } else { m->setCountTableFile(countfile); - ct.readTable(countfile); + ct.readTable(countfile, true, false); } if ((namefile != "") && (countfile != "")) { @@ -552,7 +552,7 @@ int SubSampleCommand::getSubSampleFasta() { else{ itGroupCounts = groupCounts.find(group); if (itGroupCounts != groupCounts.end()) { - if (groupCounts[group] < size) { subset.insert(names[j]); groupCounts[group]++; } + if (itGroupCounts->second < size) { subset.insert(names[j]); (itGroupCounts->second)++; } } } } @@ -947,7 +947,7 @@ int SubSampleCommand::processShared(vector& thislookup) { try { //save mothurOut's binLabels to restore for next label - vector saveBinLabels = m->currentBinLabels; + vector saveBinLabels = m->currentSharedBinLabels; string thisOutputDir = outputDir; if (outputDir == "") { thisOutputDir += m->hasPath(sharedfile); } @@ -965,7 +965,7 @@ int SubSampleCommand::processShared(vector& thislookup) { m->openOutputFile(outputFileName, out); outputTypes["shared"].push_back(outputFileName); outputNames.push_back(outputFileName); - m->currentBinLabels = subsampledLabels; + m->currentSharedBinLabels = subsampledLabels; thislookup[0]->printHeaders(out); @@ -977,7 +977,7 @@ int SubSampleCommand::processShared(vector& thislookup) { //save mothurOut's binLabels to restore for next label - m->currentBinLabels = saveBinLabels; + m->currentSharedBinLabels = saveBinLabels; return 0;