splitAtComma(value, optionText);
splitAtEquals(parameter, value);
- //is it a valid parameter for the command
- if (validParameter->isValidParameter(parameter, commandName) != true) { return false; }
+ //is it a valid parameter
+ if (validParameter->isValidParameter(parameter, commandName, value) != true) { return false; }
+
+
if (parameter == "phylip" ) { phylipfile = value; }
if (parameter == "column" ) { columnfile = value; }
if (errorFree) { //gets the last parameter and value
value = optionText;
splitAtEquals(parameter, value);
-
- //is it a valid parameter for the command
- if (validParameter->isValidParameter(parameter, commandName) != true) { return false; }
+ //is it a valid parameter
+ if (validParameter->isValidParameter(parameter, commandName, value) != true) { return false; }
+
if (parameter == "phylip" ) { phylipfile = value; }
if (parameter == "column" ) { columnfile = value; }
else if (globaldata->getGroupFile() == "") { cout << "You must read a list and a group, or a shared before you can use the collect.shared, rarefaction.shared or summary.shared commands." << endl; return false; }
}
}
+
+ if (commandName == "heatmap"){
+ if ((globaldata->getListFile() == "") && (globaldata->getSharedFile() == "")) {
+ cout << "You must read a list, or a list and a group, or a shared before you can use the heatmap command." << endl; return false;
+ }
+ }
return errorFree;
}
}else if (sabundfile != "") {
if ((listfile != "") || (rabundfile != "")) {
cout << "When executing a read.otu you must enter ONLY ONE of the following: list, rabund or sabund." << endl; errorFree = false; }
- }else if ((listfile == "") && (rabundfile == "") && (sabundfile == "")) {
+ }else if ((listfile == "") && (rabundfile == "") && (sabundfile == "") && (sharedfile == "")) {
cout << "When executing a read.otu you must enter one of the following: list, rabund or sabund." << endl; errorFree = false;
}