forked from sgusev/GERMLINE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PolymorphicIndividualsExtractor.h
56 lines (45 loc) · 1.47 KB
/
PolymorphicIndividualsExtractor.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
// PolymorphicIndividualsExtractor.h: Abstract base class to extract individuals
// from various file formats
#ifndef POLYMORPHICINDIVIDUALSEXTRACTOR_H
#define POLYMORPHICINDIVIDUALSEXTRACTOR_H
#include "Individuals.h"
#include "SNPs.h"
#include <fstream>
#include <string>
#include <vector>
using namespace std;
class PolymorphicIndividualsExtractor
{
public:
// PolymorphicIndividualsExtractor(): default constructor
// Precondition: None.
// Postcondition: individualsP has been set to NULL,
// numberOfMarkers has been set to 0, and names for
// CSV files and INFO file have been been obtained from
// user.
// Note: snps is not yet populated because then there
// would be a delay before prompting for the input file
// which depends on the derived class for validation.
PolymorphicIndividualsExtractor();
// getInput(): virtual function to extract input
// Precondition: None.
// Postcondition: Input has been stored in the
// memory pointed to by inds
virtual void getInput() = 0;
virtual void loadInput() = 0;
virtual void getCompleteMarkerSet(Individual *) = 0;
virtual void getCompleteMarkerSet(Individual * , Individual *) = 0;
void setPhased(bool);
bool valid();
protected:
// pointer to individuals
Individuals* individualsP;
// number of markers per individual
int numberOfMarkers;
// stores weather or not the data is phased
bool phased;
// stores flag for valid input
bool valid_flag;
};
#endif
// end PolymorphicIndividualsExtractor.h