]> git.donarmstrong.com Git - mothur.git/blobdiff - suffixdb.hpp
added alignment code
[mothur.git] / suffixdb.hpp
diff --git a/suffixdb.hpp b/suffixdb.hpp
new file mode 100644 (file)
index 0000000..3d0b01d
--- /dev/null
@@ -0,0 +1,36 @@
+#ifndef SUFFIXDB_HPP
+#define SUFFIXDB_HPP
+
+/*
+ *  suffixdb.hpp
+ *  
+ *
+ *  Created by Pat Schloss on 12/16/08.
+ *  Copyright 2008 Patrick D. Schloss. All rights reserved.
+ *
+ *     This is a child class of the Database abstract datatype.  The class is basically a database of suffix trees and an
+ *     encapsulation of the method for finding the most similar tree to an inputted sequence.  the suffixForest objecct
+ *     is a vector of SuffixTrees, with each template sequence being represented by a different SuffixTree.  The class also
+ *     provides a method to take an unaligned sequence and find the closest sequence in the suffixForest.  The search
+ *     method is inspired by the article and Perl source code provided at http://www.ddj.com/web-development/184416093.  I 
+ *     would estimate that the time complexity is O(LN) for each search, which is slower than the kmer searching, but 
+ *     faster than blast
+ *
+ */
+
+#include "mothur.h"
+#include "database.hpp"
+
+class SuffixTree;
+
+class SuffixDB : public Database {
+       
+public:
+       SuffixDB(string);
+       Sequence* findClosestSequence(Sequence*);
+
+private:
+       vector<SuffixTree> suffixForest;
+};
+
+#endif