/* * This is a C++ wrapper around tabix project which abstracts some of the details of opening and jumping in tabix-indexed files. * Author: Erik Garrison erik.garrison@gmail.com */ #ifndef _TABIX_HPP #define _TABIX_HPP #include #include #include #include #include #include #include #include #include using namespace std; class Tabix { htsFile* fn; tbx_t* tbx; hts_itr_t* iter; const tbx_conf_t *idxconf; int tid, beg, end; string firstline; bool has_jumped; vector::iterator current_chrom; public: string filename; vector chroms; Tabix(void); Tabix(string& file); ~Tabix(void); void getHeader(string& header); void getLastHeader(string & header); bool setRegion(string region); bool getNextLine(string& line); }; #endif