X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=metastatscommand.cpp;h=7942bfcce548030951e3c5157438d13eb88c17d6;hb=1bf53bca7e26bf091588bc8ca6e68cbfae1df6fe;hp=2a55ff08178cb0a7da3d99aff4b157017bb3d27e;hpb=19fcbbdba99658f5eca244803280f9ee7f9f6607;p=mothur.git diff --git a/metastatscommand.cpp b/metastatscommand.cpp index 2a55ff0..7942bfc 100644 --- a/metastatscommand.cpp +++ b/metastatscommand.cpp @@ -397,13 +397,13 @@ int MetaStatsCommand::driver(int start, int num, vector& th //get filename string outputFileName = outputDir + m->getRootName(m->getSimpleName(sharedfile)) + thisLookUp[0]->getLabel() + "." + setA + "-" + setB + ".metastats"; outputNames.push_back(outputFileName); outputTypes["metastats"].push_back(outputFileName); - int nameLength = outputFileName.length(); - char * output = new char[nameLength]; - strcpy(output, outputFileName.c_str()); + //int nameLength = outputFileName.length(); + //char * output = new char[nameLength]; + //strcpy(output, outputFileName.c_str()); //build matrix from shared rabunds - double** data; - data = new double*[thisLookUp[0]->getNumBins()]; + //double** data; + //data = new double*[thisLookUp[0]->getNumBins()]; vector< vector > data2; data2.resize(thisLookUp[0]->getNumBins()); @@ -430,29 +430,29 @@ int MetaStatsCommand::driver(int start, int num, vector& th }else { //fill data for (int j = 0; j < thisLookUp[0]->getNumBins(); j++) { - data[j] = new double[subset.size()]; + //data[j] = new double[subset.size()]; data2[j].resize(subset.size(), 0.0); for (int i = 0; i < subset.size(); i++) { - data[j][i] = (subset[i]->getAbundance(j)); + //data[j][i] = (subset[i]->getAbundance(j)); data2[j][i] = (subset[i]->getAbundance(j)); } } m->mothurOut("Comparing " + setA + " and " + setB + "..."); m->mothurOutEndLine(); - metastat_main(output, thisLookUp[0]->getNumBins(), subset.size(), threshold, iters, data, setACount); + //metastat_main(output, thisLookUp[0]->getNumBins(), subset.size(), threshold, iters, data, setACount); m->mothurOutEndLine(); MothurMetastats mothurMeta(threshold, iters); - mothurMeta.runMetastats(outputFileName+".myVersion" , data2, setACount); + mothurMeta.runMetastats(outputFileName , data2, setACount); m->mothurOutEndLine(); m->mothurOutEndLine(); } //free memory - delete output; - for(int i = 0; i < thisLookUp[0]->getNumBins(); i++) { delete[] data[i]; } - delete[] data; + //delete output; + //for(int i = 0; i < thisLookUp[0]->getNumBins(); i++) { delete[] data[i]; } + //delete[] data; } return 0;