]> git.donarmstrong.com Git - mothur.git/blobdiff - chimera.cpp
finished work on classify.seqs bayesian method and various bug fixes
[mothur.git] / chimera.cpp
index 7e997b9824439e4e42f495f95a2d101b58a89600..8851b755a09a0b030418e7881d09caedb4753584 100644 (file)
@@ -10,7 +10,7 @@
 #include "chimera.h"
 
 //***************************************************************************************************************
-//this is a vertical filter
+//this is a vertical soft filter
 void Chimera::createFilter(vector<Sequence*> seqs) {
        try {
                
@@ -40,6 +40,7 @@ void Chimera::createFilter(vector<Sequence*> seqs) {
                        }
                }
                
+               //zero out spot where all sequences have blanks
                //zero out spot where all sequences have blanks
                int numColRemoved = 0;
                for(int i = 0;i < seqs[0]->getAligned().length(); i++){
@@ -48,6 +49,7 @@ void Chimera::createFilter(vector<Sequence*> seqs) {
                        else if (((a[i] < threshold) && (t[i] < threshold) && (g[i] < threshold) && (c[i] < threshold))) {      filterString[i] = '0';  numColRemoved++;  }
                        //cout << "a = " << a[i] <<  " t = " << t[i] <<  " g = " << g[i] <<  " c = " << c[i] << endl;
                }
+       
 //cout << "filter = " << filterString << endl; 
 
                mothurOut("Filter removed " + toString(numColRemoved) + " columns.");  mothurOutEndLine();
@@ -142,7 +144,7 @@ vector< vector<float> > Chimera::readQuantiles() {
                openInputFile(quanfile, in);
                
                vector< vector<float> > quan;
-               vector <float> temp;
+               vector <float> temp; temp.resize(6, 0);
                
                //to fill 0
                quan.push_back(temp);