- //checks for valid files
- if (command == "read.list" ) {
- if (listfile == "") { cout << "When executing a read.list you must enter a listfile." << endl; errorFree = false; }
- }else if (command == "read.sabund" ) {
- if (sabundfile == "") { cout << "When executing a read.sabund you must enter a sabundfile." << endl; errorFree = false; }
- }else if (command == "read.rabund" ) {
- if (rabundfile == "") { cout << "When executing a read.rabund you must enter a rabundfile." << endl; errorFree = false; }
+ //checks to make sure only one file type is given
+ if (listfile != "") {
+ if ((rabundfile != "") || (sabundfile != "")) {
+ cout << "When executing a read.otu you must enter ONLY ONE of the following: listfile, rabundfile or sabundfile." << endl; errorFree = false; }
+ }else if (rabundfile != "") {
+ if ((listfile != "") || (sabundfile != "")) {
+ cout << "When executing a read.otu you must enter ONLY ONE of the following: listfile, rabundfile or sabundfile." << endl; errorFree = false; }
+ }else if (sabundfile != "") {
+ if ((listfile != "") || (rabundfile != "")) {
+ cout << "When executing a read.otu you must enter ONLY ONE of the following: listfile, rabundfile or sabundfile." << endl; errorFree = false; }
+ }else if ((listfile == "") && (rabundfile == "") && (sabundfile == "")) {
+ cout << "When executing a read.otu you must enter one of the following: listfile, rabundfile or sabundfile." << endl; errorFree = false;