]> git.donarmstrong.com Git - mothur.git/blobdiff - sharedordervector.cpp
fixed homova command
[mothur.git] / sharedordervector.cpp
index 76eeafa4b519c02b25c8364e19d3d0397ffdcd96..15ee7fc4e414988f86bca49ccd38070a2d96ef22 100644 (file)
@@ -57,6 +57,8 @@ SharedOrderVector::SharedOrderVector(ifstream& f) : DataVector() {  //reads in a
                        }
                }
                
+               m->gobble(f); 
+               
                if (f.eof() != true) { f >> nextLabel; }
                
                //read the rest of the groups info in
@@ -79,6 +81,7 @@ SharedOrderVector::SharedOrderVector(ifstream& f) : DataVector() {  //reads in a
                                }
                        }
                        
+                       m->gobble(f);
                                
                        if (f.eof() != true) { f >> nextLabel; }
 
@@ -93,7 +96,7 @@ SharedOrderVector::SharedOrderVector(ifstream& f) : DataVector() {  //reads in a
                
        }
        catch(exception& e) {
-               errorOut(e, "SharedOrderVector", "SharedOrderVector");
+               m->errorOut(e, "SharedOrderVector", "SharedOrderVector");
                exit(1);
        }
 }
@@ -163,16 +166,23 @@ void SharedOrderVector::print(ostream& output){
                output << endl;
        }
        catch(exception& e) {
-               errorOut(e, "SharedOrderVector", "print");
+               m->errorOut(e, "SharedOrderVector", "print");
                exit(1);
        }
 }
 
+/***********************************************************************/
 
+void SharedOrderVector::clear(){
+       numBins = 0;
+       maxRank = 0;
+       numSeqs = 0;
+       data.clear();
+}
 /***********************************************************************/
 
 void SharedOrderVector::resize(int){
-       mothurOut("resize() did nothing in class SharedOrderVector");
+       m->mothurOut("resize() did nothing in class SharedOrderVector");
 }
 
 /***********************************************************************/
@@ -215,7 +225,7 @@ RAbundVector SharedOrderVector::getRAbundVector(){
                return rav;
        }
        catch(exception& e) {
-               errorOut(e, "SharedOrderVector", "getRAbundVector");
+               m->errorOut(e, "SharedOrderVector", "getRAbundVector");
                exit(1);
        }
 }
@@ -235,7 +245,7 @@ OrderVector SharedOrderVector::getOrderVector(map<string,int>* nameMap = NULL) {
                return ov;
        }
        catch(exception& e) {
-               errorOut(e, "SharedOrderVector", "getOrderVector");
+               m->errorOut(e, "SharedOrderVector", "getOrderVector");
                exit(1);
        }
 }
@@ -265,7 +275,7 @@ SharedRAbundVector SharedOrderVector::getSharedRAbundVector(string group) {
                return sharedRav;
        }
        catch(exception& e) {
-               errorOut(e, "SharedOrderVector", "getSharedRAbundVector");
+               m->errorOut(e, "SharedOrderVector", "getSharedRAbundVector");
                exit(1);
        }
 }
@@ -282,7 +292,7 @@ vector<SharedRAbundVector*> SharedOrderVector::getSharedRAbundVector() {
                return lookup;
        }
        catch(exception& e) {
-               errorOut(e, "SharedOrderVector", "getSharedRAbundVector");
+               m->errorOut(e, "SharedOrderVector", "getSharedRAbundVector");
                exit(1);
        }
 }
@@ -295,7 +305,7 @@ SharedSAbundVector SharedOrderVector::getSharedSAbundVector(string group) {
                                
        }
        catch(exception& e) {
-               errorOut(e, "SharedOrderVector", "getSharedSAbundVector");
+               m->errorOut(e, "SharedOrderVector", "getSharedSAbundVector");
                exit(1);
        }
 }
@@ -330,7 +340,7 @@ void SharedOrderVector::updateStats(){
                
        }
        catch(exception& e) {
-               errorOut(e, "SharedOrderVector", "updateStats");
+               m->errorOut(e, "SharedOrderVector", "updateStats");
                exit(1);
        }
 }