]> git.donarmstrong.com Git - mothur.git/commitdiff
1.21.0
authorwestcott <westcott>
Wed, 27 Jul 2011 14:54:16 +0000 (14:54 +0000)
committerwestcott <westcott>
Wed, 27 Jul 2011 14:54:16 +0000 (14:54 +0000)
chimerapintailcommand.cpp
makefile
mothurfisher.cpp
mothurfisher.h
mothurout.cpp
myutils.cpp
pintail.cpp

index 01a905f40d4c69514230ad033367cc02982cd3db..33ac69a37a33e6cb3b6e2993850ae7611f5f5a74 100644 (file)
@@ -392,7 +392,6 @@ int ChimeraPintailCommand::execute(){
                                        }
                                }
                        }
-                       
                        chimera = new Pintail(fastaFileNames[s], templatefile, filter, processors, maskfile, consfile, quanfile, window, increment, outputDir);
                        
                        if (outputDir == "") { outputDir = m->hasPath(fastaFileNames[s]);  }//if user entered a file with a path then preserve it
index aa69ce10aad8589557369b1c9656942e1988950b..0f7d0981991a9b12db6513bff253a47ea7e25009 100644 (file)
--- a/makefile
+++ b/makefile
@@ -28,6 +28,11 @@ ifeq  ($(strip $(64BIT_VERSION)),yes)
        #if you are a mac user use the following line
        TARGET_ARCH += -arch x86_64
        
+       #if you using cygwin to build Windows the following line
+       #CXX = x86_64-w64-mingw32-g++
+       #CC = x86_64-w64-mingw32-g++
+       #TARGET_ARCH += -m64
+
        #if you are a linux user use the following line
        #CXXFLAGS += -mtune=native -march=native -m64
        
index 6f705b979f8ba0cc41b5ceead966dc7b0cf7a918..7acefb2087533546b6089afb984005ec8db64d45 100644 (file)
@@ -90,11 +90,12 @@ double MothurFisher::hyper_323(double n11, double n1_, double n_1, double n){
        }
 }
 /***********************************************************/
-double MothurFisher::hyper(double n11){
+double MothurFisher::myhyper(double n11){
        try {
-               return(hyper0(n11,0,0,0));
+               double hyper0Result = hyper0(n11,0,0,0);
+               return hyper0Result;
        }catch(exception& e) {
-               m->errorOut(e, "MothurFisher", "hyper");
+               m->errorOut(e, "MothurFisher", "myhyper");
                exit(1);
        }
 }
@@ -150,21 +151,21 @@ double MothurFisher::exact(double n11, double n1_, double n_1, double n){
                }
                prob=hyper0(n11,n1_,n_1,n);
                sleft=0;
-               p=hyper(min);
+               p=myhyper(min);
                for(i=min+1; p<0.99999999*prob; i++)
                {
                        sleft += p;
-                       p=hyper(i);
+                       p=myhyper(i);
                }
                i--;
                if(p<1.00000001*prob) sleft += p;
                else i--;
                sright=0;
-               p=hyper(max);
+               p=myhyper(max);
                for(j=max-1; p<0.99999999*prob; j--)
                {
                        sright += p;
-                       p=hyper(j);
+                       p=myhyper(j);
                }
                j++;
                if(p<1.00000001*prob) sright += p;
@@ -182,7 +183,7 @@ double MothurFisher::exact(double n11, double n1_, double n_1, double n){
                return prob;
                
        }catch(exception& e) {
-               m->errorOut(e, "MothurFisher", "hyper0");
+               m->errorOut(e, "MothurFisher", "exact");
                exit(1);
        }
 }
index 88557d4656eb639ff5a19be66489857551faa50a..2742f97213e7bc99a080143b4d91e061dca7b2d0 100644 (file)
@@ -29,7 +29,7 @@ private:
        double lnfact(double);
        double lnbico(double, double);
        double hyper_323(double, double, double, double);
-       double hyper(double);
+       double myhyper(double);
        double hyper0(double, double, double, double);
        double exact(double, double, double, double);
 };
