else if (countfile == "not found") { countfile = ""; }
else { m->setCountTableFile(countfile); }
- if (countfile != "" && namefile != "") { m->mothurOut("Cannot have both a name file and count file. Please use one or the other."); m->mothurOutEndLine(); abort = true; }
+ if (countfile != "" && namefile != "") { m->mothurOut("[ERROR]: Cannot have both a name file and count file. Please use one or the other."); m->mothurOutEndLine(); abort = true; }
if ((blastfile == "")) { m->mothurOut("When executing a mgcluster command you must provide a blastfile."); m->mothurOutEndLine(); abort = true; }
if(countfile != "") {
//map<string, int> nameMapCounts = m->readNames(namefile);
- CountTable ct = new CountTable();
- ct.readTable(countfile);
- createRabund(ct, list);
- rabund = &rav;
+ ct = new CountTable();
+ ct->readTable(countfile);
+ rabund = new RAbundVector();
+ createRabund(ct, list, rabund);
}else {
rabund = new RAbundVector(list->getRAbundVector());
}
//**********************************************************************************************************************
-void MGClusterCommand::createRabund(CountTable ct, ListVector list){
+void MGClusterCommand::createRabund(CountTable*& ct, ListVector*& list, RAbundVector*& rabund){
try {
//vector<string> names = ct.getNamesOfSeqs();
for (int j = 0; j < binNames.size(); j++) {
total += ct->getNumSeqs(binNames[j]);
}
- rav.push_back(total);
+ rabund->push_back(total);
}