+ temp = validParameter.validFile(parameters, "oligos", true);
+ if (temp == "not found"){ oligoFile = ""; }
+ else if(temp == "not open"){ abort = true; }
+ else { oligoFile = temp; }
+
+ temp = validParameter.validFile(parameters, "group", true);
+ if (temp == "not found"){ groupfile = ""; }
+ else if(temp == "not open"){ abort = true; }
+ else { groupfile = temp; }
+
+ temp = validParameter.validFile(parameters, "maxambig", false); if (temp == "not found") { temp = "-1"; }
+ convert(temp, maxAmbig);
+
+ temp = validParameter.validFile(parameters, "maxhomop", false); if (temp == "not found") { temp = "0"; }
+ convert(temp, maxHomoP);
+
+ temp = validParameter.validFile(parameters, "minlength", false); if (temp == "not found") { temp = "0"; }
+ convert(temp, minLength);
+
+ temp = validParameter.validFile(parameters, "maxlength", false); if (temp == "not found") { temp = "0"; }
+ convert(temp, maxLength);
+
+ temp = validParameter.validFile(parameters, "bdiffs", false); if (temp == "not found") { temp = "0"; }
+ convert(temp, bdiffs);
+
+ temp = validParameter.validFile(parameters, "pdiffs", false); if (temp == "not found") { temp = "0"; }
+ convert(temp, pdiffs);
+
+ temp = validParameter.validFile(parameters, "tdiffs", false); if (temp == "not found") { int tempTotal = pdiffs + bdiffs; temp = toString(tempTotal); }
+ convert(temp, tdiffs);
+
+ if(tdiffs == 0){ tdiffs = bdiffs + pdiffs; }
+
+ temp = validParameter.validFile(parameters, "qfile", true);
+ if (temp == "not found") { qFileName = ""; }
+ else if(temp == "not open") { abort = true; }
+ else { qFileName = temp; }
+
+ temp = validParameter.validFile(parameters, "qthreshold", false); if (temp == "not found") { temp = "0"; }
+ convert(temp, qThreshold);
+
+ temp = validParameter.validFile(parameters, "qtrim", false); if (temp == "not found") { temp = "t"; }
+ qtrim = m->isTrue(temp);
+
+ temp = validParameter.validFile(parameters, "rollaverage", false); if (temp == "not found") { temp = "0"; }
+ convert(temp, qRollAverage);
+
+ temp = validParameter.validFile(parameters, "qwindowaverage", false);if (temp == "not found") { temp = "0"; }
+ convert(temp, qWindowAverage);
+
+ temp = validParameter.validFile(parameters, "qwindowsize", false); if (temp == "not found") { temp = "50"; }
+ convert(temp, qWindowSize);
+
+ temp = validParameter.validFile(parameters, "qstepsize", false); if (temp == "not found") { temp = "1"; }
+ convert(temp, qWindowStep);
+
+ temp = validParameter.validFile(parameters, "qaverage", false); if (temp == "not found") { temp = "0"; }
+ convert(temp, qAverage);
+
+ temp = validParameter.validFile(parameters, "keepfirst", false); if (temp == "not found") { temp = "0"; }
+ convert(temp, keepFirst);
+
+ temp = validParameter.validFile(parameters, "removelast", false); if (temp == "not found") { temp = "0"; }
+ convert(temp, removeLast);
+
+ temp = validParameter.validFile(parameters, "allfiles", false); if (temp == "not found") { temp = "F"; }
+ allFiles = m->isTrue(temp);
+
+ temp = validParameter.validFile(parameters, "processors", false); if (temp == "not found") { temp = "1"; }
+ convert(temp, processors);
+
+ if ((oligoFile != "") && (groupfile != "")) {
+ m->mothurOut("You given both a oligos file and a groupfile, only one is allowed."); m->mothurOutEndLine(); abort = true;
+ }
+
+
+ if(allFiles && (oligoFile == "") && (groupfile == "")){
+ m->mothurOut("You selected allfiles, but didn't enter an oligos or group file. Ignoring the allfiles request."); m->mothurOutEndLine();
+ }
+ if((qAverage != 0 && qThreshold != 0) && qFileName == ""){
+ m->mothurOut("You didn't provide a quality file name, quality criteria will be ignored."); m->mothurOutEndLine();
+ qAverage=0;
+ qThreshold=0;
+ }
+ if(!flip && oligoFile=="" && !maxLength && !minLength && (maxAmbig==-1) && !maxHomoP && qFileName == ""){
+ m->mothurOut("You didn't set any options... quiting command."); m->mothurOutEndLine();
+ abort = true;
+ }