countfile = validParameter.validFile(parameters, "count", true);
if (countfile == "not open") { countfile = ""; abort = true; }
else if (countfile == "not found") { countfile = ""; }
- else { m->setCountTableFile(countfile); }
+ else {
+ m->setCountTableFile(countfile);
+ CountTable temp;
+ if (!temp.testGroups(countfile)) { m->mothurOut("[ERROR]: Your count file does not have group info, aborting."); m->mothurOutEndLine(); abort=true; }
+ }
if ((biomfile == "") && (listfile == "")) {
//is there are current file available for either of these?
for (int j = 0; j < listNames.size(); j++) {
int num = groupNamesSeqs.count(listNames[j]);
- if (num == 0) { error = 1; m->mothurOut("[ERROR]: " + listNames[j] + " is in your listfile and not in your groupfile. Please correct."); m->mothurOutEndLine(); }
- else { groupNamesSeqs.erase(listNames[j]); }
+ if (num == 0) {
+ error = 1;
+ if (groupfile != "") {
+ m->mothurOut("[ERROR]: " + listNames[j] + " is in your listfile and not in your groupfile. Please correct."); m->mothurOutEndLine(); }
+ else{ m->mothurOut("[ERROR]: " + listNames[j] + " is in your listfile and not in your count file. Please correct."); m->mothurOutEndLine(); }
+ }else { groupNamesSeqs.erase(listNames[j]); }
}
}