3 #include "boost/multi_array.hpp"
5 #include "population.h"
10 typedef boost::multi_array<typeDNA, 2> array_type;
21 N = pop -> get_nbHuman();
22 nbXcell = pop->get_crumbMt();
24 assert(nbXcell*32 == nbS);
26 tab.resize(boost::extents[2][nbXcell]);
28 tab.resize(boost::extents[N][nbXcell]);
29 int nbFemale = pop -> get_nbFemale();
30 int currentG = pop -> get_generation();
32 for(
int i(0); i<N; ++i)
34 for(
int j(0) ;j<nbXcell ;++j)
37 tab[i][j] = pop -> female[currentG][i].mtDna[j];
39 tab[i][j] = pop -> male[currentG][i-nbFemale].mtDna[j];
46 DNA(typeDNA* input,
int size);
47 DNA(array_type
const & input,
int sizeN,
int sizeX);
48 DNA(std::vector< std::vector<typeDNA> > input);
51 friend std::ostream &operator<<(std::ostream&,
DNA const&);
52 friend DNA operator+(
DNA const&,
DNA const&);
61 double theta_hom()
const;
62 double theta_pi()
const;
69 double Neff(
double theta,
double mu)
const;
72 typeDNA
dist_two(
int a,
int b)
const;
73 void SFS(std::string filename)
const;
74 void SFS_DNA(std::string filename)
const;
81 std::ostream & print(std::ostream&)
const;
87 std::vector< std::vector<typeDNA> > input_fasta(std::string filename);
88 void output_diversity_headline(std::ofstream &);
89 void output_diversity_headline_with_time(std::ofstream &);
void SFS_DNA(std::string filename) const
Definition: genetics.cpp:731
void output_diversity(std::ofstream &) const
typeDNA dist_two(int a, int b) const
Definition: genetics.cpp:615
int get_nbXcell() const
Definition: genetics.cpp:277
std::vector< double > site_frequency(int site) const
Definition: genetics.cpp:470
Definition: population.h:14
std::vector< double > site_frequency_DNA(int site) const
Definition: genetics.cpp:701
DNA haplotypes() const
Definition: genetics.cpp:416
DNA(Population< T > *pop)
Definition: genetics.h:19
double heterozigosity_hap() const
Definition: genetics.cpp:519
int nb_of_haplotypes() const
Definition: genetics.cpp:347
double tajima_D() const
Definition: genetics.cpp:605
double heterozigosity_sites() const
Definition: genetics.cpp:538
void output_fasta(std::string filename) const
Definition: genetics.cpp:790
std::vector< double > hap_frequency() const
Definition: genetics.cpp:353
long poly_sites() const
Definition: genetics.cpp:287
void output_arlequin(std::string filename) const
Definition: genetics.cpp:756
double Neff(double theta, double mu) const
Definition: genetics.cpp:565
DNA & operator=(DNA const &)
Definition: genetics.cpp:247
double prop_poly_sites() const
Definition: genetics.cpp:306
double mean_pw_diff() const
Definition: genetics.cpp:313
Definition: genetics.h:13
int get_sizeMt() const
Definition: population.h:409
void SFS(std::string filename) const
Definition: genetics.cpp:687
double theta_waterson() const
Definition: genetics.cpp:570
void output_diversity_with_time(std::ofstream &, int Ntheo, int timeG) const
Definition: genetics.cpp:677
int get_nbS() const
Definition: genetics.cpp:282