forked from DiltheyLab/HLA-LA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
HaplotypePanel.h
46 lines (33 loc) · 1.17 KB
/
HaplotypePanel.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
/*
* HaplotypePanel.h
*
* Created on: 23.05.2011
* Author: Alexander Dilthey
*/
#ifndef HAPLOTYPEPANEL_H_
#define HAPLOTYPEPANEL_H_
#include <map>
#include <string>
#include <vector>
#include <string>
extern std::string haplotype_field_separator;
using namespace std;
class HaplotypePanel {
protected:
map<string, int> haplotypeID_cache;
public:
HaplotypePanel();
void readFromFile(string filename, string positions);
void writeToFile(string filename);
vector<string> getUnorderedLoci();
vector<string> HaplotypeIDs;
map<string, basic_string<unsigned char> > HaplotypesByLoci;
map<string, int> LocusPositions;
map<string, string> LocusStrands;
std::map<std::string, std::string> getAllHaplotypes();
basic_string<unsigned char> getIndividualHaplotype(const vector<string>& loci, string haplotypeID, bool pseudoTwoHaplotypes);
std::string getIndividualStringHaplotype(const vector<string>& loci, string haplotypeID, bool pseudoTwoHaplotypes);
std::vector<std::string> getOrderedLoci();
void addString(const std::vector<std::string>& loci, std::string ID, std::string haplotype);
};
#endif /* HAPLOTYPEPANEL_H_ */