//report progress
if((count) % 100 == 0){ m->mothurOut("Processing sequence: " + toString(count)); m->mothurOutEndLine(); }
+ count++;
}
//report progress
if((count) % 100 != 0){ m->mothurOut("Processing sequence: " + toString(count)); m->mothurOutEndLine(); }
if (m->control_pressed) { break; }
- in >> name >> thisTotal; m->gobble(in);
+ in >> name; m->gobble(in); in >> thisTotal; m->gobble(in);
+ if (m->debug) { m->mothurOut("[DEBUG]: " + name + '\t' + toString(thisTotal) + "\n"); }
//if group info, then read it
vector<int> groupCounts; groupCounts.resize(numGroups, 0);
contigScores.push_back(scores1[ABaseMap[i]]);
if (scores1[ABaseMap[i]] < scores2[BBaseMap[i]]) { contigScores[i] = scores2[BBaseMap[i]]; }
}else if (((seq1[i] == '.') || (seq1[i] == '-')) && ((seq2[i] != '-') && (seq2[i] != '.'))) { //seq1 is a gap and seq2 is a base, choose seq2, unless quality score for base is below threshold. In that case eliminate base
- if (scores2[BBaseMap[i]] >= pDataArray->threshold)) {
+ if (scores2[BBaseMap[i]] >= pDataArray->threshold) {
contig += seq2[i];
contigScores.push_back(scores2[BBaseMap[i]]);
}
out << endl;
}
}else{
- for (int b = 0; b < simMatrix.size(); m++) {
+ for (int b = 0; b < simMatrix.size(); b++) {
out << lookup[b]->getGroup() << '\t';
for (int n = 0; n < simMatrix[b].size(); n++) {
out << simMatrix[b][n] << '\t';
void MGClusterCommand::createRabund(map<string, int> nameMapCounts){
try {
- //RAbundVector rav;
- map<string,int>::iterator it;
- //it = nameMapCounts.begin();
- //for(int i = 0; i < list->getNumBins(); i++) { rav.push_back((*it).second); it++; }
- for ( it=nameMapCounts.begin(); it!=nameMapCounts.end(); it++ ) { rav.push_back( it->second ); }
- //return rav;
}
catch(exception& e) {
m->errorOut(e, "MGClusterCommand", "createRabund");
}
ofstream out;
- string outputFileName = outputDir + m->getRootName(m->getSimpleName(listFile)) + lists[0].getLabel() + "-" + lists[1].getLabel() + "." + getOutputFileNameTag("otuhierarchy");
+ string outputFileName = outputDir + m->getRootName(m->getSimpleName(listFile)) + lists[0].getLabel() + "-" + lists[1].getLabel() + "." + getOutputFileNameTag("otuheirarchy");
m->openOutputFile(outputFileName, out);
//go through each bin in "big" otu and output the bins in "little" otu which created it
if (queryFile.eof()) { break; }
#endif
- if(index % 100 == 0){ m->mothurOut(toString(index) + '\n'); }
+ if(index % 100 == 0){ m->mothurOut(toString(index)); m->mothurOutEndLine(); }
}
queryFile.close();
if(qFileName != "" && rFileName != ""){ reportFile.close(); qualFile.close(); }
errorSeqFile.close();
//report progress
- if(index % 100 != 0){ m->mothurOut(toString(index) + '\n'); }
+ if(index % 100 != 0){ m->mothurOut(toString(index)); m->mothurOutEndLine(); }
return index;
}
ifstream inName;
m->openInputFile(nameFile, inName);
- string first, second;
+ //string first, second;
int countName = 0;
set<string> thisnames1;
else { secondCol = pieces[i]; pairDone = true; columnOne=true; }
if (pairDone) { //save one line
+ if (m->debug) { m->mothurOut("[DEBUG]: reading names: " + firstCol + '\t' + secondCol + ".\n"); }
vector<string> names;
- m->splitAtChar(second, names, ',');
+ m->splitAtChar(secondCol, names, ',');
//get aligned string for these seqs from the fasta file
string alignedString = "";
/***********************************************************************/
SharedListVector::SharedListVector(ifstream& f) : DataVector(), maxRank(0), numBins(0), numSeqs(0) {
try {
+ groupmap = NULL; countTable = NULL;
//set up groupmap for later.
if (m->groupMode == "group") {
groupmap = new GroupMap(m->getGroupFile());
while ((nextLabel == holdLabel) && (f.eof() != true)) {
f >> groupN >> num;
- if (num != 1000) { break; }
count++;
allGroups.push_back(groupN);
m->saveNextLabel = nextLabel;
m->setAllGroups(allGroups);
+ for (int i = 0; i < allGroups.size(); i++) { cout << allGroups[i] << endl; }
}
catch(exception& e) {
if (it == outputTypes.end()) { m->mothurOut("[ERROR]: this command doesn't create a " + type + " output file.\n"); }
else {
if (type == "summary") { outputFileName = "shared.summary"; }
- if (type == "phylip") { outputFileName = "dist"; }
+ else if (type == "phylip") { outputFileName = "dist"; }
else { m->mothurOut("[ERROR]: No definition for type " + type + " output file tag.\n"); m->control_pressed = true; }
}
return outputFileName;
stdmatrix[column][row] = stdDist;
}
- string distFileName = outputDir + m->getRootName(m->getSimpleName(sharedfile)) + sumCalculators[i]->getName() + "." + thisLookup[0]->getLabel() + "." + output + ".ave." + getOutputFileNameTag("phylip");;
+ string distFileName = outputDir + m->getRootName(m->getSimpleName(sharedfile)) + sumCalculators[i]->getName() + "." + thisLookup[0]->getLabel() + "." + output + ".ave." + getOutputFileNameTag("phylip");
outputNames.push_back(distFileName); outputTypes["phylip"].push_back(distFileName);
ofstream outAve;
m->openOutputFile(distFileName, outAve);