Legofit
infers population history from nucleotide site patterns.
|
Functions for Composite Likelihood Information Criterion. More...
#include "branchtab.h"
#include "hessian.h"
#include "misc.h"
#include "strdblqueue.h"
#include <math.h>
#include <stdbool.h>
#include <ctype.h>
#include <errno.h>
Functions | |
static int | is_sitepat (const char *s) |
Return 1 if string begins with '#', then any number of whitespace characters, then "SitePat". More... | |
StrDblQueue * | StrDblQueue_push (StrDblQueue *self, const char *str, double val) |
StrDblQueue * | StrDblQueue_pop (StrDblQueue *self, StrDbl *strdbl) |
int | StrDblQueue_length (StrDblQueue *self) |
StrDblQueue * | StrDblQueue_free (StrDblQueue *self) |
void | StrDblQueue_print (const StrDblQueue *self, FILE *fp) |
int | StrDblQueue_compare (StrDblQueue *lhs, StrDblQueue *rhs) |
Compare the str fields in two StrDblQueue objects. More... | |
StrDblQueue * | StrDblQueue_parseLegofit (const char *fname, int freeonly) |
StrDblQueue * | StrDblQueue_parseSitePat (const char *fname) |
Parse a data file as produced either by sitepat, tabpat, legosim, or legofit. More... | |
void | StrDblQueue_normalize (StrDblQueue *self) |
double | StrDblQueue_msd (const StrDblQueue *a, const StrDblQueue *b) |
void | checkConsistency (const char *fname1, const char *fname2, StrDblQueue *q1, StrDblQueue *q2) |
void | make_covar_matrix (int nfiles, int npar, double array[nfiles][npar], gsl_matrix *cov) |
Functions for Composite Likelihood Information Criterion.
|
static |
Return 1 if string begins with '#', then any number of whitespace characters, then "SitePat".
Return 0 otherwise.
int StrDblQueue_compare | ( | StrDblQueue * | lhs, |
StrDblQueue * | rhs | ||
) |
Compare the str fields in two StrDblQueue objects.
Return -1, 0, or 1 if the lhs is less than, equal to, or greater than rhs.
StrDblQueue * StrDblQueue_parseSitePat | ( | const char * | fname | ) |
Parse a data file as produced either by sitepat, tabpat, legosim, or legofit.
Return an object of type StrDblQueue, which contains site pattern names and frequencies.