Parallel PopGen Package
spectrum.h
Go to the documentation of this file.
1 
9 /*
10  * spectrum.h
11  *
12  * Author: David Lawrie
13  */
14 
15 #ifndef SPECTRUM_H_
16 #define SPECTRUM_H_
17 
18 #include "../3P/go_fish_data_struct.h"
19 
21 namespace Spectrum{
22 
24 struct SFS{
26  int * populations;
27  int * sample_size;
29  float num_sites;
30  float num_mutations;
32 
34  SFS();
36  ~SFS();
37 };
38 
40 void population_frequency_histogram(SFS & mySFS, const GO_Fish::allele_trajectories & all_results, const int sample_index, const int population_index, int cuda_device = -1);
41 
43 void site_frequency_spectrum(SFS & mySFS, const GO_Fish::allele_trajectories & all_results, const int sample_index, const int population_index, const int sample_size, int cuda_device = -1);
44 
45 } /*----- end namespace SPECTRUM ----- */
46 
47 #endif /* SPECTRUM_H_ */
float * frequency_spectrum
site frequency spectrum data structure
Definition: spectrum.h:25
control and output data structure for GO_Fish simulation
int sampled_generation
number of generations in the simulation at time of sampling
Definition: spectrum.h:31
site frequency spectrum data structure (at the moment, functions only generate SFS for a single popul...
Definition: spectrum.h:24
int * sample_size
number of samples taken for each population
Definition: spectrum.h:27
int * populations
which populations are in SFS
Definition: spectrum.h:26
Namespace for site frequency spectrum data structure and functions. (in prototype-phase) ...
Definition: spectrum.h:21
float num_sites
number of sites in SFS
Definition: spectrum.h:29
float num_mutations
number of segregating mutations in SFS
Definition: spectrum.h:30
void population_frequency_histogram(SFS &mySFS, const GO_Fish::allele_trajectories &all_results, const int sample_index, const int population_index, int cuda_device=-1)
create a frequency histogram of mutations at a single time point sample_index in a single population ...
Definition: spectrum.cu:153
void site_frequency_spectrum(SFS &mySFS, const GO_Fish::allele_trajectories &all_results, const int sample_index, const int population_index, const int sample_size, int cuda_device=-1)
create a single-population SFS of size sample_size from a single time point sample_index in a single ...
Definition: spectrum.cu:213
~SFS()
default destructor
Definition: spectrum.cu:150
SFS()
default constructor
Definition: spectrum.cu:149
int num_populations
number of populations in SFS
Definition: spectrum.h:28