X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=clustersplitcommand.cpp;h=270ea6208d8ead0683d8cf46fb8d7a417469c243;hb=372fb21ea66ced432b109225851a1b80ef0491a3;hp=92f0e486898f80b2c6f85bb984a5b7662bc18340;hpb=01d5a60fc5f396339acf529151fa8186ee7c1a41;p=mothur.git diff --git a/clustersplitcommand.cpp b/clustersplitcommand.cpp index 92f0e48..270ea62 100644 --- a/clustersplitcommand.cpp +++ b/clustersplitcommand.cpp @@ -442,8 +442,7 @@ int ClusterSplitCommand::execute(){ if (m->debug) { m->mothurOut("[DEBUG]: distName.size() = " + toString(distName.size()) + ".\n"); } //output a merged distance file - if (splitmethod == "fasta") { createMergedDistanceFile(distName); } - + //if (splitmethod == "fasta") { createMergedDistanceFile(distName); } if (m->control_pressed) { return 0; } @@ -844,9 +843,12 @@ int ClusterSplitCommand::mergeLists(vector listNames, map us if (itLabel->first == -1) { thisLabel = "unique"; } else { thisLabel = toString(itLabel->first, length-1); } - outList << thisLabel << '\t' << itLabel->second << '\t'; + //outList << thisLabel << '\t' << itLabel->second << '\t'; RAbundVector* rabund = NULL; + ListVector completeList; + completeList.setLabel(thisLabel); + if (countfile == "") { rabund = new RAbundVector(); rabund->setLabel(thisLabel); @@ -855,7 +857,8 @@ int ClusterSplitCommand::mergeLists(vector listNames, map us //add in singletons if (listSingle != NULL) { for (int j = 0; j < listSingle->getNumBins(); j++) { - outList << listSingle->get(j) << '\t'; + //outList << listSingle->get(j) << '\t'; + completeList.push_back(listSingle->get(j)); if (countfile == "") { rabund->push_back(m->getNumNames(listSingle->get(j))); } } } @@ -872,7 +875,8 @@ int ClusterSplitCommand::mergeLists(vector listNames, map us if (list == NULL) { m->mothurOut("Error merging listvectors in file " + listNames[k]); m->mothurOutEndLine(); } else { for (int j = 0; j < list->getNumBins(); j++) { - outList << list->get(j) << '\t'; + //outList << list->get(j) << '\t'; + completeList.push_back(list->get(j)); if (countfile == "") { rabund->push_back(m->getNumNames(list->get(j))); } } delete list; @@ -885,7 +889,8 @@ int ClusterSplitCommand::mergeLists(vector listNames, map us sabund.print(outSabund); rabund->print(outRabund); } - outList << endl; + //outList << endl; + completeList.print(outList); if (rabund != NULL) { delete rabund; } } @@ -1169,7 +1174,7 @@ string ClusterSplitCommand::clusterClassicFile(string thisDistFile, string thisN cluster->readPhylipFile(thisDistFile, nameMap); }else if (countfile != "") { ct = new CountTable(); - ct->readTable(thisNamefile); + ct->readTable(thisNamefile, false); cluster->readPhylipFile(thisDistFile, ct); } tag = cluster->getTag(); @@ -1297,7 +1302,7 @@ string ClusterSplitCommand::clusterFile(string thisDistFile, string thisNamefile read->read(nameMap); }else if (countfile != "") { ct = new CountTable(); - ct->readTable(thisNamefile); + ct->readTable(thisNamefile, false); read->read(ct); }else { read->read(nameMap); }