File: tabix.hpp

package info (click to toggle)
libtabixpp 1.1.0-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 384 kB
  • sloc: cpp: 194; makefile: 45; sh: 16
file content (40 lines) | stat: -rw-r--r-- 740 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include <string>
#include <stdlib.h>
#include <sys/stat.h>
#include "htslib/bgzf.h"
#include "htslib/tbx.h"
#include "htslib/kseq.h"
#include <iostream>
#include <cstring>
#include <vector>


using namespace std;

class Tabix {

    htsFile* fn;
    tbx_t* tbx;
    kstring_t str;
    hts_itr_t* iter;
    const tbx_conf_t *idxconf;
    int tid, beg, end;
    string firstline;
    bool has_jumped;
    vector<string>::iterator current_chrom;

public:
    string filename;
    vector<string> chroms;

    Tabix(void);
    Tabix(string& file);
    ~Tabix(void);

    const kstring_t * getKstringPtr();
    void getHeader(string& header);
    bool setRegion(string& region);
    bool getNextLine(string& line);
    bool getNextLineKS();

};