]> git.donarmstrong.com Git - mothur.git/commitdiff
done testing 1.13.0
authorwestcott <westcott>
Thu, 9 Sep 2010 15:10:01 +0000 (15:10 +0000)
committerwestcott <westcott>
Thu, 9 Sep 2010 15:10:01 +0000 (15:10 +0000)
clearcutcommand.cpp
distancecommand.cpp
distclearcut.cpp
dmat.cpp
listseqscommand.cpp
makefile

index 590394670d13ef75ef3ec0e47db7256b18d2e66e..1a7ab1fcfc3fd51a12a6a13b67b97a5f7aae3388 100644 (file)
@@ -174,7 +174,7 @@ int ClearcutCommand::execute() {
        try {
                
                if (abort == true) { return 0; }
-                               
+               
                //prepare filename
                string outputName = outputDir + m->getRootName(m->getSimpleName(inputFile)) + "tre";
                
@@ -201,25 +201,14 @@ int ClearcutCommand::execute() {
                if (shuffle)                    {  char* temp = new char[9];  strcpy(temp, "--shuffle");  cPara.push_back(temp);        }
                if (neighbor)                   {  char* temp = new char[10];  strcpy(temp, "--neighbor");  cPara.push_back(temp);      }
                
-               string tempIn = "";
-               #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
-                       tempIn += "--in=" + inputFile; 
-               #else
-                       tempIn += "--in=\"" + inputFile + "\"";  
-               #endif
-               
+               string tempIn = "--in=" + inputFile;  
                char* tempI = new char[tempIn.length()];
                strcpy(tempI, tempIn.c_str());
                cPara.push_back(tempI);
                
                if (stdoutWanted)               {  char* temp = new char[8];  strcpy(temp, "--stdout");  cPara.push_back(temp); }
                else{  
-                       string tempOut = "";
-                       #if defined (__APPLE__) || (__MACH__) || (linux) || (__linux)
-                               tempOut += "--out=" + outputName;  
-                       #else
-                               tempOut += "--out=\"" + outputName + "\""; 
-                       #endif
+                       string tempOut = "--out=" + outputName;  
                        
                        char* temp = new char[tempOut.length()];
                        strcpy(temp, tempOut.c_str());
index b3f0a2dd6974b3eb72120a9d6458d55e9eaac6ff..8bdd7cd05de81b8f4759d40dcf4b10e109855e5f 100644 (file)
@@ -422,6 +422,13 @@ int DistanceCommand::execute(){
                                remove(outputFile.c_str());
                                outputFile = column;
                        }
+                       
+                       if (outputDir != "") { 
+                               string newOutputName = outputDir + m->getSimpleName(outputFile);
+                               rename(outputFile.c_str(), newOutputName.c_str());
+                               remove(outputFile.c_str());
+                               outputFile = newOutputName;
+                       }
                }
 
                
index a4ac7771a64e55f0e915b92958bad857077bd19b..cf696497032ed81700f8eb1321df24a5f098bc4d 100644 (file)
@@ -78,7 +78,7 @@ NJ_build_distance_matrix(NJ_ARGS *nj_args) {
   /* Read an alignment in FASTA format */
   alignment = 
     NJ_read_fasta(nj_args);
-  
   if(!alignment) {
     return(NULL);
   }
@@ -91,6 +91,7 @@ NJ_build_distance_matrix(NJ_ARGS *nj_args) {
    * From proteins, we may want to allow users to specify
    * a substitution matrix (feature)
    */
+
   dmat = 
     NJ_compute_dmat(nj_args,
                    alignment);
@@ -100,7 +101,7 @@ NJ_build_distance_matrix(NJ_ARGS *nj_args) {
   if(!dmat) {
     fprintf(stderr, "Clearcut: Error computing distance matrix\n");
   }
-  
   /* now free the memory associated with the alignment */
   NJ_free_alignment(alignment);
 
@@ -156,6 +157,7 @@ NJ_compute_dmat(NJ_ARGS *nj_args,
 
   /* allocate val matrix in dmat */
   dmat->val = (float *)calloc(dmat->ntaxa*dmat->ntaxa, sizeof(float));
+
   if(!dmat->val) {
     fprintf(stderr, "Clearcut: Memory allocation error in NJ_compute_dmat()\n");
     return(NULL);
@@ -209,7 +211,7 @@ NJ_compute_dmat(NJ_ARGS *nj_args,
     fprintf(stderr, "Clearcut: Invalid distance correction model.\n");
     return(NULL);
   }
-  
   return(dmat);
 }
 
index 1d00cffe8672effe8e4f7f022ba28af1bfcc9015..64fd67e91c348aabd4dd268c8bb86a24cc053edc 100644 (file)
--- a/dmat.cpp
+++ b/dmat.cpp
@@ -465,7 +465,7 @@ NJ_parse_distance_matrix(NJ_ARGS *nj_args) {
     fp = stdin;
   } else {
     fp = fopen(nj_args->infilename, "r");
-    if(!fp) {
+    if(fp==NULL) {
       fprintf(stderr, "Clearcut: Could not open distance matrix: %s\n", nj_args->infilename);
       perror("Clearcut");
       goto XIT_BAD;
index a3f88cf74d2c1eaa5c88fd792f678a7e5a7b4bf3..d85d5be2909aa153d8e4331a80ff6d91fc6ea9c2 100644 (file)
@@ -208,7 +208,7 @@ int ListSeqsCommand::readFasta(){
                ifstream in;
                m->openInputFile(fastafile, in);
                string name;
-               
+       
                while(!in.eof()){
                        
                        if (m->control_pressed) { in.close(); return 0; }
index ffee66ec76967b2f69f376706ae72d24e78911e1..278a3adc659ac0d8e6d5afd9815ad0adac7dafd6 100644 (file)
--- a/makefile
+++ b/makefile
@@ -13,9 +13,9 @@
 
 CXXFLAGS += -O3
 
-MOTHUR_FILES = "\"../Release\""
+MOTHUR_FILES = "\"Enter_your_default_path_here\""
 
-RELEASE_DATE = "\"8/30/2010\""
+RELEASE_DATE = "\"9/9/2010\""
 VERSION = "\"1.13.0\""
 
 CXXFLAGS += -DRELEASE_DATE=${RELEASE_DATE} -DVERSION=${VERSION}