]> git.donarmstrong.com Git - mothur.git/commitdiff
get.seqs not renaming sequences correctly for dups=f. unique.seqs crash when count...
authorSarah Westcott <mothur.westcott@gmail.com>
Wed, 29 May 2013 18:16:43 +0000 (14:16 -0400)
committerSarah Westcott <mothur.westcott@gmail.com>
Wed, 29 May 2013 18:16:43 +0000 (14:16 -0400)
clusterfragmentscommand.cpp
createdatabasecommand.cpp
deconvolutecommand.cpp
getseqscommand.cpp
makefile
screenseqscommand.cpp

index f17c11e7384330c4b9eb4d5af86f734fc0d0f21f..9c1408c9a112dcc3ad9ed579026e2528c334a102 100644 (file)
@@ -181,7 +181,7 @@ ClusterFragmentsCommand::ClusterFragmentsCommand(string option) {
             countfile = validParameter.validFile(parameters, "count", true);
                        if (countfile == "not open") { abort = true; countfile = ""; }  
                        else if (countfile == "not found") { countfile = ""; }
-                       else { ct.readTable(countfile, false); m->setCountTableFile(countfile); }
+                       else { ct.readTable(countfile, true); m->setCountTableFile(countfile); }
                        
             if ((countfile != "") && (namefile != "")) { m->mothurOut("When executing a cluster.fragments command you must enter ONLY ONE of the following: count or name."); m->mothurOutEndLine(); abort = true; }
                        
index 58799e7a33e840580654d006b7a085ec02e7c5f5..52962795691e89f1b7d8e44f2760813305e25885 100644 (file)
@@ -380,8 +380,8 @@ int CreateDatabaseCommand::execute(){
                 if (countfile == "") {
                     sort(binNames.begin(), binNames.end());
                     bin = "";
-                    for (int i = 0; i < binNames.size()-1; i++) {
-                        bin += binNames[i] + ',';
+                    for (int j = 0; j < binNames.size()-1; j++) {
+                        bin += binNames[j] + ',';
                     }
                     bin += binNames[binNames.size()-1];
                     map<string, string>::iterator it = repNames.find(bin);
index 8b73425fc5c2aefb2d7e3b4a87caf4fa8be44c40..51fa43b39f87f06a3054808acb4937e05ae2337f 100644 (file)
@@ -209,7 +209,7 @@ int DeconvoluteCommand::execute() {
         }
         CountTable ct;
         if (countfile != "")  {  
-            ct.readTable(countfile, false);
+            ct.readTable(countfile, true);
             if (countfile == outCountFile){
                 //prepare filenames and open files
                 map<string, string> mvariables;
index 9538698a3fea181430056d11f16835f66186452e..83fdf73e9af36fd9826f5a8c2efcc11655ac938e 100644 (file)
@@ -430,9 +430,11 @@ int GetSeqsCommand::readFasta(){
             
             if (!dups) {//adjust name if needed
                 map<string, string>::iterator it = uniqueMap.find(name);
-                if (it != uniqueMap.end()) { name = it->second; }
+                if (it != uniqueMap.end()) { currSeq.setName(it->second); }
             }
                        
+            name = currSeq.getName();
+            
                        if (name != "") {
                                //if this name is in the accnos file
                                if (names.count(name) != 0) {
@@ -710,7 +712,7 @@ int GetSeqsCommand::readName(){
                
                        if (m->control_pressed) { in.close(); out.close(); m->mothurRemove(outputFileName);  return 0; }
 
-                       in >> firstCol;                         
+                       in >> firstCol;                 m->gobble(in);
                        in >> secondCol;
                        
                        string hold = "";
@@ -734,6 +736,7 @@ int GetSeqsCommand::readName(){
                                selectedCount += parsedNames.size();
                 if (m->debug) { sanity["name"].insert(firstCol); }
                        }else {
+                
                                selectedCount += validSecond.size();
                                
                                //if the name in the first column is in the set then print it and any other names in second column also in set
@@ -752,6 +755,7 @@ int GetSeqsCommand::readName(){
                                
                                //make first name in set you come to first column and then add the remaining names to second column
                                }else {
+                    
                                        //you want part of this row
                                        if (validSecond.size() != 0) {
                                        
index 25ef4d4be2cbc15fe8a79657090531cc56183812..163db6bd0c547f2b73055ab5b4498dbd82ebfea3 100644 (file)
--- a/makefile
+++ b/makefile
@@ -15,8 +15,8 @@ USEREADLINE ?= yes
 CYGWIN_BUILD ?= no
 USECOMPRESSION ?= no
 MOTHUR_FILES="\"Enter_your_default_path_here\""
-RELEASE_DATE = "\"5/28/2013\""
-VERSION = "\"1.31.0\""
+RELEASE_DATE = "\"5/29/2013\""
+VERSION = "\"1.31.1\""
 FORTAN_COMPILER = gfortran
 FORTRAN_FLAGS = 
 
index 1d7cb8d73c161b147c6c2d1162a996728d8d2c23..e7b2c6acedf523f8249c8159ed186a6b8d5b8892 100644 (file)
@@ -1820,7 +1820,6 @@ int ScreenSeqsCommand::getSummary(vector<unsigned long long>& positions){
                vector<int> longHomoPolymer;
         vector<int> numNs;
                
-        vector<unsigned long long> positions;
 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)
                positions = m->divideFile(fastafile, processors);
                for (int i = 0; i < (positions.size()-1); i++) { lines.push_back(linePair(positions[i], positions[(i+1)])); }   
@@ -1845,8 +1844,9 @@ int ScreenSeqsCommand::getSummary(vector<unsigned long long>& positions){
                int pid;
                MPI_Comm_rank(MPI_COMM_WORLD, &pid); 
                
-               if (pid == 0) { 
-                       driverCreateSummary(startPosition, endPosition, seqLength, ambigBases, longHomoPolymer, numNs, fastafile, lines[0]);
+               if (pid == 0) {
+            linePair tempLine(0, positions[positions.size()-1]);
+                       driverCreateSummary(startPosition, endPosition, seqLength, ambigBases, longHomoPolymer, numNs, fastafile, tempLine);
 #else
                int numSeqs = 0;
                //#if defined (__APPLE__) || (__MACH__) || (linux) || (__linux) || (__linux__) || (__unix__) || (__unix)