]> git.donarmstrong.com Git - mothur.git/commitdiff
fixed some bugs found while testing 1.8
authorwestcott <westcott>
Wed, 27 Jan 2010 21:08:49 +0000 (21:08 +0000)
committerwestcott <westcott>
Wed, 27 Jan 2010 21:08:49 +0000 (21:08 +0000)
ccode.cpp
ccode.h
chimeraseqscommand.cpp
classifyseqscommand.cpp
commandfactory.cpp

index a86e0fda553c664d8175c524ef1f272f9e7de547..c474d7a0ad7cb54729f809cf9921ed234f48d5db 100644 (file)
--- a/ccode.cpp
+++ b/ccode.cpp
@@ -13,7 +13,7 @@
 
 
 //***************************************************************************************************************
-Ccode::Ccode(string filename, string temp) {  fastafile = filename;  templateFile = temp;  }
+Ccode::Ccode(string filename, string temp, string o) {  fastafile = filename;  templateFile = temp;  outputDir = o; }
 //***************************************************************************************************************
 
 Ccode::~Ccode() {
@@ -32,7 +32,7 @@ void Ccode::print(ostream& out) {
                
                mothurOutEndLine();
                
-               string mapInfo = getRootName(fastafile) + "mapinfo";
+               string mapInfo = outputDir + getRootName(getSimpleName(fastafile)) + "mapinfo";
                ofstream out2;
                openOutputFile(mapInfo, out2);
                
diff --git a/ccode.h b/ccode.h
index 0ea27532fbd7093818212c344c03dcae6229a868..52592f9c8e19ef4ef80e26b62199e3c9daf489d8 100644 (file)
--- a/ccode.h
+++ b/ccode.h
@@ -24,7 +24,7 @@
 class Ccode : public Chimera {
        
        public:
-               Ccode(string, string);  
+               Ccode(string, string, string);  
                ~Ccode();
                
                int getChimeras();
index 63d02f5fd6998e61b65c85012d37d8061f6ff433..49414883224bb940b761ee4d1a47ae481982973d 100644 (file)
@@ -254,7 +254,7 @@ int ChimeraSeqsCommand::execute(){
                
                if (method == "bellerophon")                    {               chimera = new Bellerophon(fastafile, outputDir);                        }
                else if (method == "pintail")                   {               chimera = new Pintail(fastafile, templatefile, outputDir);      }
-               else if (method == "ccode")                             {               chimera = new Ccode(fastafile, templatefile);                           }
+               else if (method == "ccode")                             {               chimera = new Ccode(fastafile, templatefile, outputDir);                        }
                else if (method == "chimeracheck")              {               chimera = new ChimeraCheckRDP(fastafile, templatefile, outputDir);      }
                else if (method == "chimeraslayer")             {               chimera = new ChimeraSlayer(fastafile, templatefile);           }
                else { mothurOut("Not a valid method."); mothurOutEndLine(); return 0;          }
index e6eb560e6880ff500f47d8c629f1a0b0c04066b7..51578e3ec27dda5b1d73b3497201430cd9868495 100644 (file)
@@ -528,7 +528,6 @@ int ClassifySeqsCommand::driver(linePair* line, string taxFName, string tempTFNa
                                                outTax << candidateSeq->getName() << '\t' << taxonomy << endl;
                                        }else{
                                                outTax << candidateSeq->getName() << '\t' << classify->getSimpleTax() << endl;
-                                               cout << classify->getSimpleTax() << endl;
                                        }
                                        
                                        outTaxSimple << candidateSeq->getName() << '\t' << classify->getSimpleTax() << endl;
index ddb70290936458fdbc5ca85d550fff1bc1d6ea96..5eb4ff5df0eaf4999808925e658e61c1eedccf31 100644 (file)
@@ -155,11 +155,16 @@ Command* CommandFactory::getCommand(string commandName, string optionString){
                delete command;   //delete the old command
                
                //user has opted to redirect output from dir where input files are located to some other place
-               if (outputDir != "") { optionString += ", outputdir=" + outputDir; }
+               if (outputDir != "") { 
+                       if (optionString != "") { optionString += ", outputdir=" + outputDir; }
+                       else { optionString += "outputdir=" + outputDir; }
+               }
                
                //user has opted to redirect input from dir where mothur.exe is located to some other place
-               if (inputDir != "") { optionString += ", inputdir=" + inputDir; }
-
+               if (inputDir != "") { 
+                       if (optionString != "") { optionString += ", inputdir=" + inputDir; }
+                       else { optionString += "inputdir=" + inputDir; }
+               }
                
                if(commandName == "read.dist")                                  {       command = new ReadDistCommand(optionString);                    }
                else if(commandName == "read.otu")                              {       command = new ReadOtuCommand(optionString);                             }