]> git.donarmstrong.com Git - mothur.git/blobdiff - clearcutcommand.cpp
added sequence name to error string in fastq.info. Changed np_shannon to npshannon.
[mothur.git] / clearcutcommand.cpp
index afb215932958e273093726a3b71a398faabc4dc2..d3c7fa48128246f8f4cb28ad53727329b3de856c 100644 (file)
@@ -108,6 +108,7 @@ ClearcutCommand::ClearcutCommand(string option)  {
                
                //allow user to run help
                if(option == "help") { help(); abort = true; calledHelp = true; }
+               else if(option == "citation") { citation(); abort = true; calledHelp = true;}
                
                else {
                        vector<string> myArray = setParameters();
@@ -154,21 +155,21 @@ ClearcutCommand::ClearcutCommand(string option)  {
                        fastafile = validParameter.validFile(parameters, "fasta", true);
                        if (fastafile == "not open") { fastafile = ""; abort = true; }
                        else if (fastafile == "not found") { fastafile = ""; }  
-                       else { inputFile = fastafile;  }
+                       else { inputFile = fastafile;  m->setFastaFile(fastafile); }
                        
                        phylipfile = validParameter.validFile(parameters, "phylip", true);
                        if (phylipfile == "not open") { phylipfile = ""; abort = true; }
                        else if (phylipfile == "not found") { phylipfile = ""; }
-                       else { inputFile = phylipfile;  }
+                       else { inputFile = phylipfile;  m->setPhylipFile(phylipfile); }
                                
                        if ((phylipfile == "") && (fastafile == "")) {  
                                //is there are current file available for either of these?
                                //give priority to phylip, then fasta
                                phylipfile = m->getPhylipFile(); 
-                               if (phylipfile != "") {  m->mothurOut("Using " + phylipfile + " as input file for the phylip parameter."); m->mothurOutEndLine(); }
+                               if (phylipfile != "") {  inputFile = phylipfile; m->mothurOut("Using " + phylipfile + " as input file for the phylip parameter."); m->mothurOutEndLine(); }
                                else { 
                                        fastafile = m->getFastaFile(); 
-                                       if (fastafile != "") {  m->mothurOut("Using " + fastafile + " as input file for the fasta parameter."); m->mothurOutEndLine(); }
+                                       if (fastafile != "") { inputFile = fastafile;  m->mothurOut("Using " + fastafile + " as input file for the fasta parameter."); m->mothurOutEndLine(); }
                                        else { 
                                                m->mothurOut("No valid current files. You must provide a phylip or fasta file before you can use the clearcut command."); m->mothurOutEndLine(); 
                                                abort = true;