X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=filters.h;h=b00cb35afb66aff2fbe2a132ccf4491b17b8cd35;hb=6b32d112bb60e9f7eb6d4407a4eed4c49b67bced;hp=94f8d33c0329793f3e1c39c0ea0c467f53493357;hpb=17a6a53298a907c005fa93fb82af9e533adcda09;p=mothur.git diff --git a/filters.h b/filters.h index 94f8d33..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; } @@ -46,6 +46,14 @@ public: if(a[i] < threshold && t[i] < threshold && g[i] < threshold && c[i] < threshold){ filter[i] = 0; } } } + + void mergeFilter(string newFilter){ + for(int i=0;iopenInputFile(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) { @@ -94,6 +104,7 @@ protected: int alignmentLength, numSeqs; float soft; char trump; + MothurOut* m; };