]> git.donarmstrong.com Git - mothur.git/commitdiff
changed reporting in ccode to only report those who are found to be chimeric by all...
authorwestcott <westcott>
Fri, 4 Sep 2009 16:01:17 +0000 (16:01 +0000)
committerwestcott <westcott>
Fri, 4 Sep 2009 16:01:17 +0000 (16:01 +0000)
ccode.cpp
decalc.cpp

index 0ba23794269e87bc485fd248720e1b7d52b8d588..7e6154b6c5af1d69259223025d9da9f7f3f5d4df 100644 (file)
--- a/ccode.cpp
+++ b/ccode.cpp
@@ -62,7 +62,7 @@ void Ccode::print(ostream& out) {
                
                        //for each window
                        //window mapping info.
-                       out << "Mapping information: " << endl;
+                       out << "Mapping information: ";
                        //you mask and did not filter
                        if ((seqMask != "") && (!filter)) { out << "mask and trim."; }
                                
@@ -72,7 +72,7 @@ void Ccode::print(ostream& out) {
                        //you masked and filtered
                        if ((seqMask != "") && (filter)) { out << "mask, filter and trim."; }
                        
-                       out << "Window\tStartPos\tEndPos" << endl;
+                       out << endl << "Window\tStartPos\tEndPos" << endl;
                        it = trim[i].begin();
                        
                        for (int k = 0; k < windows[i].size()-1; k++) {
@@ -113,7 +113,7 @@ void Ccode::print(ostream& out) {
                        
                                out << k+1 << '\t' << temp << endl;
                                
-                               if (temp != "\t\t\t") {  results = true;  }
+                               if (temp == "*\t*\t*\t") {  results = true;  }
                        }
                        out << endl;    
                        
@@ -225,6 +225,8 @@ for (int i = 0; i < closest.size(); i++) {
                
                //mask sequences if the user wants to 
                if (seqMask != "") {
+                       decalc->setMask(seqMask);
+                       
                        //mask querys
                        for (int i = 0; i < querySeqs.size(); i++) {
                                decalc->runMask(querySeqs[i]);
@@ -245,7 +247,7 @@ for (int i = 0; i < closest.size(); i++) {
                        for (int i = 0; i < querySeqs.size(); i++) { temp.push_back(querySeqs[i]);  }
                        
                        createFilter(temp);
-                       
+               
                        runFilter(querySeqs);
                        runFilter(templateSeqs);
                        
@@ -255,7 +257,7 @@ for (int i = 0; i < closest.size(); i++) {
                        int j = 0;
                        
                        for (int i = 0; i < filterString.length(); i++) {
-                               if (filterString[i] == 1) {
+                               if (filterString[i] == '1') {
                                        //add to newMap
                                        newMap[spot] = spotMap[j][i];
                                        spot++;  
index 2d60899e7c9f9526d531336fc1159f65ebed05bc..b2e8be61f8df0aff52753058532a3ef42c6b6f0f 100644 (file)
@@ -21,12 +21,17 @@ void DeCalculator::setMask(string m) {
                        for (int i = 0; i < seqMask.length(); i++) {
                                if (isalpha(seqMask[i])) {
                                        h.insert(i);
-                                       maskMap[i] = count;
+                                       maskMap[count] = i;
+                                       count++;
+                                       
                                }
-                               count++;
                        }
                }else {
-                       for (int i = 0; i < alignLength; i++) {   h.insert(i);  }
+                       for (int i = 0; i < alignLength; i++) {   
+                               h.insert(i); 
+                               maskMap[count] = i;
+                               count++;
+                       }
                }
        }
        catch(exception& e) {