-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstructure.h
60 lines (50 loc) · 1.8 KB
/
structure.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
/*
This header file contains the definitions of data structures.
1) A structure that stores the characteristics of each locus, i.e.
number of alleles and allele frequency spectrum.
2) A structure that stores the characteristics of each population, i.e.
sample size and allele frequency spectrum for each locus.
*/
#include <vector>
struct indiv_data // selection2
{
float intensity;
};
struct locus_data
{
int n; // total number of alleles in the sample = n_ij
int nA1; /* observed allele frequency spectrum = nA1_ij*/
float p; // estimated allele frequency = p_ij
double mean_p; // mean value of p so far (after pilots and burn-in)
struct indiv_data *indiv; // selection2
int ar; /*number of allelic classes = K_i*/
int alleleCount; // total number of alleles in the sample = n_ij
int *data_allele_count;//[max_nr_alleles]; /* observed allele frequency spectrum = a_ij*/
};
struct pop_data
{
locus_data *locus; // alleles count and freq
int group; // group index (between 1 and G)
};
struct group_locus_data
{
double p; // estimated allele frequency in group, array of size I (nb loci)
double mean_p; // mean value of p so far (after pilots and burn-in)
int ar; /*number of allelic classes = K_i*/
double *allele;//[max_nr_alleles]; // allele frequency
};
struct group_data
{
group_locus_data *locus;
std::vector<int> member; // vector of populations index member of the group
int pressure; // pressure index between 1 and P
};
struct pressure_data
{
std::vector<int> member; // vector of group index member sharing that pressure
};
struct allele_freq // for ancestral population
{
int ar; /*number of allelic classes = K_i*/
double *allele;//[max_nr_alleles]; // allele frequency
};