X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=filters.h;fp=filters.h;h=4c396070a911000018710a3b652f2f81439e1db7;hb=7e354c9abb09ea3cf5b500a16cc7f6dd79ccb6f5;hp=0000000000000000000000000000000000000000;hpb=92dde9a6d6c638fcbbd5dbaa5c79167564f90e49;p=mothur.git diff --git a/filters.h b/filters.h new file mode 100644 index 0000000..4c39607 --- /dev/null +++ b/filters.h @@ -0,0 +1,102 @@ +#ifndef FILTERS_H +#define FILTERS_H + +/* + * filters.h + * Mothur + * + * Created by Sarah Westcott on 6/29/09. + * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved. + * + */ + +#include "mothur.h" +#include "sequence.hpp" + + +/***********************************************************************/ + +class Filters { + +public: + Filters() {}; + ~Filters(){}; + + string getFilter() { return filter; } + void setFilter(string s) { filter = s; } + void setLength(int l) { alignmentLength = l; } + void setSoft(float s) { soft = s; } + void setTrump(float t) { trump = t; } + void setNumSeqs(int num) { numSeqs = num; } + + void initialize() { + a.assign(alignmentLength, 0); + t.assign(alignmentLength, 0); + g.assign(alignmentLength, 0); + c.assign(alignmentLength, 0); + gap.assign(alignmentLength, 0); + } + + void doSoft() { + int threshold = int (soft * numSeqs); + + for(int i=0;i> filter; + + fileHandle.close(); + } + + void getFreqs(Sequence seq) { + + string curAligned = seq.getAligned(); + + for(int j=0;j a, t, g, c, gap; + int alignmentLength, numSeqs; + float soft; + char trump; + +}; + +/***********************************************************************/ + +#endif +