File: bcf_file.h

package info (click to toggle)
vcftools 0.1.12%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,680 kB
  • ctags: 1,215
  • sloc: cpp: 12,118; perl: 10,973; ansic: 1,467; pascal: 1,064; makefile: 67; php: 57; sh: 12
file content (48 lines) | stat: -rw-r--r-- 796 bytes parent folder | download | duplicates (6)
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
41
42
43
44
45
46
47
48
/*
 * vcf_file.h
 *
 *  Created on: Dec 11, 2012
 *      Author: amarcketta
 */

#ifndef BCF_FILE_H_
#define BCF_FILE_H_

#include "output_log.h"
#include "parameters.h"
#include "variant_file.h"
#include "bgzf.h"

extern output_log LOG;
using namespace std;

class bcf_file : public variant_file
{
public:
	bcf_file(const parameters &params, bool diff=false);

	void get_entry(vector<char> &out);
	entry* get_entry_object();

	void print(const parameters &params);
	void print_bcf(const parameters &params);

protected:
	~bcf_file();

private:
	bool is_BGZF;
	bool big_endian;
	bool stream;

	int read(void *buffer, unsigned int len, size_t size);
	void read_header();
	void read_file();
	void open();
	void open_gz();
	void close();
	bool eof();
	void check_bcf();
};

#endif /* BCF_FILE_H_ */