+
+/***********************************************************************/
+OrderVector* InputData::getOrderVector(string label){
+ try {
+
+ ifstream in;
+ string thisLabel;
+ openInputFile(filename, in);
+
+ if(in){
+ if((format == "list") || (format == "listorder")) {
+
+ while (in.eof() != true) {
+
+ input = new ListVector(in);
+ thisLabel = input->getLabel();
+
+ //if you are at the last label
+ if (thisLabel == label) { break; }
+ //so you don't loose this memory
+ else { delete input; }
+ gobble(in);
+ }
+ }
+ else if (format == "shared") {
+
+ while (in.eof() != true) {
+
+ input = new SharedListVector(in);
+ thisLabel = input->getLabel();
+
+ //if you are at the last label
+ if (thisLabel == label) { break; }
+ //so you don't loose this memory
+ else { delete input; }
+ gobble(in);
+ }
+
+ }
+ else if(format == "rabund"){
+
+ while (in.eof() != true) {
+
+ input = new RAbundVector(in);
+ thisLabel = input->getLabel();
+
+ //if you are at the last label
+ if (thisLabel == label) { break; }
+ //so you don't loose this memory
+ else { delete input; }
+ gobble(in);
+ }
+
+ }
+ else if(format == "order"){
+
+ while (in.eof() != true) {
+
+ input = new OrderVector(in);
+ thisLabel = input->getLabel();
+
+ //if you are at the last label
+ if (thisLabel == label) { break; }
+ //so you don't loose this memory
+ else { delete input; }
+ gobble(in);
+ }
+
+ }
+ else if(format == "sabund"){
+
+ while (in.eof() != true) {
+
+ input = new SAbundVector(in);
+ thisLabel = input->getLabel();
+
+ //if you are at the last label
+ if (thisLabel == label) { break; }
+ //so you don't loose this memory
+ else { delete input; }
+ gobble(in);
+
+ }
+
+ }
+
+ in.close();
+
+ output = new OrderVector();
+ *output = (input->getOrderVector());
+
+ return output;
+
+ }
+ else{
+ return NULL;
+ }
+ }
+ catch(exception& e) {
+ cout << "Standard Error: " << e.what() << " has occurred in the InputData class Function getOrderVector. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ exit(1);
+ }
+ catch(...) {
+ cout << "An unknown error has occurred in the InputData class function getOrderVector. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ exit(1);
+ }
+}
+