]> git.donarmstrong.com Git - mothur.git/blobdiff - filters.h
modifications to commands to add headers to list file.
[mothur.git] / filters.h
index 13607e78045a35a9a3ac00c675ba6c0b46995f42..b00cb35afb66aff2fbe2a132ccf4491b17b8cd35 100644 (file)
--- a/filters.h
+++ b/filters.h
@@ -19,7 +19,7 @@
 class Filters {
 
 public:
-       Filters() {};
+       Filters() { m = MothurOut::getInstance(); };
        ~Filters(){};
                
        string getFilter()                      {       return filter;          }
@@ -77,11 +77,13 @@ public:
 
        void doHard(string hard) {
                ifstream fileHandle;
-               openInputFile(hard, fileHandle);
+               m->openInputFile(hard, fileHandle);
        
                fileHandle >> filter;
        
                fileHandle.close();
+        
+        if (filter.length() != alignmentLength) {  m->mothurOut("[ERROR]: Sequences are not all the same length as the filter, please correct.\n");  m->control_pressed = true; }
        }
 
        void getFreqs(Sequence seq) {
@@ -102,6 +104,7 @@ protected:
        int alignmentLength, numSeqs;
        float soft;
        char trump;
+       MothurOut* m;
 
 };