X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=cooccurrencecommand.cpp;h=465ddced27b92345392d2752657bc1e3b7453f58;hb=5d5ce917adda39d712a4d5ac0932671db1426393;hp=f9db5be5691f424f70874f0f318b968c186df7bb;hpb=a3e570dffa9ccc939a170e5cff1285d5b266b4cc;p=mothur.git diff --git a/cooccurrencecommand.cpp b/cooccurrencecommand.cpp index f9db5be..465ddce 100644 --- a/cooccurrencecommand.cpp +++ b/cooccurrencecommand.cpp @@ -277,8 +277,8 @@ int CooccurrenceCommand::getCooccurrence(vector& thisLookUp vector columntotal; columntotal.resize(thisLookUp.size(), 0); vector rowtotal; rowtotal.resize(numOTUS, 0); - for (int i = 0; i < thisLookUp.size(); i++) { - for (int j = 0; j < thisLookUp[i]->getNumBins(); j++) { + for (int i = 0; i < thisLookUp.size(); i++) { //nrows in the shared file + for (int j = 0; j < thisLookUp[i]->getNumBins(); j++) { //cols of original shared file if (m->control_pressed) { return 0; } int abund = thisLookUp[i]->getAbundance(j); @@ -296,8 +296,6 @@ int CooccurrenceCommand::getCooccurrence(vector& thisLookUp int ncols = thisLookUp.size();//groups double initscore = 0.0; - vector columntotal; columntotal.resize(ncols, 0); - vector rowtotal; rowtotal.resize(nrows, 0); vector stats; double probabilityMatrix[ncols * nrows]; vector > nullmatrix(nrows, vector(ncols, 0));