]> git.donarmstrong.com Git - mothur.git/blobdiff - sharedrabundvector.cpp
bugs fixes while testing for 1.5 release
[mothur.git] / sharedrabundvector.cpp
index 0a69e4c37849171e01544da40f2c09bbd86d40b0..cb20accf9f93819a45d8492ca9176cd8537b8a0c 100644 (file)
@@ -379,12 +379,15 @@ vector<SharedRAbundVector*> SharedRAbundVector::getSharedRAbundVectors(){
 
 RAbundVector SharedRAbundVector::getRAbundVector() {
        try {
-               RAbundVector rav(data.size());
+               RAbundVector rav;
                
                for (int i = 0; i < data.size(); i++) {
-                       rav.set(i, data[i].abundance);
+                       if(data[i].abundance != 0) {
+                               rav.push_back(data[i].abundance);
+                       }
                }
-       
+               
+               rav.setLabel(label);
                return rav;
        }
        catch(exception& e) {