forked from sgusev/GERMLINE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChromosome.h
63 lines (45 loc) · 1.62 KB
/
Chromosome.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
// Chromosome.h.haplotyped markers for a chromosome
#ifndef CHROMOSOME_H
#define CHROMOSOME_H
#include "BasicDefinitions.h"
#include "MarkerSet.h"
#include <vector>
using namespace std;
class Chromosome
{
public:
// Chromosome(): default constructor
// Precondition: None.
// Postcondition: chromosome is empty. maxSets is 0.
Chromosome();
// getMarkerSet(): accessor for MarkerSet objects.
// Precondition: None.
// Postcondition: If index refers to an index for which memory has been
// allocated, then the MarkerSet at position index has been returned;
// otherwise a warning is printed and the default MarkerSet is returned.
MarkerSet* getMarkerSet();
MarkerSet* getMarkerSet(unsigned int);
// addMarkerSet(): adds a MarkerSet
// Precondition: None.
// Postcondition: If chromosome does not yet have maxSets MarkerSet objects,
// then ms is added to the end of chromosome; otherwise a warning is printed.
void addMarkerSet(MarkerSet * ms);
// addMarkers() : loads the entire marker data into a buffer chromosome
void addMarkers(list<bool>* markers);
void clear();
//void initialize();
void print(ostream& out,unsigned int,unsigned int);
void print_snps(ostream& out, unsigned int, unsigned int);
///////////////////////////////////////////////
void updateMarkerSet(unsigned int start, unsigned int end);
private:
// Storage for chromosome MarkerSet objects
vector<MarkerSet * > chromosome;
//List of marker bits
list<bool> buffer_chromosome;
///////////////////////////////////
//vector<MarkerSet * > init_chromosome;
};
ostream &operator<<(ostream &fout, Chromosome&);
#endif
// end Chromosome.h