]> git.donarmstrong.com Git - mothur.git/blobdiff - filterseqscommand.cpp
fixed helps
[mothur.git] / filterseqscommand.cpp
index c463cd294d04dcdc31e1a6891db1659db45dc05e..c4a3a95fe7d2cff8948650ebabea4290fbaa742a 100644 (file)
@@ -25,6 +25,7 @@ vector<string> FilterSeqsCommand::getValidParameters(){
 //**********************************************************************************************************************
 FilterSeqsCommand::FilterSeqsCommand(){        
        try {
+               abort = true;
                //initialize outputTypes
                vector<string> tempOutNames;
                outputTypes["fasta"] = tempOutNames;
@@ -132,7 +133,9 @@ FilterSeqsCommand::FilterSeqsCommand(string option)  {
                                                if (m->getDefaultPath() != "") { //default path is set
                                                        string tryPath = m->getDefaultPath() + m->getSimpleName(fastafileNames[i]);
                                                        m->mothurOut("Unable to open " + fastafileNames[i] + ". Trying default " + tryPath); m->mothurOutEndLine();
-                                                       ableToOpen = m->openInputFile(tryPath, in, "noerror");
+                                                       ifstream in2;
+                                                       ableToOpen = m->openInputFile(tryPath, in2, "noerror");
+                                                       in2.close();
                                                        fastafileNames[i] = tryPath;
                                                }
                                        }
@@ -142,7 +145,9 @@ FilterSeqsCommand::FilterSeqsCommand(string option)  {
                                                if (m->getOutputDir() != "") { //default path is set
                                                        string tryPath = m->getOutputDir() + m->getSimpleName(fastafileNames[i]);
                                                        m->mothurOut("Unable to open " + fastafileNames[i] + ". Trying output directory " + tryPath); m->mothurOutEndLine();
-                                                       ableToOpen = m->openInputFile(tryPath, in, "noerror");
+                                                       ifstream in2;
+                                                       ableToOpen = m->openInputFile(tryPath, in2, "noerror");
+                                                       in2.close();
                                                        fastafileNames[i] = tryPath;
                                                }
                                        }