//allow user to run help
if(option == "help") { help(); abort = true; calledHelp = true; }
+ else if(option == "citation") { citation(); abort = true; calledHelp = true;}
else {
if (path == "") { parameters["oligos"] = inputDir + it->second; }
}
-
-// it = parameters.find("group");
-// //user has given a template file
-// if(it != parameters.end()){
-// path = m->hasPath(it->second);
-// //if the user has not given a path then, add inputdir. else leave path alone.
-// if (path == "") { parameters["group"] = inputDir + it->second; }
-// }
}
//check for required parameters
flowFileName = validParameter.validFile(parameters, "flow", true);
- if (flowFileName == "not found") { m->mothurOut("flow is a required parameter for the trim.flows command."); m->mothurOutEndLine(); abort = true; }
- else if (flowFileName == "not open") { abort = true; }
+ if (flowFileName == "not found") {
+ flowFileName = m->getFlowFile();
+ if (flowFileName != "") { m->mothurOut("Using " + flowFileName + " as input file for the flow parameter."); m->mothurOutEndLine(); }
+ else {
+ m->mothurOut("No valid current flow file. You must provide a flow file."); m->mothurOutEndLine();
+ abort = true;
+ }
+ }else if (flowFileName == "not open") { flowFileName = ""; abort = true; }
//if the user changes the output directory command factory will send this info to us in the output parameter
outputDir = validParameter.validFile(parameters, "outputdir", false); if (outputDir == "not found"){
// ...at some point should added some additional type checking...
string temp;
- temp = validParameter.validFile(parameters, "minflows", false); if (temp == "not found") { temp = "360"; }
+ temp = validParameter.validFile(parameters, "minflows", false); if (temp == "not found") { temp = "450"; }
convert(temp, minFlows);
- temp = validParameter.validFile(parameters, "maxflows", false); if (temp == "not found") { temp = "720"; }
+ temp = validParameter.validFile(parameters, "maxflows", false); if (temp == "not found") { temp = "450"; }
convert(temp, maxFlows);
if (pFile==NULL) perror ("Error opening file");
else{
fseek (pFile, 0, SEEK_END);
- size=ftell (pFile);
+ size=ftell(pFile);
fclose (pFile);
}
}
else{
output << barcodePrimerComboFileNames[i][j] << endl;
+ outputNames.push_back(barcodePrimerComboFileNames[i][j]);
+ outputTypes["flow"].push_back(barcodePrimerComboFileNames[i][j]);
}
}
}
output.close();
}
outputTypes["flow.files"].push_back(flowFilesFileName);
- outputNames.push_back(flowFileName);
+ outputNames.push_back(flowFilesFileName);
- //set fasta file as new current fastafile
- string current = "";
- itTypes = outputTypes.find("fasta");
- if (itTypes != outputTypes.end()) {
- if ((itTypes->second).size() != 0) { current = (itTypes->second)[0]; m->setFastaFile(current); }
- }
+// set fasta file as new current fastafile
+// string current = "";
+// itTypes = outputTypes.find("fasta");
+// if (itTypes != outputTypes.end()) {
+// if ((itTypes->second).size() != 0) { current = (itTypes->second)[0]; m->setFastaFile(current); }
+// }
m->mothurOutEndLine();
m->mothurOut("Output File Names: "); m->mothurOutEndLine();
fileName = outputDir + m->getRootName(m->getSimpleName(flowFileName)) + comboGroupName + ".flow";
}
- outputNames.push_back(fileName);
- outputTypes["flow"].push_back(fileName);
outFlowFileNames[itBar->second][itPrimer->second] = fileName;
ofstream temp;