]> git.donarmstrong.com Git - mothur.git/blobdiff - seqerrorcommand.cpp
maligner change
[mothur.git] / seqerrorcommand.cpp
index f0ff08691899d6f83c852aca4ee94bf0111fd1ee..392f5877d9099308593d0cba26a8ff7baddd1d3b 100644 (file)
@@ -41,7 +41,7 @@ string SeqErrorCommand::getHelpString(){
                helpString += "The seq.error command reads a query alignment file and a reference alignment file and creates .....\n";
                helpString += "Example seq.error(...).\n";
                helpString += "Note: No spaces between parameter labels (i.e. fasta), '=' and parameters (i.e.yourFasta).\n";
-               helpString += "For more details please check out the wiki http://www.mothur.org/wiki/seq.error .\n\n";
+               helpString += "For more details please check out the wiki http://www.mothur.org/wiki/seq.error .\n";
                return helpString;
        }
        catch(exception& e) {
@@ -313,10 +313,10 @@ int SeqErrorCommand::execute(){
                        else{   minCompare.weight = 1;  }
 
                        printErrorData(minCompare, numParentSeqs);
-
+               
                        if(!ignoreSeq){
-                               
-                               for(int i=0;i<minCompare.total;i++){
+
+                               for(int i=0;i<minCompare.sequence.length();i++){
                                        char letter = minCompare.sequence[i];
 
                                        errorForward[letter][i] += minCompare.weight;
@@ -374,7 +374,7 @@ int SeqErrorCommand::execute(){
                ofstream errorCountFile;
                m->openOutputFile(errorCountFileName, errorCountFile);
                outputNames.push_back(errorCountFileName);  outputTypes["error.count"].push_back(errorCountFileName);
-               m->mothurOut("Overall error rate:\t" + toString((double)(totalBases - totalMatches) / (double)totalBases) + "\n\n");
+               m->mothurOut("Overall error rate:\t" + toString((double)(totalBases - totalMatches) / (double)totalBases) + "\n");
                m->mothurOut("Errors\tSequences\n");
                errorCountFile << "Errors\tSequences\n";                
                for(int i=0;i<misMatchCounts.size();i++){
@@ -429,12 +429,13 @@ void SeqErrorCommand::getReferences(){
                        int numAmbigs = currentSeq.getAmbigBases();
                        if(numAmbigs > 0){      numAmbigSeqs++; }
                        
-                       int startPos = currentSeq.getStartPos();
-                       if(startPos > maxStartPos)      {       maxStartPos = startPos; }
-
-                       int endPos = currentSeq.getEndPos();
-                       if(endPos < minEndPos)          {       minEndPos = endPos;             }
+//                     int startPos = currentSeq.getStartPos();
+//                     if(startPos > maxStartPos)      {       maxStartPos = startPos; }
+//
+//                     int endPos = currentSeq.getEndPos();
+//                     if(endPos < minEndPos)          {       minEndPos = endPos;             }
                        referenceSeqs.push_back(currentSeq);
+                               
                        m->gobble(referenceFile);
                }
                referenceFile.close();