]> git.donarmstrong.com Git - mothur.git/commitdiff
fixed problem with sffinfo that caused a file mismatch when the trimming trimmed...
authorwestcott <westcott>
Wed, 30 Mar 2011 13:33:57 +0000 (13:33 +0000)
committerwestcott <westcott>
Wed, 30 Mar 2011 13:33:57 +0000 (13:33 +0000)
sffinfocommand.cpp
sffinfocommand.h
trimseqscommand.cpp

index 2caad96df797bc2d5dca067a4ae2b3f4a4ebed5c..f9f6db6cead382e12e85068ac66d56b4b7c7d148 100644 (file)
@@ -356,8 +356,9 @@ int SffInfoCommand::extractSffInfo(string input, string accnos){
                
                CommonHeader header; 
                readCommonHeader(in, header);
-               
+       
                int count = 0;
+               mycount = 0;
                
                //check magic number and version
                if (header.magicNumber != 779314790) { m->mothurOut("Magic Number is not correct, not a valid .sff file"); m->mothurOutEndLine(); return count; }
@@ -392,6 +393,7 @@ int SffInfoCommand::extractSffInfo(string input, string accnos){
                        }
                        
                        count++;
+                       mycount++;
                
                        //report progress
                        if((count+1) % 10000 == 0){     m->mothurOut(toString(count+1)); m->mothurOutEndLine();         }
@@ -788,6 +790,7 @@ int SffInfoCommand::printQualSeqData(ofstream& out, seqRead& read, Header& heade
                
                if (trim) {
                        if(header.clipQualRight < header.clipQualLeft){
+                               out << ">" << header.name << " xy=" << header.xy << endl;
                                out << "0\t0\t0\t0";
                        }
                        else if((header.clipQualRight != 0) && ((header.clipQualRight-header.clipQualLeft) >= 0)){
index d98edbd3e04f0213a24ed51471d09aab1b74d46a..0fdf6fce6647269d476945031255bb585e78ba83 100644 (file)
@@ -76,6 +76,7 @@ private:
        string sffFilename, sfftxtFilename, outputDir, accnosName;
        vector<string> filenames, outputNames, accnosFileNames;
        bool abort, fasta, qual, trim, flow, sfftxt, hasAccnos;
+       int mycount;
        set<string> seqNames;
        map<string, vector<string> > outputTypes;
        
index 0734a887837e547be9978619b4b6f3923c33f905..6924ffc5b8f1e8b3de357692167b5b0dbeb316e1 100644 (file)
@@ -597,7 +597,7 @@ int TrimSeqsCommand::driverCreateTrim(string filename, string qFileName, string
                                        
                                        if(barcodes.size() != 0){
                                                string thisGroup = barcodeNameVector[barcodeIndex];
-                                               if (primers.size() != 0) { thisGroup += "." + primerNameVector[primerIndex]; }
+                                               if (primers.size() != 0) {  if (primerNameVector[primerIndex] != "") { thisGroup += "." + primerNameVector[primerIndex]; } }
                                                
                                                outGroupsFile << currSeq.getName() << '\t' << thisGroup << endl;