X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=splitmatrix.cpp;h=80f311dc61cbd8d52342ee55d39c2284b161761d;hb=fca3f55d5ded10c3dc77856f3cc4a1c53b02bb6f;hp=a4e1f98581b9ce947dd53ad016dc347c71c99ffe;hpb=260ae19c36cb11a53ddc5a75b5e507f8dd8b31d6;p=mothur.git diff --git a/splitmatrix.cpp b/splitmatrix.cpp index a4e1f98..80f311d 100644 --- a/splitmatrix.cpp +++ b/splitmatrix.cpp @@ -10,6 +10,7 @@ #include "splitmatrix.h" #include "phylotree.h" #include "distancecommand.h" +#include "seqsummarycommand.h" /***********************************************************************/ @@ -24,12 +25,13 @@ SplitMatrix::SplitMatrix(string distfile, string name, string tax, float c, stri } /***********************************************************************/ -SplitMatrix::SplitMatrix(string ffile, string name, string tax, float c, string t, int p, string output){ +SplitMatrix::SplitMatrix(string ffile, string name, string tax, float c, float cu, string t, int p, string output){ m = MothurOut::getInstance(); fastafile = ffile; namefile = name; taxFile = tax; - cutoff = c; + cutoff = c; //tax level cutoff + distCutoff = cu; //for fasta method if you are creating distance matrix you need a cutoff for that method = t; processors = p; outputDir = output; @@ -64,6 +66,8 @@ int SplitMatrix::splitDistance(){ if (large) { splitDistanceLarge(); } else { splitDistanceRAM(); } + + return 0; } catch(exception& e) { @@ -76,7 +80,7 @@ int SplitMatrix::splitDistance(){ int SplitMatrix::splitClassify(){ try { cutoff = int(cutoff); - + map seqGroup; map::iterator it; map::iterator it2; @@ -181,9 +185,10 @@ 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(cutoff); + string options = "fasta=" + (fastafile + "." + toString(i) + ".temp") + ", processors=" + toString(processors) + ", cutoff=" + toString(distCutoff); Command* command = new DistanceCommand(options); + command->execute(); delete command; @@ -192,7 +197,7 @@ int SplitMatrix::createDistanceFilesFromTax(map& seqGroup, int numG //remove old names files just in case remove((namefile + "." + toString(i) + ".temp").c_str()); } - + singleton = namefile + ".extra.temp"; ofstream remainingNames; m->openOutputFile(singleton, remainingNames); @@ -222,6 +227,7 @@ 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"; //if there are valid distances