forked from sgusev/GERMLINE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SNPPositionMap.h
45 lines (34 loc) · 1.04 KB
/
SNPPositionMap.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
// SNPPositionMap.h: Map from SNP IDs to positions in Info file
#ifndef SNPPOSITIONMAP_H
#define SNPPOSITIONMAP_H
#include <map>
#include <string>
using namespace std;
class SNPPositionMap
{
public:
// SNPPositionMap(): default constructor
// Precondition: None.
// Postcondition: None.
SNPPositionMap();
// retrievePosition(): retrieves position for a SNP ID
// Precondition: None.
// Postcondition: If SNPID is in snpPosMap, then the corresponding
// position from the infoFile has been returned; otherwise -1 has
// been returned.
int retrievePosition(string SNPID);
// storeMapping(): stores mapping from SNP ID to position
// Precondition: None.
// Postcondition: If position is positive, then SNPID has been associated
// with position; otherwise a warning has been printed.
void storeMapping(string SNPID, int position);
// sizeOfMap(): returns size of map
// Precondition: None.
// Postcondition: size of map is returned
int sizeOfMap();
private:
// actual map
map<string,int> snpPosMap;
};
#endif
// end SNPPositionMap.h