]> git.donarmstrong.com Git - mothur.git/commitdiff
fixed bugg in shhh.seqs command
authorpschloss <pschloss>
Tue, 15 Feb 2011 18:29:26 +0000 (18:29 +0000)
committerpschloss <pschloss>
Tue, 15 Feb 2011 18:29:26 +0000 (18:29 +0000)
Mothur.xcodeproj/project.pbxproj
shhhercommand.cpp

index 18266f9acd07fec9a4147711733245c6dee0c165..511f0d65a1dcee18fc9b76a6b345845cf8e23417 100644 (file)
@@ -16,7 +16,6 @@
                A727864412E9E28C00F86ABA /* removerarecommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A727864312E9E28C00F86ABA /* removerarecommand.cpp */; };
                A75790591301749D00A30DAB /* homovacommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A75790581301749D00A30DAB /* homovacommand.cpp */; };
                A799F5B91309A3E000AEEFA0 /* makefastqcommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A799F5B81309A3E000AEEFA0 /* makefastqcommand.cpp */; };
-               A799F6571309C22A00AEEFA0 /* anosimcommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A799F6561309C22A00AEEFA0 /* anosimcommand.cpp */; };
                A7A61F2D130062E000E05B6B /* amovacommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7A61F2C130062E000E05B6B /* amovacommand.cpp */; };
                A7E9B88112D37EC400DA6239 /* ace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7E9B64F12D37EC300DA6239 /* ace.cpp */; };
                A7E9B88212D37EC400DA6239 /* aligncommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7E9B65112D37EC300DA6239 /* aligncommand.cpp */; };
                A75790581301749D00A30DAB /* homovacommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = homovacommand.cpp; sourceTree = "<group>"; };
                A799F5B71309A3E000AEEFA0 /* makefastqcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = makefastqcommand.h; sourceTree = "<group>"; };
                A799F5B81309A3E000AEEFA0 /* makefastqcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = makefastqcommand.cpp; sourceTree = "<group>"; };
-               A799F6551309C22A00AEEFA0 /* anosimcommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = anosimcommand.h; sourceTree = "<group>"; };
-               A799F6561309C22A00AEEFA0 /* anosimcommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = anosimcommand.cpp; sourceTree = "<group>"; };
                A7A61F1A130035C800E05B6B /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
                A7A61F2B130062E000E05B6B /* amovacommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = amovacommand.h; sourceTree = "<group>"; };
                A7A61F2C130062E000E05B6B /* amovacommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = amovacommand.cpp; sourceTree = "<group>"; };
                                A7E9B65212D37EC300DA6239 /* aligncommand.h */,
                                A7A61F2B130062E000E05B6B /* amovacommand.h */,
                                A7A61F2C130062E000E05B6B /* amovacommand.cpp */,
-                               A799F6551309C22A00AEEFA0 /* anosimcommand.h */,
-                               A799F6561309C22A00AEEFA0 /* anosimcommand.cpp */,
                                A7E9B66012D37EC300DA6239 /* binsequencecommand.cpp */,
                                A7E9B66112D37EC300DA6239 /* binsequencecommand.h */,
                                A7E9B66A12D37EC400DA6239 /* bootstrapsharedcommand.cpp */,
                        attributes = {
                                ORGANIZATIONNAME = "Schloss Lab";
                        };
-                       buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "mothur" */;
+                       buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "Mothur" */;
                        compatibilityVersion = "Xcode 3.1";
                        developmentRegion = English;
                        hasScannedForEncodings = 1;
                                A75790591301749D00A30DAB /* homovacommand.cpp in Sources */,
                                A7FA10021302E097003860FE /* mantelcommand.cpp in Sources */,
                                A799F5B91309A3E000AEEFA0 /* makefastqcommand.cpp in Sources */,
