X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=splitabundcommand.cpp;h=fab1b645c0934de1bebadcfa26b5876d874cb275;hb=a250de2144fa57c7f18152251bf726303522119b;hp=df085b4d05954517e904d4bbf1993bc2b687a026;hpb=f07bf12e0d04340698aff7a36d2fee7c959ffe59;p=mothur.git diff --git a/splitabundcommand.cpp b/splitabundcommand.cpp index df085b4..fab1b64 100644 --- a/splitabundcommand.cpp +++ b/splitabundcommand.cpp @@ -278,6 +278,9 @@ int SplitAbundCommand::execute(){ for (map::iterator itBool = wroteListFile.begin(); itBool != wroteListFile.end(); itBool++) { string filename = fileroot + itBool->first; + if ((itBool->first == "rare") || (itBool->first == "abund")) { + filename = fileroot + itBool->first + ".list"; + } if (itBool->second) { //we wrote to this file outputNames.push_back(filename); }else{ @@ -373,17 +376,17 @@ int SplitAbundCommand::writeList(ListVector* thisList) { ofstream rout; if (rareNames.size() != 0) { - string rare = outputDir + getRootName(getSimpleName(listfile)) + ".rare.list"; + string rare = outputDir + getRootName(getSimpleName(listfile)) + "rare.list"; wroteListFile["rare"] = true; openOutputFileAppend(rare, rout); rout << thisList->getLabel() << '\t' << numRareBins << '\t'; } if (abundNames.size() != 0) { - string abund = outputDir + getRootName(getSimpleName(listfile)) + ".abund.list"; + string abund = outputDir + getRootName(getSimpleName(listfile)) + "abund.list"; wroteListFile["abund"] = true; openOutputFileAppend(abund, aout); - rout << thisList->getLabel() << '\t' << numAbundBins << '\t'; + aout << thisList->getLabel() << '\t' << numAbundBins << '\t'; } for (int i = 0; i < thisList->getNumBins(); i++) {