X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=splitmatrix.cpp;h=59e49a79e9e702cfcf70c47ffee3a42da8a0b537;hb=15b252e317fde72ce0a5de8776cb88112e0ed2b6;hp=dabcd0469461f25a79ac707cf0e785c19974cc1e;hpb=4c302368ef34f0d897afefc7853edf86fb45b9f3;p=mothur.git diff --git a/splitmatrix.cpp b/splitmatrix.cpp index dabcd04..59e49a7 100644 --- a/splitmatrix.cpp +++ b/splitmatrix.cpp @@ -25,7 +25,7 @@ SplitMatrix::SplitMatrix(string distfile, string name, string tax, float c, stri } /***********************************************************************/ -SplitMatrix::SplitMatrix(string ffile, string name, string tax, float c, float cu, string t, int p, string output){ +SplitMatrix::SplitMatrix(string ffile, string name, string tax, float c, float cu, string t, int p, bool cl, string output){ m = MothurOut::getInstance(); fastafile = ffile; namefile = name; @@ -34,6 +34,7 @@ SplitMatrix::SplitMatrix(string ffile, string name, string tax, float c, float c distCutoff = cu; //for fasta method if you are creating distance matrix you need a cutoff for that method = t; processors = p; + classic = cl; outputDir = output; } @@ -185,7 +186,9 @@ int SplitMatrix::createDistanceFilesFromTax(map& seqGroup, int numG //process each distance file for (int i = 0; i < numGroups; i++) { - string options = "fasta=" + (fastafile + "." + toString(i) + ".temp") + ", processors=" + toString(processors) + ", cutoff=" + toString(distCutoff); + string options = ""; + if (classic) { options = "fasta=" + (fastafile + "." + toString(i) + ".temp") + ", processors=" + toString(processors) + ", output=lt"; } + else { options = "fasta=" + (fastafile + "." + toString(i) + ".temp") + ", processors=" + toString(processors) + ", cutoff=" + toString(distCutoff); } if (outputDir != "") { options += ", outputdir=" + outputDir; } Command* command = new DistanceCommand(options); @@ -229,7 +232,9 @@ int SplitMatrix::createDistanceFilesFromTax(map& seqGroup, int numG for(int i=0;ihasPath(fastafile); } - string tempDistFile = outputDir + m->getRootName(m->getSimpleName((fastafile + "." + toString(i) + ".temp"))) + "dist"; + string tempDistFile = ""; + if (classic) { tempDistFile = outputDir + m->getRootName(m->getSimpleName((fastafile + "." + toString(i) + ".temp"))) + "phylip.dist";} + else { tempDistFile = outputDir + m->getRootName(m->getSimpleName((fastafile + "." + toString(i) + ".temp"))) + "dist"; } //if there are valid distances ifstream fileHandle;