m->mothurOutEndLine();
abort = true;
}
- else if (flowFileName == "not open" || flowFilesFileName == "not open") { abort = true; }
+ else if (flowFileName == "not open" || flowFilesFileName == "not open") { abort = true; }
+
+ if(flowFileName != "not found"){ compositeFASTAFileName = ""; }
+ else{
+ compositeFASTAFileName = flowFilesFileName.substr(0, flowFilesFileName.length()-10) + "pn.fasta";
+ ofstream temp;
+ m->openOutputFile(compositeFASTAFileName, temp);
+ temp.close();
+ }
//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"){
cout << "\nClustering flowgrams..." << endl;
string listFileName = cluster(distFileName, namesFileName);
- // string listFileName = "PriestPot_C7.pn.list";
- // string listFileName = "test.mock_rep3.v69.pn.list";
-
+
getOTUData(listFileName);
initPyroCluster();
void ShhherCommand::writeSequences(vector<int> otuCounts){
try {
-
string bases = "TACG";
string fastaFileName = flowFileName.substr(0,flowFileName.find_last_of('.')) + ".pn.fasta";
}
}
fastaFile.close();
+
+ if(compositeFASTAFileName != ""){
+ m->appendFiles(fastaFileName, compositeFASTAFileName);
+ }
}
catch(exception& e) {
m->errorOut(e, "ShhherCommand", "writeSequences");
int abort;
map<string, vector<string> > outputTypes;
- string outputDir, flowFileName, flowFilesFileName, lookupFileName;
+ string outputDir, flowFileName, flowFilesFileName, lookupFileName, compositeFASTAFileName;
+
int processors, maxIters;
float cutoff, sigma, minDelta;
convert(temp, tdiffs);
if(tdiffs == 0){ tdiffs = bdiffs + pdiffs; }
- temp = validParameter.validFile(parameters, "allfiles", false); if (temp == "not found") { temp = "T"; }
+ temp = validParameter.validFile(parameters, "allfiles", false); if (temp == "not found"){ temp = "T"; }
allFiles = m->isTrue(temp);
- temp = validParameter.validFile(parameters, "processors", false); if (temp == "not found") { temp = "1"; }
+ temp = validParameter.validFile(parameters, "processors", false); if (temp == "not found"){ temp = "1"; }
convert(temp, processors);
if(oligoFileName == ""){ allFiles = 0; }
output.close();
}
outputTypes["flow.files"].push_back(flowFilesFileName);
+ outputNames.push_back(flowFileName);
m->mothurOutEndLine();
m->mothurOut("Output File Names: "); m->mothurOutEndLine();
if(fasta) { currSeq.printSequence(fastaFile); }
if(allFiles){
-// string fileName = outputDir + m->getRootName(m->getSimpleName(flowFileName)) + barcodePrimerCombos[barcodeIndex][primerIndex] + ".flow";
ofstream output;
m->openOutputFileAppend(barcodePrimerComboFileNames[barcodeIndex][primerIndex], output);
output.setf(ios::fixed, ios::floatfield); trimFlowFile.setf(ios::showpoint);
flowData.printFlows(output);
output.close();
- }
-
+ }
}
else{
flowData.printFlows(scrapFlowFile, trashCode);