]> git.donarmstrong.com Git - mothur.git/blobdiff - chimeraseqscommand.cpp
working on chimeras
[mothur.git] / chimeraseqscommand.cpp
index ba980a50e46405dfc3087f5ba7c02d0b25cab1ff..17f3a71a5033f1d28835bbd562af5d5f9a6b5a18 100644 (file)
@@ -52,9 +52,15 @@ ChimeraSeqsCommand::ChimeraSeqsCommand(string option){
                        if (quanfile == "not open") { abort = true; }
                        else if (quanfile == "not found") { quanfile = "";  }
                                
-                       maskfile = validParameter.validFile(parameters, "mask", true);
-                       if (maskfile == "not open") { abort = true; }
-                       else if (maskfile == "not found") { maskfile = "";  }   
+                       maskfile = validParameter.validFile(parameters, "mask", false);
+                       if (maskfile == "not found") { maskfile = "";  }        
+                       else if (maskfile != "default")  { 
+                               ifstream in;
+                               int     ableToOpen = openInputFile(maskfile, in);
+                               if (ableToOpen == 1) { abort = true; }
+                               in.close();
+                       }
+               
 
                        
 
@@ -129,7 +135,7 @@ int ChimeraSeqsCommand::execute(){
                        if (quanfile != "")                     {               chimera->setQuantiles(quanfile);                                }
                        else                                            {               chimera->setQuantiles("");                                              }
                        
-                       if (maskfile == "") { mothurOut("You have not provided a mask, so I am using the default 236627 EU009184.1 Shigella dysenteriae str. FBD013."); mothurOutEndLine();  }
+                       if (maskfile == "default") { mothurOut("I am using the default 236627 EU009184.1 Shigella dysenteriae str. FBD013."); mothurOutEndLine();  }
                        chimera->setMask(maskfile);
                                                
                }else { mothurOut("Not a valid method."); mothurOutEndLine(); return 0;         }