index 367f5d12fc0555833061fb3d3dcabb4581006e64..cdde507ce4464ef9da5d8f5041d56ae73818941f 100644 (file)
@@ -902,7 +902,7 @@ int MothurOut::renameFile(string oldName, string newName){
                string command = "mv " + oldName + " " + newName;
                system(command.c_str());
        #else
-               m->mothurRemove(newName);
+               mothurRemove(newName);
                int renameOk = rename(oldName.c_str(), newName.c_str());
        #endif
                return 0;
index 786316e13434c07f9844cb55be24e12dae84b292..78bf5439091ade28ce3337094deda7fc91779c3b 100755 (executable)
@@ -143,22 +143,22 @@ bool myisatty(int fd)
 \r
 #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)\r
 #else\r
-#ifdef BIT_VERSION\r
-#include <io.h>\r
-int fseeko(FILE *stream, off_t offset, int whence)\r
-       {\r
-       off_t FilePos = _fseeki64(stream, offset, whence);\r
-       return (FilePos == -1L) ? -1 : 0;\r
-       }\r
-#define ftello(fm) (off_t) _ftelli64(fm)\r
-#else \r
+//#ifdef BIT_VERSION\r
+//#include <io.h>\r
+//int fseeko(FILE *stream, off_t offset, int whence)\r
+////   {\r
+//     off_t FilePos = _fseeki64(stream, offset, whence);\r
+//     return (FilePos == -1L) ? -1 : 0;\r
+//     }\r
+//#define ftello(fm) (off_t) _ftelli64(fm)\r
+//#else \r
 int fseeko(FILE *stream, off_t offset, int whence)\r
 {\r
        off_t FilePos = fseek(stream, offset, whence);\r
        return (FilePos == -1L) ? -1 : 0;\r
 }\r
 #define ftello(fm) (off_t) ftell(fm)\r
-#endif\r
+//#endif\r
 #endif\r
 \r
 void LogStdioFileState(FILE *f)\r
@@ -513,7 +513,8 @@ off_t GetStdioFilePos(FILE *f)
 off_t GetStdioFileSize(FILE *f)\r
        {\r
        off_t CurrentPos = GetStdioFilePos(f);\r
-       int Ok = fseeko(f, 0, SEEK_END);\r
+       off_t zeroPos = 0;\r
+       int Ok = fseeko(f, zeroPos, SEEK_END);\r
        if (Ok < 0)\r
                Die("fseek in GetFileSize");\r
 \r
index f6e7aa5b8db516d29dd7a3366d8ea32a603633ca..af64c25ce290a808a5edc8295645bc16bf277856 100644 (file)
@@ -170,13 +170,13 @@ int Pintail::doPrep() {
                        string noOutliers, outliers;
                        
                        if ((!filter) && (seqMask == "")) {
-                               noOutliers = templateFileName + "pintail.quan";
+                               noOutliers = m->getRootName(m->getSimpleName(templateFileName)) + "pintail.quan";
                        }else if ((!filter) && (seqMask != "")) { 
-                               noOutliers =templateFileName + "pintail.masked.quan";
+                               noOutliers =m->getRootName(m->getSimpleName(templateFileName)) + "pintail.masked.quan";
                        }else if ((filter) && (seqMask != "")) { 
-                               noOutliers = templateFileName + "pintail.filtered." + m->getSimpleName(m->getRootName(fastafile)) + "masked.quan";
+                               noOutliers = m->getRootName(m->getSimpleName(templateFileName)) + "pintail.filtered." + m->getSimpleName(m->getRootName(fastafile)) + "masked.quan";
                        }else if ((filter) && (seqMask == "")) { 
-                               noOutliers = templateFileName + "pintail.filtered." + m->getSimpleName(m->getRootName(fastafile)) + "quan";
+                               noOutliers = m->getRootName(m->getSimpleName(templateFileName)) + "pintail.filtered." + m->getSimpleName(m->getRootName(fastafile)) + "quan";
                        }
 
                        decalc->removeObviousOutliers(quantilesMembers, templateSeqs.size());