]> git.donarmstrong.com Git - mothur.git/blobdiff - chimerarealigner.h
Revert to previous commit
[mothur.git] / chimerarealigner.h
diff --git a/chimerarealigner.h b/chimerarealigner.h
new file mode 100644 (file)
index 0000000..5809f42
--- /dev/null
@@ -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<string>);
+                               
+private:
+       void buildTemplateProfile(vector<string>);
+       void createAlignMatrix(int, int);
+       void fillAlignMatrix(string);
+       int calcMatchScore(bases, char);
+       string getNewAlignment(string);
+
+       int alignmentLength;
+       vector<bases> profile;
+       vector<vector<AlignCell> > alignMatrix;
+
+       MothurOut* m;
+};
+
+/***********************************************************/
+
+#endif
+