-                               A799F6571309C22A00AEEFA0 /* anosimcommand.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                        defaultConfigurationIsVisible = 0;
                        defaultConfigurationName = Release;
                };
-               1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "mothur" */ = {
+               1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "Mothur" */ = {
                        isa = XCConfigurationList;
                        buildConfigurations = (
                                1DEB928A08733DD80010E9CD /* Debug */,
index 39a27d593abd1a3da6d9f93ab89e79b893c72089..b2b4de0559feff2074fb6269b6e18a8dafb9d6e4 100644 (file)
@@ -32,7 +32,7 @@
 vector<string> ShhherCommand::getValidParameters(){    
        try {
                string Array[] =  {     
-                       "file", "flow", "lookup", "cutoff", "sigma", "outputdir","inputdir", "processors"       
+                       "file", "flow", "lookup", "cutoff", "sigma", "outputdir","inputdir", "processors", "maxiter", "mindelta"        
                };
                
                vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
@@ -111,7 +111,7 @@ ShhherCommand::ShhherCommand(string option) {
                        
                        //valid paramters for this command
                        string AlignArray[] =  {
-                               "file", "flow", "lookup", "cutoff", "sigma", "outputdir","inputdir", "processors"       
+                               "file", "flow", "lookup", "cutoff", "sigma", "outputdir","inputdir", "processors", "maxiter", "mindelta"        
                        };
                        
                        vector<string> myArray (AlignArray, AlignArray+(sizeof(AlignArray)/sizeof(string)));
@@ -294,8 +294,8 @@ int ShhherCommand::execute(){
                                
                                m->mothurOut("\n>>>>>\tProcessing " + flowFileName + " (file " + toString(i+1) + " of " + toString(numFiles) + ")\t<<<<<\n");
                                m->mothurOut("Reading flowgrams...\n");
-                               
                                getFlowData();
+
                                m->mothurOut("Identifying unique flowgrams...\n");
                                getUniques();
 
@@ -704,6 +704,10 @@ int ShhherCommand::execute(){
                        double begClock = clock();
                        unsigned long int begTime = time(NULL);
 
+                       
+                       cout << numOTUs << endl;
+                       
+                       
                        m->mothurOut("\nDenoising flowgrams...\n");
                        m->mothurOut("iter\tmaxDelta\tnLL\t\tcycletime\n");
                        
@@ -1210,7 +1214,7 @@ void ShhherCommand::getOTUData(string listFileName){
                otuData.assign(numSeqs, 0);
                cumNumSeqs.assign(numOTUs, 0);
                nSeqsPerOTU.assign(numOTUs, 0);
-               aaP.resize(numOTUs);
+               aaP.clear();aaP.resize(numOTUs);
                
                seqNumber.clear();
                aaI.clear();
@@ -1266,6 +1270,8 @@ void ShhherCommand::getOTUData(string listFileName){
                        for(int j=nSeqsPerOTU[i];j<numSeqs;j++){
                                aaP[i].push_back(0);
                        }
+                       
+                       
                }
                
                for(int i=1;i<numOTUs;i++){
@@ -1275,6 +1281,13 @@ void ShhherCommand::getOTUData(string listFileName){
                seqIndex = seqNumber;
                
                listFile.close();       
+               
+               for(int i=0;i<seqNumber.size();i++){
+                       cout << seqNumber[i] << ' ';
+               }
+               cout << endl;
+               
+               
        }
        catch(exception& e) {
                m->errorOut(e, "ShhherCommand", "getOTUData");
@@ -1295,6 +1308,8 @@ void ShhherCommand::initPyroCluster(){
                nSeqsBreaks.assign(processors+1, 0);
                nOTUsBreaks.assign(processors+1, 0);
 
+               cout << numSeqs << '\t' << numOTUs << '\t' << processors << endl;
+               
                nSeqsBreaks[0] = 0;
                for(int i=0;i<processors;i++){
                        nSeqsBreaks[i+1] = nSeqsBreaks[i] + (int)((double) numSeqs / (double) processors);
@@ -1393,6 +1408,10 @@ void ShhherCommand::calcCentroidsDriver(int start, int finish){
        
        try{
                
+//             for(int i=0;i<seqNumber.size();i++){
+//                     cout << seqNumber[i] << ' ';
+//             }cout << endl;
+               
                for(int i=start;i<finish;i++){
                        
                        double count = 0;
@@ -1404,7 +1423,7 @@ void ShhherCommand::calcCentroidsDriver(int start, int finish){
                        for(int j=0;j<nSeqsPerOTU[i];j++){
                                count += singleTau[seqNumber[cumNumSeqs[i] + j]];
                        }
-                       
+
                        if(nSeqsPerOTU[i] > 0 && count > MIN_COUNT){
                                vector<double> adF(nSeqsPerOTU[i]);
                                vector<int> anL(nSeqsPerOTU[i]);