8 #include "sample_name.h"
15 std::vector <Genotype>::iterator
igl_;
18 static Data * create(
const std::vector <std::string> & Columns){
37 void add(
const float_t &lMM,
const float_t &lMm,
const float_t &lmm,
const count_t &N);
39 std::string
header(
void)
const;
43 static const bool binary;
44 const bool get_binary()
const;
46 inline std::vector <std::string> get_sample_names(
void)
const {
return sample_names_;};
54 void write (std::ostream&)
const;
55 void read (std::istream&);
60 void write_binary (std::ostream&)
const;
61 void read_binary (std::istream&);
size_t size() const
Returns the number of samples.
Definition: population.cc:39
void add(const Genotype &likelihood)
append a sample to the likelihood.
Population genotypes.
Definition: population.h:13
The name of a sample (i.e. what the user called it).
Definition: sample_name.h:16
Data which has an absolute position.
Definition: data.h:144
std::vector< Genotype > likelihoods
Genotypic likelihood.
Definition: population.h:23
Population()
simple constructor.
Definition: population.cc:26
std::vector< Genotype >::iterator igl_
an iterator to allow us to iterate over the likelihoods.
Definition: population.h:15
gt_t major
identity of the major allele
Definition: population.h:25
gt_t minor
identity of the minor allele
Definition: population.h:26
~Population()
destructor.
Definition: population.cc:35
std::string header(void) const
print header.
Definition: population.cc:60
float_t m
minor allele frequency
Definition: population.h:27
void set_sample_names(const std::vector< std::string > &sample_names)
names of the samples sequenced.
Definition: population.h:47
void write(std::ostream &) const
The write function must be defined in the child class.
Definition: population.cc:74
A class which registers a child of Data in Data::new_data_.
Definition: data.h:222
A class which can be written as flat text file or into an SQL database.
Definition: data.h:34
float_t f
departure from HWE
Definition: population.h:28
void clear()
clear likelihoods.
std::vector< std::string > sample_names_
a vector of sample names.
Definition: population.h:16
void read(std::istream &)
The read function must be defined in the child class.
Definition: population.cc:85
static const std::string file_name
defualt file extention.
Definition: population.h:42
Population & operator=(const Population &)
names of the samples sequenced.
Definition: population.cc:45
static const std::string table_name
destination table in Db.
Definition: population.h:41