forked from sgusev/GERMLINE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Individuals.h
64 lines (51 loc) · 1.41 KB
/
Individuals.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
// Individuals.h: A collection of individuals
#ifndef INDIVIDUALS_H
#define INDIVIDUALS_H
#include "BasicDefinitions.h"
#include "Chromosome.h"
#include "Individual.h"
#include <set>
#include <ostream>
using namespace std;
class Individual;
class Individuals
{
public:
// Individuals(): default constructor
// Precondition: None.
// Postcondition: individuals is empty.
Individuals();
~Individuals();
// addIndividual(): adds an Individual object
// Precondition: None.
// Postcondition: ind has been added to individuals
void addIndividual( Individual * ind );
Individual * getIndividual ( size_t id ) { return pedigree[ id ]; }
bool more();
Individual* next();
void begin();
size_t size() { return pedigree.size(); }
void initialize();
void initializeOutputFileHandles(string chromosome);
void print( ostream& );
void freeMatches();
void freeMarkers();
void loadOldIndividuals(string f);
void loadNewIndividuals(string f);
bool isOld(string);
bool isNew(string);
bool hasRestrictions();
bool useEmbarkRFGermlineOutput;
string chromosome; // used for individual file handle outputs
string individualOutputFolder; // top level folder for individual outputs
private:
void permuteMarkerSet(Chromosome *, int, MarkerSet);
// stores the individuals
vector< Individual * > pedigree;
size_t iter;
long sets;
set<string> samples_to_compare_to;
set<string> new_samples;
};
#endif
// end Individuals.h