#ifndef __KRAKMAP_H__ #define __KRAKMAP_H__ #include // std::deque //#include // std::priority_queue #include "sparsepp/spp.h" #include "Taxa.h" class KrakMap { public: KrakMap(std::string& taxonomyTree_filename, std::string& refId2TaxId_filename, std::string pruneLevelIn, double filteringThresholdIn); bool classify(std::string& mapperOutput_filename); void serialize(std::string& output_filename); private: bool readHeader(std::ifstream& mfile); void loadMappingInfo(std::ifstream& mfile); void walk2theRoot(TaxaNode* child); void propagateInfo(); void assignRead(uint64_t readLen); void clearReadSubTree(); spp::sparse_hash_map taxaNodeMap; spp::sparse_hash_map refId2taxId; std::deque hits; std::set activeTaxa; Rank pruningLevel = Rank::SPECIES; uint64_t rootId = 1; double filteringThreshold = 0; spp::sparse_hash_map mappedReadCntr; uint64_t readCntr = 0; bool isPaired = true; }; #endif