]> git.donarmstrong.com Git - mothur.git/commitdiff
added homova command
authorwestcott <westcott>
Tue, 8 Feb 2011 16:07:55 +0000 (16:07 +0000)
committerwestcott <westcott>
Tue, 8 Feb 2011 16:07:55 +0000 (16:07 +0000)
qualityscores.cpp
trimseqscommand.cpp

index 4dd5b38d4f7ab3895d7fa305bdb57f2e9ab5a628..90412c62b6ae20705c0ba1c162c4c73c260d0171 100644 (file)
@@ -271,12 +271,12 @@ bool QualityScores::stripQualWindowAverage(Sequence& sequence, int stepSize, int
                int start = 0;
                
                if(seqLength < windowSize) {    return 0;       }
-               
+                       
                while(start < seqLength){
                        double windowSum = 0.0000;
 
                        for(int i=start;i<end;i++){
-                               windowSum += qScores[i];                                
+                               windowSum += qScores[i];
                        }
                        double windowAverage = windowSum / (double)(end-start);
                        
@@ -289,10 +289,8 @@ bool QualityScores::stripQualWindowAverage(Sequence& sequence, int stepSize, int
                        if(end >= seqLength){   end = seqLength - 1;    }
                }
                
-               
                if(end == -1){  end = seqLength;        }
                
-               
                sequence.setUnaligned(rawSequence.substr(0,end));
                trimQScores(-1, end);
                
index 2a43e354d7c3aec784e68fffbb7cd12c480a39c0..7267b91da4d2ec193508579e8226c33d6758e9c7 100644 (file)
@@ -207,7 +207,7 @@ TrimSeqsCommand::TrimSeqsCommand(string option)  {
                        temp = validParameter.validFile(parameters, "qthreshold", false);       if (temp == "not found") { temp = "0"; }
                        convert(temp, qThreshold);
                        
-                       temp = validParameter.validFile(parameters, "qtrim", false);            if (temp == "not found") { temp = "F"; }
+                       temp = validParameter.validFile(parameters, "qtrim", false);            if (temp == "not found") { temp = "t"; }
                        qtrim = m->isTrue(temp);
 
                        temp = validParameter.validFile(parameters, "rollaverage", false);      if (temp == "not found") { temp = "0"; }
@@ -289,7 +289,7 @@ void TrimSeqsCommand::help(){
                m->mothurOut("The rollaverage parameter allows you to set a minimum rolling average quality score allowed over a window. \n");
                m->mothurOut("The qstepsize parameter allows you to set a number of bases to move the window over. Default=1.\n");
                m->mothurOut("The allfiles parameter will create separate group and fasta file for each grouping. The default is F.\n");
-               m->mothurOut("The qtrim parameter will trim sequence from the point that they fall below the qthreshold and put it in the .trim file if set to true. The default is F.\n");
+               m->mothurOut("The qtrim parameter will trim sequence from the point that they fall below the qthreshold and put it in the .trim file if set to true. The default is T.\n");
                m->mothurOut("The keepfirst parameter trims the sequence to the first keepfirst number of bases after the barcode or primers are removed, before the sequence is checked to see if it meets the other requirements. \n");
                m->mothurOut("The removelast removes the last removelast number of bases after the barcode or primers are removed, before the sequence is checked to see if it meets the other requirements.\n");
                m->mothurOut("The trim.seqs command should be in the following format: \n");
@@ -572,7 +572,7 @@ int TrimSeqsCommand::driverCreateTrim(string filename, string qFileName, string
                                        else                                            {       success = 1;                            }
                                        
                                        //you don't want to trim, if it fails above then scrap it
-                                       if ((!qtrim) && (origLength != currSeq.getNumBases())) { success = 0; }
+                                       if ((!qtrim) && (origLength != currSeq.getNumBases())) {  success = 0; }
                                        
                                        if(!success)                            {       trashCode += 'q';       }
                                }