X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=matrixoutputcommand.cpp;h=67e54d034ecf6d1658e69acf0841c0f72115fee4;hb=60928795782d8f8648ec373d6a96b53032a77429;hp=2e6943f0eb7aed1c0b881b5dd5a5d079cdd4fb87;hpb=cbbf2f185fc7289910bb69421095c1de024c5225;p=mothur.git diff --git a/matrixoutputcommand.cpp b/matrixoutputcommand.cpp index 2e6943f..67e54d0 100644 --- a/matrixoutputcommand.cpp +++ b/matrixoutputcommand.cpp @@ -432,7 +432,7 @@ int MatrixOutputCommand::execute(){ string current = ""; itTypes = outputTypes.find("phylip"); if (itTypes != outputTypes.end()) { - if ((itTypes->second).size() != 0) { current = (itTypes->second)[0]; m->setPhylipFile(current); } + if ((itTypes->second).size() != 0) { current = (itTypes->second)[0]; if (!subsample) { m->setPhylipFile(current); } } } m->mothurOutEndLine(); @@ -540,7 +540,7 @@ int MatrixOutputCommand::process(vector thisLookup){ driver(thisItersLookup, lines[process].start, lines[process].end, calcDists); - string tempdistFileName = m->getRootName(m->getSimpleName(sharedfile)) + toString(getpid()) + ".dist"; + string tempdistFileName = m->getRootName(m->getSimpleName(sharedfile)) + m->mothurGetpid(process) + ".dist"; ofstream outtemp; m->openOutputFile(tempdistFileName, outtemp); @@ -739,6 +739,8 @@ int MatrixOutputCommand::process(vector thisLookup){ variables["[calc]"] = matrixCalculators[i]->getName(); string distFileName = getOutputFileName("phylip",variables); outputNames.push_back(distFileName); outputTypes["phylip"].push_back(distFileName); + //set current phylip file to average distance matrix + m->setPhylipFile(distFileName); ofstream outAve; m->openOutputFile(distFileName, outAve); outAve.setf(ios::fixed, ios::floatfield); outAve.setf(ios::showpoint);