/* * db_construction.h * * Created on: 2016/8/31 * Author: Tsukasa Fukunaga */ #ifndef DB_CONSTRUCTION_H #define DB_CONSTRUCTION_H #include "db_construction_parameters.h" #include class DbConstruction { public: DbConstruction() {} void Run(const DbConstructionParameters parameters); private: void ReadFastaFile(const DbConstructionParameters parameters, vector &sequences); void CalculateAccessibility(const DbConstructionParameters parameters, vector &sequences); void ConstructSuffixArray(const DbConstructionParameters parameters, vector &sequences, vector &encoded_sequences, vector &suffix_array); void ConstructHashForShortSubstring(const DbConstructionParameters parameters, vector &encoded_sequences, vector &suffix_array, vector > &start_hash, vector > &end_hash); void Search(vector &encoded_sequences, vector &suffix_array, int* start, int* end, unsigned char c, int offset); void SaveBasicInformation(DbConstructionParameters parameters, vector &names); void SaveIndexData(string file_name, vector &suffix_array, vector > &start_hash, vector > &end_hash); void SaveSequenceData(string file_name, vector &sequences, vector &encoded_sequences); }; #endif