X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=chimerarealigner.h;fp=chimerarealigner.h;h=5809f42997381ab53ba5aaeb43a6c0d0b5cb6619;hb=0caf3fbabaa3ece404f8ce77f4c883dc5b1bf1dc;hp=0000000000000000000000000000000000000000;hpb=1b73ff67c83892a025e597dabd9df6fe7b58206a;p=mothur.git diff --git a/chimerarealigner.h b/chimerarealigner.h new file mode 100644 index 0000000..5809f42 --- /dev/null +++ b/chimerarealigner.h @@ -0,0 +1,59 @@ +#ifndef CHIMERAREALIGNER_H +#define CHIMERAREALIGNER_H + +/* + * chimerarealigner.h + * Mothur + * + * Created by westcott on 2/12/10. + * Copyright 2010 Schloss Lab. All rights reserved. + * + */ + +#include "chimera.h" +#include "alignment.hpp" + +/***********************************************************/ + +struct AlignCell { + int score; + char direction; + AlignCell() : score(0), direction('x') {}; +}; + +/***********************************************************/ + +struct bases { + int A, T, G, C, Gap, Chars; + bases() : A(0), T(0), G(0), C(0), Gap(0), Chars(0){}; +}; + +/***********************************************************/ + + +class ChimeraReAligner { + +public: + ChimeraReAligner(); + ~ChimeraReAligner(); + + void reAlign(Sequence*, vector); + +private: + void buildTemplateProfile(vector); + void createAlignMatrix(int, int); + void fillAlignMatrix(string); + int calcMatchScore(bases, char); + string getNewAlignment(string); + + int alignmentLength; + vector profile; + vector > alignMatrix; + + MothurOut* m; +}; + +/***********************************************************/ + +#endif +