if (validParameter.isValidParameter(it->first, myArray, it->second) != true) { 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"){ outputDir = ""; }
-
//if the user changes the input directory command factory will send this info to us in the output parameter
string inputDir = validParameter.validFile(parameters, "inputdir", false);
if (inputDir == "not found"){ inputDir = ""; }
if (fastafile == "not open") { abort = true; }
else if (fastafile == "not found") { m->mothurOut("You must provide a fasta file."); m->mothurOutEndLine(); 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"){ outputDir = m->hasPath(fastafile); }
+
string temp = validParameter.validFile(parameters, "numbases", false); if (temp == "not found") { temp = "0"; }
convert(temp, numbases);
m->openInputFile(fastaFileNames[s], inFASTA);
ofstream outFASTA;
- string degapFile = outputDir + m->getRootName(m->getSimpleName(fastaFileNames[s])) + "ng.fasta";
+ string tempOutputDir = outputDir;
+ if (outputDir == "") { tempOutputDir = m->hasPath(fastaFileNames[s]); }
+ string degapFile = tempOutputDir + m->getRootName(m->getSimpleName(fastaFileNames[s])) + "ng.fasta";
m->openOutputFile(degapFile, outFASTA);
while(!inFASTA.eof()){
if (validParameter.isValidParameter(it->first, myArray, it->second) != true) { 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"){ outputDir = ""; }
-
-
//if the user changes the input directory command factory will send this info to us in the output parameter
string inputDir = validParameter.validFile(parameters, "inputdir", false);
if (inputDir == "not found"){ inputDir = ""; }
if (fastaFileNames.size() == 0) { m->mothurOut("no valid files."); m->mothurOutEndLine(); 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"){ outputDir = ""; }
+
groups = validParameter.validFile(parameters, "groups", false);
if (groups == "not found") { m->mothurOut("groups is a required parameter for the make.group command."); m->mothurOutEndLine(); abort = true; }
else { m->splitAtDash(groups, groupsNames); }
try {
if (abort == true) { return 0; }
+ if (outputDir == "") { outputDir = m->hasPath(fastaFileNames[0]); }
+
+ filename = outputDir + filename;
+
ofstream out;
m->openOutputFile(filename, out);
if (validParameter.isValidParameter(it->first, myArray, it->second) != true) { abort = true; }
}
- globaldata->newRead();
-
//if the user changes the input directory command factory will send this info to us in the output parameter
string inputDir = validParameter.validFile(parameters, "inputdir", false);
if (inputDir == "not found"){ inputDir = ""; }
phylipfile = validParameter.validFile(parameters, "phylip", true);
if (phylipfile == "not open") { abort = true; }
else if (phylipfile == "not found") { phylipfile = ""; }
- else { format = "phylip"; globaldata->setPhylipFile(phylipfile); }
+ else { globaldata->newRead(); format = "phylip"; globaldata->setPhylipFile(phylipfile); }
columnfile = validParameter.validFile(parameters, "column", true);
if (columnfile == "not open") { abort = true; }
else if (columnfile == "not found") { columnfile = ""; }
- else { format = "column"; globaldata->setColumnFile(columnfile); }
+ else { globaldata->newRead(); format = "column"; globaldata->setColumnFile(columnfile); }
namefile = validParameter.validFile(parameters, "name", true);
if (namefile == "not open") { abort = true; }
string scrapSeqFile = outputDir + m->getRootName(m->getSimpleName(fastaFile)) + "scrap.fasta";
outputNames.push_back(scrapSeqFile);
string trimQualFile = outputDir + m->getRootName(m->getSimpleName(fastaFile)) + "trim.qual";
- outputNames.push_back(trimQualFile);
string scrapQualFile = outputDir + m->getRootName(m->getSimpleName(fastaFile)) + "scrap.qual";
- outputNames.push_back(scrapQualFile);
+ if (qFileName != "") { outputNames.push_back(trimQualFile); outputNames.push_back(scrapQualFile); }
string groupFile = outputDir + m->getRootName(m->getSimpleName(fastaFile)) + "groups";
vector<string> fastaFileNames;