|
mapgd
0.4
A program for the Maximum-likelihood analysis of population genomic data.
|
Population genotypes. More...
#include <population.h>


Public Member Functions | |
| Population () | |
| simple constructor. | |
| Population (const Sample_name &) | |
| constructor using sample names. More... | |
| Population (const std::vector< std::string > &) | |
| constructor needed by map_file. String should be coloumn names. | |
| Population (const Population &) | |
| constructor using a Population_Genotype | |
| ~Population () | |
| destructor. | |
| size_t | size () const |
| Returns the number of samples. More... | |
| void | add (const Genotype &likelihood) |
| append a sample to the likelihood. | |
| void | add (const float_t &lMM, const float_t &lMm, const float_t &lmm, const count_t &N) |
| append a sample to the likelihood. | |
| void | clear () |
| clear likelihoods. | |
| std::string | header (void) const |
| print header. | |
| const bool | get_binary () const |
| std::vector< std::string > | get_sample_names (void) const |
| void | set_sample_names (const std::vector< std::string > &sample_names) |
| names of the samples sequenced. | |
| Population & | operator= (const Population &) |
| names of the samples sequenced. More... | |
| void | write (std::ostream &) const |
| The write function must be defined in the child class. | |
| void | read (std::istream &) |
| The read function must be defined in the child class. | |
| const std::string | get_file_name () const |
| const std::string | get_table_name () const |
| void | write_binary (std::ostream &) const |
| void | read_binary (std::istream &) |
Public Member Functions inherited from Indexed_data | |
| void | write_pos (std::ostream &str) const |
| void | read_pos (std::istream &str) |
| Indexed_data (std::vector< std::string > &) | |
| id1_t | get_abs_pos (void) const |
| Indexed data needs to associate each datum with a position in the genome. | |
| void | set_abs_pos (const id1_t &) |
| Indexed data needs to associate each datum with a position in the genome. | |
| const bool | indexed () const |
Public Member Functions inherited from Data | |
| void | read_binary (std::istream &str) |
| void | write_binary (std::ostream &str) const |
| Data (std::vector< std::string > &) | |
| virtual const std::string | sql_header (void) const |
| Return the names of the columns, along with variable type. | |
| virtual const std::string | sql_column_names (void) const |
| Return the names of the columns. | |
| virtual const std::string | sql_values (void) const |
| Return the values to be placed in columns. | |
| virtual void | sql_read (std::istream &) |
| Reads the values... | |
Data Fields | |
| std::vector< Genotype > | likelihoods |
| Genotypic likelihood. | |
| gt_t | major |
| identity of the major allele | |
| gt_t | minor |
| identity of the minor allele | |
| float_t | m |
| minor allele frequency | |
| float_t | f |
| departure from HWE | |
Static Public Attributes | |
| static const std::string | table_name ="GENOTYPES" |
| destination table in Db. | |
| static const std::string | file_name =".gcf" |
| defualt file extention. | |
| static const bool | binary =true |
Static Public Attributes inherited from Data | |
| static const std::string | file_name =".txt" |
| The read function must be defined in the child class. More... | |
| static const std::string | table_name ="NONE" |
| The read function must be defined in the child class. More... | |
Static Private Member Functions | |
| static Data * | create (const std::vector< std::string > &Columns) |
Private Attributes | |
| std::vector< Genotype >::iterator | igl_ |
| an iterator to allow us to iterate over the likelihoods. | |
| std::vector< std::string > | sample_names_ |
| a vector of sample names. | |
Static Private Attributes | |
| static const Registration | registered =Registration(Population::table_name, Population::create) |
Additional Inherited Members | |
Static Public Member Functions inherited from Data | |
| static Data * | new_from_str (const std::string &, const std::vector< std::string > &) |
| Constructs an instance of the class Registered w/ string. | |
Protected Attributes inherited from Indexed_data | |
| id1_t | abs_pos_ |
Population genotypes.
| Population::Population | ( | const Sample_name & | names | ) |
constructor using sample names.
constuctor w/ initial values.
| Population & Population::operator= | ( | const Population & | rhs | ) |
names of the samples sequenced.
< a vector of sample names.
< genotypic likelihood
< an iterator to allow us to iterate over the likelihoods.
< identity of the major allele
< identity of the minor allele
< minor allele frequency
< minor allele frequency
< scaffold number
|
virtual |
Returns the number of samples.
return size of Population if Population is set, 0 otherwise
Reimplemented from Data.
1.8.6