string temp = validParameter.validFile(parameters, "nseqs", false);
if (temp == "not found") { m->mothurOut("nseqs is a required parameter."); m->mothurOutEndLine(); abort = true; }
- else { convert(temp, nseqs); }
+ else { m->mothurConvert(temp, nseqs); }
temp = validParameter.validFile(parameters, "bygroup", false); if (temp == "not found") { temp = "f"; }
byGroup = m->isTrue(temp);
if (listfile != "") { processList(); }
if (sharedfile != "") { processShared(); }
- if (m->control_pressed) { for (int i = 0; i < outputNames.size(); i++) { remove(outputNames[i].c_str()); } return 0; }
+ if (m->control_pressed) { for (int i = 0; i < outputNames.size(); i++) { m->mothurRemove(outputNames[i]); } return 0; }
if (outputNames.size() != 0) {
m->mothurOutEndLine();
if (groupfile != "") {
groupMap = new GroupMap(groupfile); groupMap->readMap();
SharedUtil util;
- util.setGroups(Groups, groupMap->namesOfGroups);
+ vector<string> namesGroups = groupMap->getNamesOfGroups();
+ util.setGroups(Groups, namesGroups);
m->openOutputFile(outputGroupFileName, outGroup);
}
//for each bin
for (int i = 0; i < list->getNumBins(); i++) {
- if (m->control_pressed) { if (groupfile != "") { delete groupMap; outGroup.close(); remove(outputGroupFileName.c_str()); } out.close(); remove(outputFileName.c_str()); return 0; }
+ if (m->control_pressed) { if (groupfile != "") { delete groupMap; outGroup.close(); m->mothurRemove(outputGroupFileName); } out.close(); m->mothurRemove(outputFileName); return 0; }
//parse out names that are in accnos file
string binnames = list->get(i);
//**********************************************************************************************************************
int RemoveRareCommand::processShared(){
try {
- m->Groups = Groups;
+ m->setGroups(Groups);
string thisOutputDir = outputDir;
if (outputDir == "") { thisOutputDir += m->hasPath(sharedfile); }