X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=filters.h;h=b00cb35afb66aff2fbe2a132ccf4491b17b8cd35;hb=250e3b11b1c9c1e1ad458ab6c7e71ac2e67e11d9;hp=13607e78045a35a9a3ac00c675ba6c0b46995f42;hpb=94ba64671398f3c9e591df90536833123de0fd34;p=mothur.git diff --git a/filters.h b/filters.h index 13607e7..b00cb35 100644 --- 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; };