]> git.donarmstrong.com Git - mothur.git/commitdiff
changes while testing 1.26
authorSarah Westcott <mothur.westcott@gmail.com>
Tue, 10 Jul 2012 15:17:33 +0000 (11:17 -0400)
committerSarah Westcott <mothur.westcott@gmail.com>
Tue, 10 Jul 2012 15:17:33 +0000 (11:17 -0400)
chimeracheckcommand.cpp
counttable.cpp
makecontigscommand.h
matrixoutputcommand.cpp
mgclustercommand.cpp
otuhierarchycommand.cpp
seqerrorcommand.cpp
sequenceparser.cpp
sharedlistvector.cpp
sharedrabundfloatvector.cpp
summarysharedcommand.cpp

index 87f51e7c95c136403024c593e681a844ca18d006..6a4732cf72cd4222e539beb93c6b0b45226d2a08 100644 (file)
@@ -551,6 +551,7 @@ int ChimeraCheckCommand::driver(linePair* filePos, string outputFName, string fi
                        
                        //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();         }
index 7f08509897f0765823b4e2e7b65f837809821c45..f632731cd8892da29469b31fdefe80d9557b52a0 100644 (file)
@@ -42,7 +42,8 @@ int CountTable::readTable(string file) {
             
             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);
index dc094a2b3e951218447927d9ceeb639d8b833f53..2308b657acf7951be6373a527f44546b555a7d2f 100644 (file)
@@ -168,7 +168,7 @@ static DWORD WINAPI MyContigsThreadFunction(LPVOID lpParam){
                     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]]);
                     }
index 4b92c577fa3f5ef319fb8805eaef432e793c8d2e..a886992a1120f36ff361e7f2a9b02921140bb731 100644 (file)
@@ -467,7 +467,7 @@ void MatrixOutputCommand::printSims(ostream& out, vector< vector<double> >& simM
                                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'; 
index 4ca0cdfb9af8f71338be56a9649ec4c6f8a07a87..2143495ce0cae46cd52a145ec19abccf9d654ac8 100644 (file)
@@ -716,12 +716,6 @@ void MGClusterCommand::sortHclusterFiles(string unsortedDist, string unsortedOve
 
 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");
index 389879634e9ea1c003bde25604652187f8f460cb..e32e0b6c339c5b80108a3e874ce9c990ef5a2376 100644 (file)
@@ -199,7 +199,7 @@ int OtuHierarchyCommand::execute(){
                }
                
                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
index 8fd6368154773bcc38e2b950d7b170c88be2186e..9a7b814873f53239e734aee7733af51cf49dab6d 100644 (file)
@@ -782,7 +782,7 @@ int SeqErrorCommand::driver(string filename, string qFileName, string rFileName,
                                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(); }
@@ -790,7 +790,7 @@ int SeqErrorCommand::driver(string filename, string qFileName, string rFileName,
                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;
        }
index c45602e4bf5c6083ae61a5943370f58a94042260..08e5ae8b859280da965566ea9bf4d6dce3b202c7 100644 (file)
@@ -64,7 +64,7 @@ SequenceParser::SequenceParser(string groupFile, string fastaFile, string nameFi
                ifstream inName;
                m->openInputFile(nameFile, inName);
                
-               string first, second;
+               //string first, second;
                int countName = 0;
                set<string> thisnames1;
                
@@ -85,8 +85,9 @@ SequenceParser::SequenceParser(string groupFile, string fastaFile, string nameFi
                 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 = "";
index 2cecb5de49d2aca77c33f21b77d584d6c15f893e..223ca073fa2c5c9c083d5d20bc024fe82f724b68 100644 (file)
@@ -25,6 +25,7 @@ SharedListVector::SharedListVector(int n):    DataVector(), data(n, "") , maxRank(0
 /***********************************************************************/
 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());
index b6d916a1900edc643291df4432728d3619a711a6..b8b91028625cec0cfd1ef59d7dc82ab67b40cde5 100644 (file)
@@ -129,7 +129,6 @@ SharedRAbundFloatVector::SharedRAbundFloatVector(ifstream& f) : DataVector(), ma
                while ((nextLabel == holdLabel) && (f.eof() != true)) {
                        f >> groupN >> num;
             
-            if (num != 1000) { break; }
                        count++;
                        
                        allGroups.push_back(groupN);
@@ -153,6 +152,7 @@ SharedRAbundFloatVector::SharedRAbundFloatVector(ifstream& f) : DataVector(), ma
                
                m->saveNextLabel = nextLabel;
                m->setAllGroups(allGroups);
+        for (int i = 0; i < allGroups.size(); i++) { cout << allGroups[i] << endl; }
        
        }
        catch(exception& e) {
index 50fbd32c3bcfa39e6b3b9c1014338eceeb7d8a8d..6147832f70a750e1424939c9928a50db643fb8b8 100644 (file)
@@ -74,7 +74,7 @@ string SummarySharedCommand::getOutputFileNameTag(string type, string inputName=
         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;
@@ -879,7 +879,7 @@ int SummarySharedCommand::process(vector<SharedRAbundVector*> thisLookup, string
                     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);