]> git.donarmstrong.com Git - mothur.git/blobdiff - chimeraseqscommand.cpp
changed sequence class so that when constructor is called aligned and unaligned value...
[mothur.git] / chimeraseqscommand.cpp
index 28e3e6a72d22e787b796fa04b8edda00eca560f8..08c02a8ecc64afecb5693e7f834b02b4759c1199 100644 (file)
@@ -22,7 +22,7 @@ ChimeraSeqsCommand::ChimeraSeqsCommand(string option){
                
                else {
                        //valid paramters for this command
-                       string Array[] =  {"fasta", "filter", "correction", "processors", "method", "window", "increment", "template", "conservation" };
+                       string Array[] =  {"fasta", "filter", "correction", "processors", "method", "window", "increment", "template", "conservation", "quantiles" };
                        vector<string> myArray (Array, Array+(sizeof(Array)/sizeof(string)));
                        
                        OptionParser parser(option);
@@ -48,6 +48,10 @@ ChimeraSeqsCommand::ChimeraSeqsCommand(string option){
                        if (consfile == "not open") { abort = true; }
                        else if (consfile == "not found") { consfile = "";  }   
                        
+                       quanfile = validParameter.validFile(parameters, "quantiles", true);
+                       if (quanfile == "not open") { abort = true; }
+                       else if (quanfile == "not found") { consfile = "";  }   
+                       
 
                        string temp;
                        temp = validParameter.validFile(parameters, "filter", false);                   if (temp == "not found") { temp = "T"; }
@@ -111,8 +115,13 @@ int ChimeraSeqsCommand::execute(){
                
                if (method == "bellerophon")    {               chimera = new Bellerophon(fastafile);                   }
                else if (method == "pintail")   {               chimera = new Pintail(fastafile, templatefile); 
+                       //saves time to avoid generating it
                        if (consfile != "")                     {               chimera->setCons(consfile);                                             }
                        else                                            {               chimera->setCons("");                                                   }
+                       
+                       //saves time to avoid generating it
+                       if (quanfile != "")                     {               chimera->setQuantiles(quanfile);                                }
+                       else                                            {               chimera->setQuantiles("");                                              }
                }else { mothurOut("Not a valid method."); mothurOutEndLine(); return 0;         }
                
                //set user options