X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=maligner.h;fp=maligner.h;h=fc00e99faf3ad3931f76606c34ffb65b69eb4de7;hb=0caf3fbabaa3ece404f8ce77f4c883dc5b1bf1dc;hp=0000000000000000000000000000000000000000;hpb=1b73ff67c83892a025e597dabd9df6fe7b58206a;p=mothur.git diff --git a/maligner.h b/maligner.h new file mode 100644 index 0000000..fc00e99 --- /dev/null +++ b/maligner.h @@ -0,0 +1,59 @@ +#ifndef MALIGNER_H +#define MALIGNER_H +/* + * maligner.h + * Mothur + * + * Created by westcott on 9/23/09. + * Copyright 2009 Schloss Lab. All rights reserved. + * + */ + +#include "decalc.h" +#include "chimera.h" +#include "database.hpp" + +/***********************************************************************/ +//This class was modeled after the chimeraMaligner written by the Broad Institute +/**********************************************************************/ +class Maligner { + + public: + + Maligner(vector, int, int, float, int, int); //int, int, int, , string, Database*, Database* + ~Maligner() {}; + + string getResults(Sequence, DeCalculator); + float getPercentID() { return percentIdenticalQueryChimera; } + vector getOutput() { return outputResults; } + + + private: + Sequence query; + vector refSeqs; + vector db; + int minCoverage, minSimilarity, matchScore, misMatchPenalty; + float minDivR, percentIdenticalQueryChimera; + vector outputResults; + map spotMap; + vector unalignedMap; + vector minCoverageFilter(vector); //removes top matches that do not have minimum coverage with query. + int computeChimeraPenalty(); + vector verticalFilter(vector); + + vector< vector > buildScoreMatrix(int, int); + void fillScoreMatrix(vector >&, vector, int); + vector extractHighestPath(vector >); + vector mapTraceRegionsToAlignment(vector); + string constructChimericSeq(vector, vector); + string constructAntiChimericSeq(vector, vector); + float computePercentID(string, string); + string chimeraMaligner(int, DeCalculator); + MothurOut* m; + +}; + +/***********************************************************************/ + +#endif +