]> git.donarmstrong.com Git - mothur.git/commitdiff
pds' small change to sffinfo
authorpschloss <pschloss>
Thu, 29 Jul 2010 04:01:58 +0000 (04:01 +0000)
committerpschloss <pschloss>
Thu, 29 Jul 2010 04:01:58 +0000 (04:01 +0000)
makefile
sffinfocommand.cpp

index dccd2c3d3dd12235530bba90da5ffeaa53b670cc..55039af257bbc7297baa8a04c423eba92de12c07 100644 (file)
--- a/makefile
+++ b/makefile
@@ -48,7 +48,7 @@ ifeq  ($(strip $(USEREADLINE)),yes)
       -lncurses
 endif
 
-USEMPI ?= yes
+USEMPI ?= no
 
 ifeq  ($(strip $(USEMPI)),yes)
     CXX = mpic++
index 8c0e473a87e86453c8721b0f5c5b5bde947b703b..cb5f87410e64583afa710ba034448e15cffb8fd1 100644 (file)
@@ -584,16 +584,23 @@ int SffInfoCommand::printFastaSeqData(ofstream& out, seqRead& read, Header& head
                
                string seq = read.bases;
                
-               
                if (trim) {
-                       seq = seq.substr((header.clipQualLeft-1), (header.clipQualRight-header.clipQualLeft+1));
+                       if(header.clipQualRight != 0){
+                               seq = seq.substr((header.clipQualLeft-1), (header.clipQualRight-header.clipQualLeft+1));
+                       }
+                       else{
+                               seq = seq.substr(header.clipQualLeft-1);
+                       }
                }else{
                        //if you wanted the sfftxt then you already converted the bases to the right case
                        if (!sfftxt) {
                                //make the bases you want to clip lowercase and the bases you want to keep upper case
                                for (int i = 0; i < (header.clipQualLeft-1); i++) { seq[i] = tolower(seq[i]);  }
                                for (int i = (header.clipQualLeft-1); i < (header.clipQualRight-1); i++)  {   seq[i] = toupper(seq[i]);  }
-                               for (int i = (header.clipQualRight-1); i < seq.length(); i++) {   seq[i] = tolower(seq[i]);  }
+                               
+                               if(header.clipQualRight != 0){
+                                       for (int i = (header.clipQualRight-1); i < seq.length(); i++) {   seq[i] = tolower(seq[i]);  }
+                               }
                        }
                }