helpString += "The group parameter allows you to provide a group file so you can cluster by group. \n";
helpString += "The count parameter allows you to provide a count file so you can cluster by group. \n";
helpString += "The diffs parameter allows you to specify maximum number of mismatched bases allowed between sequences in a grouping. The default is 1.\n";
- helpString += "The topdown parameter allows you to specify whether to cluster from largest abundance to smallest or smallest to largest. Default=T, meanging largest to smallest.\n";
+ helpString += "The topdown parameter allows you to specify whether to cluster from largest abundance to smallest or smallest to largest. Default=T, meaning largest to smallest.\n";
helpString += "The pre.cluster command should be in the following format: \n";
helpString += "pre.cluster(fasta=yourFastaFile, names=yourNamesFile, diffs=yourMaxDiffs) \n";
helpString += "Example pre.cluster(fasta=amazon.fasta, diffs=2).\n";
else if (countfile == "not open") { abort = true; countfile = ""; }
else {
m->setCountTableFile(countfile);
- ct.readTable(countfile);
+ ct.readTable(countfile, true);
if (ct.hasGroupInfo()) { bygroup = true; }
else { bygroup = false; }
}
out << "ideal_seq_" << (i+1) << '\t' << alignSeqs[i].numIdentical << endl << chunk << endl;;
}//end if active i
- if(i % 100 == 0) { m->mothurOut(toString(i) + "\t" + toString(numSeqs - count) + "\t" + toString(count)); m->mothurOutEndLine(); }
+ if(i % 100 == 0) { m->mothurOutJustToScreen(toString(i) + "\t" + toString(numSeqs - count) + "\t" + toString(count)+"\n"); }
}
}else {
map<int, string> mapFile;
}//end abundance check
}//end for loop j
- if(i % 100 == 0) { m->mothurOut(toString(i) + "\t" + toString(numSeqs - count) + "\t" + toString(count)); m->mothurOutEndLine(); }
+ if(i % 100 == 0) { m->mothurOutJustToScreen(toString(i) + "\t" + toString(numSeqs - count) + "\t" + toString(count)+"\n"); }
}
for (int i = 0; i < numSeqs; i++) {
while (!in.eof()) {
in >> firstCol >> secondCol; m->gobble(in);
- for (int i = 0; i < firstCol.length(); i++) {
- if (firstCol[i] == ':') { firstCol[i] = '_'; m->changedSeqNames = true; }
- }
-
- int size = 1;
- for (int i = 0; i < secondCol.length(); i++) {
- if (secondCol[i] == ':') { secondCol[i] = '_'; m->changedSeqNames = true; }
- else if(secondCol[i] == ','){ size++; }
- }
+ m->checkName(firstCol);
+ m->checkName(secondCol);
+ int size = m->getNumNames(secondCol);
names[firstCol] = secondCol;
sizes[firstCol] = size;