-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader.h
78 lines (68 loc) · 1.8 KB
/
header.h
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// ******************************************************
// vcfCTools (c) 2011 Alistair Ward
// Marth Lab, Department of Biology, Boston College
// All rights reserved.
// ------------------------------------------------------
// Last modified: 18 February 2011
// ------------------------------------------------------
// Tools for manipulating the vcf header.
// ******************************************************
#ifndef HEADER_H
#define HEADER_H
#include <cstdlib>
#include <cstdio>
#include <iostream>
#include <fstream>
#include <string>
#include <stdlib.h>
#include <map>
#include <vector>
#include "split.h"
using namespace std;
namespace vcfCTools {
// Define header structures.
struct headerInfo {
bool success;
string description;
string number;
string type;
};
// Define the header class.
class vcfHeader {
public:
vcfHeader(void);
~vcfHeader(void);
void parseAdditionalInfo();
void parseAssembly();
void parseContig();
void parseFileFormat();
void parseHeader(istream*);
void parseInfo(unsigned int);
void parsePedigree();
void parsePedigreeDb();
void parseSample();
void parseTitles();
void writeHeader(ostream*, bool, string&);
public:
bool hasAssemblyInfo;
bool hasContigInfo;
bool hasPedigreeInfo;
bool hasPedigreeDbInfo;
bool hasSampleInfo;
unsigned int numberSamples;
string assembly;
string fileFormat;
string line;
string text;
map<string, string> altLine;
map<string, headerInfo> altFields;
map<string, string> infoLine;
map<string, headerInfo> infoFields;
map<string, string> filterLine;
map<string, headerInfo> filterFields;
map<string, string> formatLine;
map<string, headerInfo> formatFields;
vector<string> samples;
};
} // namespace vcfCTools
#endif // HEADER_H