X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=sffinfocommand.cpp;h=c50255aeb2ae9c202074b78d89d460651cefdc43;hb=5c5c0428f6d548c28a8b903ac80efed4f92d59db;hp=2d77d28d367c8c9cf0be0e8b0094817f4adb1ee9;hpb=b866e1519a60681527244036428104ad1cb90c93;p=mothur.git diff --git a/sffinfocommand.cpp b/sffinfocommand.cpp index 2d77d28..c50255a 100644 --- a/sffinfocommand.cpp +++ b/sffinfocommand.cpp @@ -118,7 +118,7 @@ SffInfoCommand::SffInfoCommand(){ SffInfoCommand::SffInfoCommand(string option) { try { abort = false; calledHelp = false; - hasAccnos = false; + hasAccnos = false; hasOligos = false; split = 1; //allow user to run help @@ -583,7 +583,6 @@ int SffInfoCommand::extractSffInfo(string input, string accnos, string oligos){ //create new common headers for each file with the correct number of reads adjustCommonHeader(header); - map uniqueSffNames;// so we don't add the same sff multiple times map::iterator it; set namesToRemove; for(int i=0;imothurRemove(filehandles[i][j]); m->mothurRemove(filehandlesHeaders[i][j]); namesToRemove.insert(filehandles[i][j]); - }else{ - it = uniqueSffNames.find(filehandles[i][j]); - if (it == uniqueSffNames.end()) { - uniqueSffNames[filehandles[i][j]] = barcodeNameVector[i]; - } - } + } } } } @@ -1043,7 +1037,7 @@ int SffInfoCommand::readSeqData(ifstream& in, seqRead& read, int numFlowReads, H int SffInfoCommand::findGroup(Header header, seqRead read, int& barcode, int& primer) { try { //find group read belongs to - TrimOligos trimOligos(pdiffs, bdiffs, ldiffs, sdiffs, primers, barcodes, rbarcodes, revPrimer, linker, spacer); + TrimOligos trimOligos(pdiffs, bdiffs, ldiffs, sdiffs, primers, barcodes, revPrimer, linker, spacer); int success = 1; string trashCode = ""; @@ -1088,12 +1082,6 @@ int SffInfoCommand::findGroup(Header header, seqRead read, int& barcode, int& pr else{ currentSeqsDiffs += success; } } - if(rbarcodes.size() != 0){ - success = trimOligos.stripRBarcode(currSeq, currQual, barcode); - if(success > bdiffs) { trashCode += 'b'; } - else{ currentSeqsDiffs += success; } - } - if(numSpacers != 0){ success = trimOligos.stripSpacer(currSeq, currQual); if(success > sdiffs) { trashCode += 's'; } @@ -1681,36 +1669,13 @@ bool SffInfoCommand::readOligos(string oligoFile){ } else if(type == "BARCODE"){ inOligos >> group; - - //barcode lines can look like BARCODE atgcatgc groupName - for 454 seqs - //or BARCODE atgcatgc atgcatgc groupName - for illumina data that has forward and reverse info - string temp = ""; - while (!inOligos.eof()) { - char c = inOligos.get(); - if (c == 10 || c == 13){ break; } - else if (c == 32 || c == 9){;} //space or tab - else { temp += c; } - } - //then this is illumina data with 4 columns - if (temp != "") { - string reverseBarcode = reverseOligo(group); //reverse barcode - group = temp; - - //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(); } - - rbarcodes[reverseBarcode]=indexBarcode; - } - //check for repeat barcodes map::iterator itBar = barcodes.find(oligo); if (itBar != barcodes.end()) { m->mothurOut("barcode " + oligo + " is in your oligos file already."); m->mothurOutEndLine(); } barcodes[oligo]=indexBarcode; indexBarcode++; barcodeNameVector.push_back(group); - }else if(type == "LINKER"){ linker.push_back(oligo); }else if(type == "SPACER"){