X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=trimseqscommand.cpp;h=a90e7adc5c8cb870714c716b02bec5eb6bfddd73;hb=6c2b1e530a5c0bb87040e58a3e410097acdfcc3d;hp=637a720edd26433dfd79b66d8d327109bdd25d7f;hpb=4d3ecf0d35c014b176345d21383343e7a58d2445;p=mothur.git diff --git a/trimseqscommand.cpp b/trimseqscommand.cpp index 637a720..a90e7ad 100644 --- a/trimseqscommand.cpp +++ b/trimseqscommand.cpp @@ -611,7 +611,7 @@ int TrimSeqsCommand::driverCreateTrim(string filename, string qFileName, string QualityScores currQual; if(qFileName != ""){ currQual = QualityScores(qFile); m->gobble(qFile); - if ((m->debug)&&(count>15800)) { m->mothurOut("[DEBUG]: " + toString(count) + " fasta = " + currSeq.getName() + '\n'); m->mothurOut("[DEBUG]: " + toString(getpid()) + '\n'); } + //cout << currQual.getName() << endl; } string origSeq = currSeq.getUnaligned(); @@ -1255,7 +1255,9 @@ bool TrimSeqsCommand::getOligos(vector >& fastaFileNames, vector< while(!inOligos.eof()){ inOligos >> type; - + + if (m->debug) { m->mothurOut("[DEBUG]: reading type - " + type + ".\n"); } + if(type[0] == '#'){ while (!inOligos.eof()) { char c = inOligos.get(); if (c == 10 || c == 13){ break; } } // get rest of line if there's any crap there m->gobble(inOligos); @@ -1266,6 +1268,8 @@ bool TrimSeqsCommand::getOligos(vector >& fastaFileNames, vector< for(int i=0;i> oligo; + + if (m->debug) { m->mothurOut("[DEBUG]: reading - " + oligo + ".\n"); } for(int i=0;i >& fastaFileNames, vector< map::iterator itPrime = primers.find(oligo); if (itPrime != primers.end()) { m->mothurOut("primer " + oligo + " is in your oligos file already."); m->mothurOutEndLine(); } + if (m->debug) { if (group != "") { m->mothurOut("[DEBUG]: reading group " + group + ".\n"); }else{ m->mothurOut("[DEBUG]: no group for primer " + oligo + ".\n"); } } + primers[oligo]=indexPrimer; indexPrimer++; primerNameVector.push_back(group); } @@ -1311,15 +1317,22 @@ bool TrimSeqsCommand::getOligos(vector >& fastaFileNames, vector< //then this is illumina data with 4 columns if (temp != "") { - string reverseBarcode = reverseOligo(group); //reverse barcode - group = temp; + for(int i=0;idebug) { m->mothurOut("[DEBUG]: reading reverse " + group + ", and group = " + temp + ".\n"); } + + string reverseBarcode = reverseOligo(group); //reverse barcode //check for repeat barcodes map::iterator itBar = rbarcodes.find(reverseBarcode); - if (itBar != rbarcodes.end()) { m->mothurOut("barcode " + reverseBarcode + " is in your oligos file already."); m->mothurOutEndLine(); } - + if (itBar != rbarcodes.end()) { m->mothurOut("reverse barcode " + group + " is in your oligos file already."); m->mothurOutEndLine(); } + + group = temp; rbarcodes[reverseBarcode]=indexBarcode; - } + }else { if (m->debug) { m->mothurOut("[DEBUG]: reading group " + group + ".\n"); } } //check for repeat barcodes map::iterator itBar = barcodes.find(oligo); @@ -1438,7 +1451,7 @@ bool TrimSeqsCommand::getOligos(vector >& fastaFileNames, vector< break; } } - + if (allBlank) { m->mothurOut("[WARNING]: your oligos file does not contain any group names. mothur will not create a groupfile."); m->mothurOutEndLine(); allFiles = false;