CAFE
Computational Analysis of gene Family Evolution
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
error_model.cpp File Reference
#include <cctype>
#include <algorithm>
#include <vector>
#include <sstream>
#include <cfloat>
#include <iomanip>
#include <fstream>
#include <iostream>
#include <cmath>
#include "error_model.h"
#include "cafe_commands.h"
#include "gene_family.h"
#include "cafe_shell.h"

Data Structures

struct  to_lower
 

Functions

int __check_error_model_columnsums (pErrorStruct errormodel)
 
void cafe_shell_free_errorstruct (pErrorStruct errormodel)
 
int cafe_shell_read_error_true_measure (const char *errorfile, const char *truefile, int **observed_pairs, int maxFamilySize)
 
double __loglikelihood_pairs_from_true_measure (double *parameters, void *args)
 
pErrorStruct cafe_shell_create_error_matrix_from_estimate (pErrorMeasure errormeasure)
 
bool case_insensitive_equal (std::string s1, std::string s2)
 
std::vector< std::string > split (std::string str, char delimiter)
 
pErrorStruct get_error_model (pCafeFamily family, std::string filename)
 
std::ostream & operator<< (std::ostream &ost, ErrorStruct &errormodel)
 
std::istream & operator>> (std::istream &ifst, ErrorStruct &errormodel)
 
void init_error_ptr (pCafeFamily family, pCafeTree pTree, pErrorStruct errormodel, std::string speciesname)
 
int set_error_matrix_from_file (pCafeFamily family, pCafeTree pTree, family_size_range &range, std::string filename, std::string speciesname)
 
int remove_error_model (pCafeFamily family, pCafeTree pcafe, std::string species_name)
 
void free_error_model (pCafeFamily family, pCafeTree pcafe)
 
void read_freq_from_measures (std::istream *ist1, std::istream *ist2, int *sizeFreq, int &maxFamilySize)
 
void read_error_double_measure (std::istream &ist1, std::istream &ist2, int **observed_pairs, int maxFamilySize)
 
double get_marginal_error_probability_epsilon (pErrorMeasure errormeasure, double *parameters)
 
double __loglikelihood_pairs_from_double_measure (double *parameters, void *args)
 
void get_size_probability_distribution (int maxFamilySize, int *sizeFreq, double *sizeDist)
 
pErrorMeasure estimate_error_double_measure (std::ostream &log, std::istream *ist1, std::istream *ist2, int b_symmetric, int max_diff, int b_peakzero, int max_FamilySize)
 
pErrorMeasure estimate_error_true_measure (std::ostream &log, const char *errorfile, const char *truefile, int b_symmetric, int max_diff, int b_peakzero, int max_family_size)
 

Function Documentation

int __check_error_model_columnsums ( pErrorStruct  errormodel)
double __loglikelihood_pairs_from_double_measure ( double *  parameters,
void *  args 
)
double __loglikelihood_pairs_from_true_measure ( double *  parameters,
void *  args 
)
pErrorStruct cafe_shell_create_error_matrix_from_estimate ( pErrorMeasure  errormeasure)
void cafe_shell_free_errorstruct ( pErrorStruct  errormodel)
int cafe_shell_read_error_true_measure ( const char *  errorfile,
const char *  truefile,
int **  observed_pairs,
int  maxFamilySize 
)
bool case_insensitive_equal ( std::string  s1,
std::string  s2 
)
pErrorMeasure estimate_error_double_measure ( std::ostream &  log,
std::istream *  ist1,
std::istream *  ist2,
int  b_symmetric,
int  max_diff,
int  b_peakzero,
int  max_FamilySize 
)
pErrorMeasure estimate_error_true_measure ( std::ostream &  log,
const char *  errorfile,
const char *  truefile,
int  b_symmetric,
int  max_diff,
int  b_peakzero,
int  max_family_size 
)
void free_error_model ( pCafeFamily  family,
pCafeTree  pcafe 
)
pErrorStruct get_error_model ( pCafeFamily  family,
std::string  filename 
)
double get_marginal_error_probability_epsilon ( pErrorMeasure  errormeasure,
double *  parameters 
)
void get_size_probability_distribution ( int  maxFamilySize,
int *  sizeFreq,
double *  sizeDist 
)
void init_error_ptr ( pCafeFamily  family,
pCafeTree  pTree,
pErrorStruct  errormodel,
std::string  speciesname 
)
std::ostream& operator<< ( std::ostream &  ost,
ErrorStruct errormodel 
)
std::istream& operator>> ( std::istream &  ifst,
ErrorStruct errormodel 
)
void read_error_double_measure ( std::istream &  ist1,
std::istream &  ist2,
int **  observed_pairs,
int  maxFamilySize 
)
void read_freq_from_measures ( std::istream *  ist1,
std::istream *  ist2,
int *  sizeFreq,
int &  maxFamilySize 
)
int remove_error_model ( pCafeFamily  family,
pCafeTree  pcafe,
std::string  species_name 
)
int set_error_matrix_from_file ( pCafeFamily  family,
pCafeTree  pTree,
family_size_range range,
std::string  filename,
std::string  speciesname 
)
std::vector<std::string> split ( std::string  str,
char  delimiter 
)