vector<int> columntotal; columntotal.resize(thisLookUp.size(), 0);
vector<int> rowtotal; rowtotal.resize(numOTUS, 0);
- int rowcount = 0;
for (int i = 0; i < thisLookUp.size(); i++) {
for (int j = 0; j < thisLookUp[i]->getNumBins(); j++) {
if (m->control_pressed) { return 0; }
if(abund > 0) {
initmatrix[i][j] = 1;
co_matrix[j][i] = 1;
- rowcount++;
- columntotal[j]++;
+ rowtotal[j]++;
+ columntotal[i]++;
}
}
- rowtotal[i] = rowcount;
- rowcount = 0;
}
//nrows is ncols of inital matrix. All the functions need this value. They assume the transposition has already taken place and nrows and ncols refer to that matrix.
//initialize outputTypes
vector<string> tempOutNames;
- outputTypes["relabund"] = tempOutNames;
+ outputTypes["biom"] = tempOutNames;
//if the user changes the input directory command factory will send this info to us in the output parameter
string inputDir = validParameter.validFile(parameters, "inputdir", false);
if (m->control_pressed) { for (int i = 0; i < outputNames.size(); i++) { m->mothurRemove(outputNames[i]); } return 0; }
+ //set sabund file as new current sabundfile
+ string current = "";
+ itTypes = outputTypes.find("biom");
+ if (itTypes != outputTypes.end()) {
+ if ((itTypes->second).size() != 0) { current = (itTypes->second)[0]; m->setBiomFile(current); }
+ }
+
+
m->mothurOutEndLine();
m->mothurOut("Output File Names: "); m->mothurOutEndLine();
for (int i = 0; i < outputNames.size(); i++) { m->mothurOut(outputNames[i]); m->mothurOutEndLine(); }
temp = validParameter.validFile(parameters, "mismatch", false); if (temp == "not found"){ temp = "-1.0"; }
m->mothurConvert(temp, misMatch);
+ if (misMatch > 0) { m->mothurOut("[ERROR]: mismatch must be negative.\n"); abort=true; }
temp = validParameter.validFile(parameters, "gapopen", false); if (temp == "not found"){ temp = "-2.0"; }
m->mothurConvert(temp, gapOpen);
+ if (gapOpen > 0) { m->mothurOut("[ERROR]: gapopen must be negative.\n"); abort=true; }
temp = validParameter.validFile(parameters, "gapextend", false); if (temp == "not found"){ temp = "-1.0"; }
m->mothurConvert(temp, gapExtend);
+ if (gapExtend > 0) { m->mothurOut("[ERROR]: gapextend must be negative.\n"); abort=true; }
temp = validParameter.validFile(parameters, "processors", false); if (temp == "not found"){ temp = m->getProcessors(); }
m->setProcessors(temp);