+ if(type == "FORWARD"){
+ group = "";
+
+ // get rest of line in case there is a primer name
+ while (!inOligos.eof()) {
+ char c = inOligos.get();
+ if (c == 10 || c == 13){ break; }
+ else if (c == 32 || c == 9){;} //space or tab
+ else { group += c; }
+ }
+
+ //check for repeat barcodes
+ map<string, int>::iterator itPrime = primers.find(oligo);
+ if (itPrime != primers.end()) { m->mothurOut("primer " + oligo + " is in your oligos file already."); m->mothurOutEndLine(); }
+
+ primers[oligo]=index; index++;
+ groupVector.push_back(group);
+
+ if(allFiles){
+ outFASTAVec.push_back((outputDir + getRootName(getSimpleName(fastaFile)) + group + ".fasta"));
+ if(qFileName != ""){
+ outQualVec.push_back((outputDir + getRootName(getSimpleName(qFileName)) + group + ".qual"));
+ }
+ if (group == "") { //if there is not a group for this primer, then this file will not get written to, but we add it to keep the indexes correct
+ filesToRemove.insert((outputDir + getRootName(getSimpleName(fastaFile)) + group + ".fasta"));
+ if(qFileName != ""){
+ filesToRemove.insert((outputDir + getRootName(getSimpleName(qFileName)) + group + ".qual"));
+ }
+ }else {
+ outputNames.push_back((outputDir + getRootName(getSimpleName(fastaFile)) + group + ".fasta"));
+ if(qFileName != ""){
+ outputNames.push_back((outputDir + getRootName(getSimpleName(qFileName)) + group + ".qual"));
+ }
+ }
+ }
+