]> git.donarmstrong.com Git - mothur.git/blobdiff - chimerapintailcommand.cpp
added oldfasta and column parameter to dist.seqs so you can append distances to an...
[mothur.git] / chimerapintailcommand.cpp
index fa7fd170fb15cd4f224df0094b139dd24c93c88d..5818ab22c0bfc3e0245372de038e4c43d95a2289 100644 (file)
@@ -27,7 +27,7 @@ ChimeraPintailCommand::ChimeraPintailCommand(string option)  {
                        OptionParser parser(option);
                        map<string,string> parameters = parser.getParameters();
                        
-                       ValidParameters validParameter;
+                       ValidParameters validParameter("chimera.pintail");
                        map<string,string>::iterator it;
                        
                        //check to make sure all parameters are valid for command
@@ -173,12 +173,17 @@ ChimeraPintailCommand::ChimeraPintailCommand(string option)  {
                                //check for consfile
                                string tempConsFile = getRootName(inputDir + getSimpleName(templatefile)) + "freq";
                                ifstream FileTest(tempConsFile.c_str());
-                               if(FileTest){   m->mothurOut("I found " + tempConsFile + " in your input file directory. I will use it to save time."); m->mothurOutEndLine();  consfile = tempConsFile;  FileTest.close();     }
+                               if(FileTest){   
+                                       bool GoodFile = checkReleaseVersion(FileTest, m->getVersion());
+                                       if (GoodFile) {  
+                                               m->mothurOut("I found " + tempConsFile + " in your input file directory. I will use it to save time."); m->mothurOutEndLine();  consfile = tempConsFile;  FileTest.close();     
+                                       }
+                               }
                        }       
                        
                        quanfile = validParameter.validFile(parameters, "quantile", true);
                        if (quanfile == "not open") { abort = true; }
-                       else if (quanfile == "not found") { quanfile = "";  }
+                       else if (quanfile == "not found") { quanfile = ""; }
                }
        }
        catch(exception& e) {
@@ -251,7 +256,12 @@ int ChimeraPintailCommand::execute(){
                        }
                        
                        ifstream FileTest(tempQuan.c_str());
-                       if(FileTest){   m->mothurOut("I found " + tempQuan + " in your input file directory. I will use it to save time."); m->mothurOutEndLine();  quanfile = tempQuan;  FileTest.close();     }
+                       if(FileTest){   
+                               bool GoodFile = checkReleaseVersion(FileTest, m->getVersion());
+                               if (GoodFile) {  
+                                       m->mothurOut("I found " + tempQuan + " in your input file directory. I will use it to save time."); m->mothurOutEndLine();  quanfile = tempQuan;  FileTest.close();     
+                               }
+                       }
                        
                        chimera = new Pintail(fastaFileNames[s], templatefile, filter, processors, maskfile, consfile, quanfile, window, increment, outputDir);
                        
@@ -276,7 +286,7 @@ int ChimeraPintailCommand::execute(){
                #ifdef USE_MPI
                        int pid, end, numSeqsPerProcessor; 
                                int tag = 2001;
-                               vector<long> MPIPos;
+                               vector<unsigned long int> MPIPos;
                                
                                MPI_Status status; 
                                MPI_Comm_rank(MPI_COMM_WORLD, &pid); //find out who we are
@@ -523,7 +533,7 @@ int ChimeraPintailCommand::driver(linePair* line, string outputFName, string fil
 }
 //**********************************************************************************************************************
 #ifdef USE_MPI
-int ChimeraPintailCommand::driverMPI(int start, int num, MPI_File& inMPI, MPI_File& outMPI, MPI_File& outAccMPI, vector<long>& MPIPos){
+int ChimeraPintailCommand::driverMPI(int start, int num, MPI_File& inMPI, MPI_File& outMPI, MPI_File& outAccMPI, vector<unsigned long int>& MPIPos){
        try {
                                
                MPI_Status status;