StochHMM
v0.34
Flexible Hidden Markov Model C++ Library and Application
|
Classes | |
class | cell |
class | alignment |
class | Counter |
class | dynamic_bitset |
class | emm |
class | transitionFuncParam |
class | emissionFuncParam |
class | ExDefSequence |
class | ExDef |
class | weightDef |
class | model |
class | models |
class | Index |
class | lexicalTable |
Lexical table stores the log2 probabilities for both emissions and lexical transitions. More... | |
class | stencil |
class stencil: contains individial model template and keeps track of coordinates for replacement More... | |
class | templates |
class templates: contains a map of all templates More... | |
struct | opt_parameters |
class | opt_data |
Store the actual command line options data for each option defined by user. More... | |
class | options |
Parse, Store, and access commandline options data. More... | |
class | PWM |
class | matrixPosition |
struct | ppTrack |
class | seqTracks |
class | seqJob |
class | sequence |
class | sequences |
class | sequenceStream |
class | simpleTable |
class | sparseArray |
class | state |
struct | stateInfo |
Contains state information for quick reference between states information. More... | |
class | stochTable |
class | alt_simple_stochTable |
class | stringList |
Stringlist is an list of strings that contains parsed comments and can be used to split string or remove whitespace from a string. More... | |
struct | gff_feature |
class | traceback_path |
class | multiTraceback |
class | ambigCharacter |
Define the ambiguous characters symbol and index number for digitizing ambiguous characters in the sequence For example in DNA N = [ACGT] = [0,1,2,3]. More... | |
class | track |
class | tracks |
class | transition |
Transition information for each state. More... | |
class | nthScore |
class | nthTrace |
class | trellis |
class | StateFuncs |
(**Adding in log space) More... | |
class | TrackFuncs |
Stores pointer to user functions used to create Real Number Tracks. More... | |
class | weight |
weight class contains scaling factors for external scores More... | |
class | weights |
Typedefs | |
typedef std::vector < std::vector< double > > | mmMatrix |
typedef std::vector < std::vector< int > > | table |
typedef std::vector < std::vector< int > > | heatTable |
typedef std::vector < std::vector< int16_t > > | int_2D |
typedef std::vector < std::vector< float > > | float_2D |
typedef std::vector < std::vector< double > > | double_2D |
typedef std::vector < std::vector< long double > > | long_double_2D |
typedef std::vector < std::vector< std::vector < uint16_t > > > | int_3D |
typedef std::vector < std::vector< std::vector < float > > > | float_3D |
typedef std::vector < std::vector< std::vector < double > > > | double_3D |
typedef std::vector < std::vector< std::vector < long double > > > | long_double_3D |
typedef double(* | transitionFunc )(const std::string *, const size_t, const std::string *, const size_t) |
typedef double(* | emissionFunc )(const std::string *, const size_t) |
Pointer to emmission function Passed a string and position as size_t. | |
typedef double(* | pdfFunc )(const double, const std::vector< double > *) |
Pointer to Univariate Continuous Probability Density Function. | |
typedef double(* | multiPdfFunc )(const std::vector< double > *, const std::vector< double > *) |
typedef std::vector< double > *(* | pt2TrackFunc )(const std::string *) |
typedef double(* | pt2Attrib )(const std::string *) |
Enumerations | |
enum | tracebackDirection { NONE, DIAGONAL, LEFT, UP } |
enum | alignment_type { cGlobal, cLocal, cGlocal } |
enum | countType { GENERAL, PERIODIC, PWM, MASK, NONE } |
enum | optionType { UNDEF_OPT, OPT_NONE, OPT_INT, OPT_DOUBLE, OPT_STRING, OPT_FLAG } |
enum | SeqFileFormat { FASTA, FASTQ } |
Currently only FASTA and FASTQ formats are supported. More... | |
enum | SeqFilesType { SINGLE_TRACK, MULTI_TRACK } |
enum | transType { STANDARD, DURATION, LEXICAL } |
enum | tracebackIdentifier { DIFF_STATE, STATE_NAME, STATE_LABEL, STATE_GFF, START_INIT } |
enum | combineIdentifier { FULL, STATENAME, STATELABEL, STATEGFF } |
enum | trellisType { SIMPLE, STOCH, NTH } |
enum | decodingType { VITERBI, FORWARD, POSTERIOR } |
enum | trackType { UNDEFINED, ALPHA_NUM, REAL, EXTERNAL } |
enum | unknownCharScoringType { DEFINED_SCORE, AVERAGE_SCORE, LOWEST_SCORE, HIGHEST_SCORE, NO_SCORE } |
enum | valueType { PROBABILITY, LOG_ODDS, COUNTS, LOG_PROB, PERCENTAGE } |
Functions | |
std::string | intToBinString (uint32_t val) |
size_t | msb (uint32_t val) |
size_t | lowestBitSet (uint32_t x) |
int8_t | popCount (uint32_t val) |
uint32_t | maskLeft (uint32_t val, uint8_t pos) |
uint32_t | maskRight (uint32_t val, uint8_t pos) |
uint32_t | rol (uint32_t &val, uint8_t shift_register) |
uint32_t | ror (uint32_t &val, uint8_t shift_register) |
template<typename T > | |
T | rol (T val, uint8_t shift_register) |
Rotate Left with carry over. | |
template<typename T > | |
T | ror (T val, uint8_t shift_register) |
Rotate Right with carry over. | |
template<typename T > | |
T | lso (T &val, uint8_t n) |
template<typename T > | |
T | rso (T &val, uint8_t n) |
template<typename T > | |
T | lsoso (T &val, T &old_val, uint8_t n) |
template<typename T > | |
T | rsoso (T &val, T &old_val, uint8_t n) |
void | sBinomial (std::vector< double > &dist, int trials, double prob) |
void | cBinomial (std::vector< double > &dist, int trials, double prob) |
void | sBetaBinomial (std::vector< double > &dist, int trials, double a, double b) |
void | cBetaBinomial (std::vector< double > &dist, int trials, double a, double b) |
void | sDegenerate (std::vector< double > &dist, double value) |
void | cDegenerate (std::vector< double > &dist, double value) |
void | sUniform (std::vector< double > &dist, int lower, int upper) |
void | cUniform (std::vector< double > &dist, int lower, int upper) |
void | sHypergeometric (std::vector< double > &dist, int N, int m, int n) |
void | cHypergeometric (std::vector< double > &dist, int N, int m, int n) |
void | sCauchy (std::vector< double > &dist, double location, double scale) |
double | cChiSquared (double x, double df) |
void | sChiSquared (std::vector< double > &dist, double df) |
void | sExponential (std::vector< double > &dist, double lambda) |
void | cExponential (std::vector< double > &dist, double lambda) |
void | sFDistribution (std::vector< double > &dist, double dOne, double dTwo) |
void | cFDistribution (std::vector< double > &dist, double dOne, double dTwo) |
void | sGamma (std::vector< double > &dist, double shape, double scale) |
void | cGamma (std::vector< double > &dist, double shape, double scale) |
void | sGeometric (std::vector< double > &dist, double p) |
void | cGeometric (std::vector< double > &dist, double p) |
void | sLaplace (std::vector< double > &dist, double location, double scale) |
void | sLogNormal (std::vector< double > &dist, double location, double scale) |
void | sLogarithmic (std::vector< double > &dist, double prob) |
void | sLogistic (std::vector< double > &dist, double location, double scale) |
void | sMaxwellBoltzman (std::vector< double > &dist, double scale) |
void | sNegativeBinomial (std::vector< double > &dist, int r, double p) |
void | sNormal (std::vector< double > &dist, double mean, double stdev) |
void | sPareto (std::vector< double > &dist, double shape, double scale) |
void | sPoisson (std::vector< double > &dist, double lambda) |
void | sRayleigh (std::vector< double > &dist, double sigma) |
void | sTriangular (std::vector< double > &dist, int a, int b, int c) |
void | sUser (std::vector< double > &dist, std::vector< double > &prob_dist) |
void | sWeibull (std::vector< double > &dist, double shape, double scale) |
void | sExtremeValue (std::vector< double > &, double, double, double) |
void | sNonCentralF (std::vector< double > &, double, double, double) |
void | sNonCentralT (std::vector< double > &, double, double) |
std::ostream & | operator<< (std::ostream &output, const dynamic_bitset &bs) |
void | print_vec (std::vector< std::vector< double > > &) |
Print 2D vector to std::cout. | |
void | sort_scores (std::vector< nthScore > &nth_scores) |
Sort the viterbi scores in the nth trellis cells. | |
bool | _vec_sort (const nthScore &i, const nthScore &j) |
double | binomial_pdf (int k, int n, double p) |
double | beta_binomial_pdf (int k, int n, double a, double b) |
double | degenerate_pdf (double value, double k) |
double | discrete_uniform_pdf (int position, int a, int b) |
double | hypergeometric_pdf (int k, int n, int N, int m) |
double | poisson_binomial_pdf (size_t k, std::vector< double > &p) |
double | beta_negative_binomial_pdf (int k, int n, double a, double b) |
double | maxwell_boltzman_pdf (double x, double a) |
double | geometric_pdf (int k, double p) |
double | logarithmic_pdf (int k, double p) |
double | negative_binomial_pdf (int k, int r, double p) |
double | poisson_pdf (int k, double lambda) |
double | yule_simon_pdf (int k, double p) |
double | zipf_pdf (int k, int N, double s) |
double | zipf_mandelbrot_pdf (int k, int N, double s, double q) |
double | arcsine_pdf (double x) |
double | beta_pdf (double x, double a, double b) |
double | logit_normal_pdf (double x, double mu, double sigma) |
double | continuous_uniform_pdf (double x, double a, double b) |
double | kumaraswamy_pdf (double x, double a, double b) |
double | raised_cosine_pdf (double x, double mu, double s) |
double | triangular_pdf (double x, double a, double b, double c) |
double | truncated_normal_pdf (double x, double mu, double sd, double a, double b) |
double | u_quadratic_pdf (double x, double a, double b) |
double | wigner_semicircle_pdf (double x, double r) |
double | beta_prime_pdf (double x, double a, double b) |
double | chi_pdf (double x, double k) |
double | chi_squared_pdf (double x, double k) |
double | inverse_chi_squared_pdf (double x, double v) |
double | scaled_inverse_chi_squared_pdf (double x, double v, double sigma_sqrd) |
double | dagum_pdf (double x, double p, double a, double b) |
double | exponential_pdf (double x, double lambda) |
double | f_pdf (double x, double d1, double d2) |
double | fishers_z_pdf (double x, double d1, double d2) |
double | folded_normal_pdf (double x, double mu, double sigma_sqrd) |
double | frechet_pdf (double x, double alpha, double s, double m) |
double | gamma_pdf (double x, double alpha, double beta) |
double | inv_gamma_pdf (double x, double alpha, double beta) |
double | half_normal_pdf (double x, double sigma) |
double | inv_gaussian_pdf (double x, double mu, double lambda) |
double | levy_pdf (double x, double mu, double scale) |
double | log_cauchy_pdf (double x, double mu, double sigma) |
double | log_laplace_pdf (double x, double mu, double b) |
double | log_logistic_pdf (double x, double a, double b) |
double | log_normal_pdf (double x, double mu, double sigma_sqrd) |
double | pareto_pdf (double x, double alpha, double x_m) |
double | nakagami_pdf (double x, double mu, double w) |
double | rayleigh_pdf (double x, double sigma) |
double | gumbel_type_two_pdf (double x, double a, double b) |
double | weibull_distribution (double x, double lambda, double k) |
double | cauchy_pdf (double x, double x_o, double gamma) |
double | gumbel_pdf (double x, double mu, double beta) |
double | generalized_normal_pdf (double x, double mu, double alpha, double beta) |
double | hyperbolic_secant_pdf (double x) |
double | laplace_pdf (double x, double mu, double b) |
double | logistic_pdf (double x, double mu, double s) |
double | standard_normal_pdf (double x) |
double | normal_pdf (double x, double mu, double sigma) |
double | students_t_pdf (double x, double v) |
double | gumbel_type_one_pdf (double x, double a, double b) |
double | generalized_extreme_value_pdf (double x, double mu, double sigma, double xi) |
double | generalized_pareto_pdf (double x, double mu, double sigma, double xi) |
double | dirichlet_pdf (const std::vector< double > &x, const std::vector< double > &alpha) |
double | multivariate_ewens_pdf (const std::vector< double > &x, const double theta) |
double | binomial_pdf (int k, std::vector< double > param) |
double | poisson_binomial_pdf (int k, std::vector< double > &p) |
double | beta_pdf (double x, std::vector< double > param) |
double | binomial_pdf (const double k, const std::vector< double > *param) |
double | beta_binomial_pdf (const double k, const std::vector< double > *param) |
double | degenerate_pdf (const double value, const std::vector< double > *param) |
double | discrete_uniform_pdf (const double position, const std::vector< double > *param) |
double | hypergeometric_pdf (const double k, const std::vector< double > *param) |
double | beta_negative_binomial_pdf (const double k, const std::vector< double > *param) |
double | maxwell_boltzman_pdf (const double x, const std::vector< double > *param) |
double | geometric_pdf (const double k, const std::vector< double > *param) |
double | logarithmic_pdf (const double k, const std::vector< double > *param) |
double | negative_binomial_pdf (const double k, const std::vector< double > *param) |
double | poisson_pdf (const double k, const std::vector< double > *param) |
double | yule_simon_pdf (const double k, const std::vector< double > *param) |
double | zipf_pdf (const double k, const std::vector< double > *param) |
double | zipf_mandelbrot_pdf (const double k, const std::vector< double > *param) |
double | arcsine_pdf (const double x, const std::vector< double > *param) |
double | beta_pdf (const double x, const std::vector< double > *param) |
double | logit_normal_pdf (const double x, const std::vector< double > *param) |
double | continuous_uniform_pdf (const double x, const std::vector< double > *param) |
double | kumaraswamy_pdf (const double x, const std::vector< double > *param) |
double | raised_cosine_pdf (const double x, const std::vector< double > *param) |
double | triangular_pdf (const double x, const std::vector< double > *param) |
double | truncated_normal_pdf (const double x, const std::vector< double > *param) |
double | u_quadratic_pdf (const double x, const std::vector< double > *param) |
double | wigner_semicircle_pdf (const double x, const std::vector< double > *param) |
double | beta_prime_pdf (const double x, const std::vector< double > *param) |
double | chi_pdf (const double x, const std::vector< double > *param) |
double | chi_squared_pdf (const double x, const std::vector< double > *param) |
double | inverse_chi_squared_pdf (const double x, const std::vector< double > *param) |
double | scaled_inverse_chi_squared_pdf (const double x, const std::vector< double > *param) |
double | dagum_pdf (const double x, const std::vector< double > *param) |
double | exponential_pdf (const double x, const std::vector< double > *param) |
double | f_pdf (const double x, const std::vector< double > *param) |
double | fishers_z_pdf (const double x, const std::vector< double > *param) |
double | folded_normal_pdf (const double x, const std::vector< double > *param) |
double | frechet_pdf (const double x, const std::vector< double > *param) |
double | gamma_pdf (const double x, const std::vector< double > *param) |
double | inv_gamma_pdf (const double x, const std::vector< double > *param) |
double | half_normal_pdf (const double x, const std::vector< double > *param) |
double | inv_gaussian_pdf (const double x, const std::vector< double > *param) |
double | levy_pdf (const double x, const std::vector< double > *param) |
double | log_cauchy_pdf (const double x, const std::vector< double > *param) |
double | log_laplace_pdf (const double x, const std::vector< double > *param) |
double | log_logistic_pdf (const double x, const std::vector< double > *param) |
double | log_normal_pdf (const double x, const std::vector< double > *param) |
double | pareto_pdf (const double x, const std::vector< double > *param) |
double | nakagami_pdf (const double x, const std::vector< double > *param) |
double | rayleigh_pdf (const double x, const std::vector< double > *param) |
double | gumbel_type_two_pdf (const double x, const std::vector< double > *param) |
double | weibull_distribution (const double x, const std::vector< double > *param) |
double | cauchy_pdf (const double x, const std::vector< double > *param) |
double | gumbel_pdf (const double x, const std::vector< double > *param) |
double | generalized_normal_pdf (const double x, const std::vector< double > *param) |
double | hyperbolic_secant_pdf (const double x, const std::vector< double > *param) |
double | laplace_pdf (const double x, const std::vector< double > *param) |
double | logistic_pdf (const double x, const std::vector< double > *param) |
double | standard_normal_pdf (const double x, const std::vector< double > *param) |
double | normal_pdf (const double x, const std::vector< double > *param) |
double | students_t_pdf (const double x, const std::vector< double > *param) |
double | gumbel_type_one_pdf (const double x, const std::vector< double > *param) |
double | generalized_extreme_value_pdf (const double x, const std::vector< double > *param) |
double | generalized_pareto_pdf (const double x, const std::vector< double > *param) |
double | dirichlet_multi_pdf (const std::vector< double > *x, const std::vector< double > *param) |
double | ewens_multi_pdf (const std::vector< double > *x, const std::vector< double > *param) |
sequence | random_sequence (std::vector< double > &freq, size_t length, track *tr) |
template<class T > | |
T | min (std::vector< T > &set) |
template<class T > | |
T | max (std::vector< T > &set) |
template<class T > | |
T | construct_histogram (std::vector< T > &set, int N_bins) |
template<class T > | |
T | smooth_histogram (std::vector< T > histo, int intervals, int window_size, int iterations) |
float | entropy (std::vector< float > &set) |
Shannon's Entropy in log(2) space. | |
float | rel_entropy (std::vector< float > &set, std::vector< float > &set2) |
double | _integrate (double(*funct)(double, std::vector< double >), double upper, double lower, std::vector< double > param) |
double | integrate (double(*funct)(double, std::vector< double >), double lower, double upper, std::vector< double > param, double max_error=0.001, double sum=0) |
double | simpson (double(*funct)(double, double, double), double alpha, double beta, double lower, double upper) |
double | adapt_simpson (double(*funct)(double, double, double), double alpha, double beta, double lower, double upper, double max_error, double sum) |
float | discrete_uniform_cdf (int a, int b, int position) |
float | bin_coef (int n, int k) |
float | binomial_pdf (int k, int n, float p) |
float | binomial_pdf (int k, std::vector< float > param) |
float | binomial_cdf (int k, int n, float p) |
double | hypergeometric_cdf (int n, int N, int m, int k) |
double | gamma_func (double x) |
double | gamma_pdf (double x, std::vector< double > param) |
double | gamma_cdf (double x, double alpha, double beta) |
double | chi2_pdf (double x, double df) |
double | chi2_cdf (double x, double df) |
double | beta_cdf (double x, double alpha, double beta) |
double | expon_pdf (double x, double beta) |
double | expon_cdf (double x, double beta) |
float | summation (float(*funct)(int, std::vector< float >), int lower, int upper, std::vector< float > param) |
double | multinomial_pdf (std::vector< int > r, int n, std::vector< double > p) |
double | _low_igamma (double x, std::vector< double > param) |
double | low_igamma (double x, double alpha) |
double | upper_igamma (double x, double alpha) |
double | erf (double x) |
double | std_normal_cdf (double x) |
double | binomial_cdf (double) |
double | hypergeometric_cdf (double) |
double | poisson_binomial_cdf (double) |
double | degenerate_distribution (double) |
double | beta_binomial_cdf (double) |
double | boltzman_cdf (double) |
double | extended_negative_binomial_cdf (double) |
double | geometric_cdf (double) |
double | logarithmic_cdf (double) |
double | negative_binomial_cdf (double) |
double | parabolic_fractal_cdf (double) |
double | poisson_cdf (double) |
double | skellam_cdf (double) |
double | yule_simon_cdf (double) |
double | zeta (double) |
float | continuous_uniform_cdf (float, float, float) |
double | beta_prime_cdf (double) |
double | chi_cdf (double) |
double | noncentral_chi_cdf (double) |
double | chi_square_cdf (double) |
double | exponential_cdf (double) |
double | F_cdf (double) |
double | gamma_cdf (double) |
double | fisher_z_cdf (double) |
double | folded_normal_distribution (double) |
double | half_normal_distribution (double) |
double | hotelling_t_square_cdf (double) |
double | inverse_gaussian_cdf (double) |
double | log_logistic_cdf (double) |
double | log_normal_cdf (double) |
double | pareto_cdf (double) |
template<class T > | |
T | smooth_histogram (std::vector< T > &, int, int, int) |
double | simpson (double(*funct)(double, std::vector< double >), double alpha, double beta, double lower, double upper) |
void | generateUnknownIndices (std::vector< size_t > &results, size_t alphabetSize, size_t order, size_t value) |
double | interpolate (std::pair< double, double > &a, std::pair< double, double > &b, double &cx) |
Interpolates the y value given cx and two surrounding points on either side a and b. | |
double | extrapolate (std::pair< double, double > &a, std::pair< double, double > &b, double &cx) |
Extrapolates the Y value of point given by cx and two previous points. | |
double | entropy (std::vector< double > &set) |
double | rel_entropy (std::vector< double > &set, std::vector< double > &set2) |
double | _integrate (double(*funct)(double, std::vector< double > &), double upper, double lower, std::vector< double > ¶m) |
double | integrate (double(*funct)(double, std::vector< double > &), double lower, double upper, std::vector< double > ¶m, double max_error=0.000001, double sum=0) |
double | summation (double(*funct)(int, std::vector< double >), int lower, int upper, std::vector< double > param) |
double | igamma_upper (double s, double x) |
double | igamma_lower (double a, double x) |
http://wwwC/.rskey.org/CMS/index.php/the-library/11 | |
double | rgammap (double s, double x) |
double | rgammaq (double s, double x) |
double | beta (double a, double b) |
double | ibeta (double x, double a, double b) |
float | betaPDF (float x, float a, float b) |
double | ribeta (double x, double a, double b) |
double | factorial (double x) |
double | bin_coef (double n, double r) |
template<typename T > | |
T | integerPower (T base, T exponent) |
template<typename T > | |
T | addLog (T first, T second) |
template<typename T > | |
void | addVectorCombinatorial (std::vector< T > &result, std::vector< T > &lhs, std::vector< T > &rhs) |
template<typename T > | |
void | multiplyVectorCombinatorial (std::vector< T > &result, std::vector< T > &lhs, std::vector< T > &rhs) |
template<typename T > | |
void | addValueToVector (std::vector< T > &vec, T value) |
template<typename T > | |
void | multiplyValueToVector (std::vector< T > &vec, T value) |
template<typename T > | |
void | divideValueToVector (std::vector< T > &vec, T value) |
template<class T > | |
T | sumVector (std::vector< T > &data) |
Sum the vector and return the sum. | |
template<class T > | |
T | sumVector (const std::vector< T > &data) |
template<class T > | |
T | productVector (std::vector< T > &data) |
Multiply terms in vector and return the product. | |
template<typename T > | |
T | minVector (std::vector< T > &data) |
template<typename T > | |
T | maxVector (std::vector< T > &data) |
template<typename T > | |
T | avgVector (std::vector< T > &data) |
template<typename T > | |
void | logVector (std::vector< T > &data) |
template<typename T > | |
void | expVector (std::vector< T > &data) |
template<typename T > | |
T | avgLogVector (std::vector< T > &data) |
template<typename T > | |
void | probVector (std::vector< T > &data) |
template<typename T > | |
void | addVector (std::vector< T > &lhs, std::vector< T > &rhs) |
template<typename T > | |
void | logProbVector (std::vector< T > &data) |
double | simpson (double(*funct)(double, std::vector< double > &), double alpha, double beta, double lower, double upper) |
double | summation (double(*funct)(int, std::vector< double > &), int, int, std::vector< double > &) |
double | _igamma_lower (double, std::vector< double > &) |
double | _ibeta (double, std::vector< double > &) |
double | logit (double x) |
std::string | parseComment (std::string &txt, char commentChar) |
Find first comment character and then return everything following the character. | |
void | clear_whitespace (std::string &input, std::string white) |
void | removeLeadingWS (std::string &txt, const std::string &ws) |
void | getKeyValue (std::string &txt, std::string &key, std::string &value) |
stringList & | splitString (const std::string &txt, const std::string &delimiters) |
Splits string using delimiters and return stringList. | |
void | replaceChar (std::string &txt, char ch, char replaceCh) |
std::string | join (std::vector< int > &input, char c) |
std::string | join (std::vector< size_t > &input, char c) |
std::string | int_to_string (int input) |
std::string | int_to_string (size_t input) |
std::string | double_to_string (double input) |
std::string | double_to_string (float input) |
bool | stringToInt (std::string &txt, int &val) |
bool | stringToInt (std::string &txt, size_t &val) |
bool | stringToDouble (std::string &txt, double &val) |
std::string | join (std::vector< short > &input, char c) |
std::string | join (std::vector< double > &input, char c) |
std::string | join (std::vector< std::string > &input, char c) |
void | split_line (std::vector< std::string > &line, std::string &input) |
stringList | extractTag (std::string &txt) |
std::pair< size_t, size_t > | balanced_brackets (const std::string &text, const std::string &brackets, size_t offset) |
std::pair< size_t, size_t > | balanced_brackets (const std::string &text, const std::string &brackets) |
bool | isNumeric (const std::string &str) |
std::string | slurpFile (std::string &file) |
bool | sortTBVec (std::map< traceback_path, int >::iterator lhs, std::map< traceback_path, int >::iterator rhs) |
bool | compXval (const std::pair< double, double > &a, const std::pair< double, double > &b) |
Variables | |
bool | quiet |
int | maximum = 1000000 |
const uint32_t | POWER [32][128] |
int | WID = 80 |
typedef std::vector<std::vector<double> > StochHMM::double_2D |
typedef std::vector<std::vector<std::vector<double> > > StochHMM::double_3D |
typedef double(* StochHMM::emissionFunc)(const std::string *, const size_t) |
Pointer to emmission function Passed a string and position as size_t.
emissionFunc
Definition at line 46 of file userFunctions.h.
typedef std::vector<std::vector<float> > StochHMM::float_2D |
typedef std::vector<std::vector<std::vector<float> > > StochHMM::float_3D |
typedef std::vector<std::vector<int> > StochHMM::heatTable |
Definition at line 165 of file traceback_path.h.
typedef std::vector<std::vector<int16_t> > StochHMM::int_2D |
typedef std::vector<std::vector<std::vector<uint16_t> > > StochHMM::int_3D |
typedef std::vector<std::vector<long double> > StochHMM::long_double_2D |
typedef std::vector<std::vector<std::vector<long double> > > StochHMM::long_double_3D |
typedef std::vector<std::vector<double> > StochHMM::mmMatrix |
Definition at line 44 of file alignment.h.
StochHMM::multiPdfFunc |
Pointer to function that takes reference to array (variables) and pointer to vector that contains multivariate function paramenters.
Definition at line 57 of file userFunctions.h.
StochHMM::pdfFunc |
Pointer to Univariate Continuous Probability Density Function.
[in] | double | Given value |
[in] | std::vector<double>* | Paramenters for PDF |
Definition at line 52 of file userFunctions.h.
typedef double(* StochHMM::pt2Attrib)(const std::string *) |
Definition at line 64 of file userFunctions.h.
typedef std::vector<double>*(* StochHMM::pt2TrackFunc)(const std::string *) |
Definition at line 61 of file userFunctions.h.
typedef std::vector<std::vector<int> > StochHMM::table |
typedef double(* StochHMM::transitionFunc)(const std::string *, const size_t, const std::string *, const size_t) |
Definition at line 41 of file userFunctions.h.
Definition at line 25 of file alignment.h.
enum combineIdentifier { FULL , STATENAME , STATELABEL , STATEGFF}; *Describes how a traceback will be processed Types of Combine Identifiers FULL = No traceback editing will occur STATENAME = Edit out all the states that aren't of given State Name STATELABEL= Edit out all the states that aren't of given State Label STATEGFF = Edit out all the states that aren't of given GFF Tag
Definition at line 62 of file stochTypes.h.
enum StochHMM::countType |
{VITERBI, POSTERIOR}; *Type of decoding to perform. VITERBI = Traceback performed using viterbi value FORWARD = Traceback performed using stochastic forward value POSTERIOR = Traceback performed using posterior value
Definition at line 78 of file stochTypes.h.
enum StochHMM::optionType |
Currently only FASTA and FASTQ formats are supported.
*File format of the sequences
Definition at line 60 of file seqTracks.h.
SINGLE means that only a single sequence is required (using single track) *MULTI means that multiple sequences are required from multiple tracks
*Sequence files have single track or multiple track sequences per file
Definition at line 66 of file seqTracks.h.
{ DIFF_STATE , STATE_NAME , STATE_LABEL , STATE_GFF , START_INIT }; Traceback identifier describe how stochHMM will traceback when using duration dependent distributions Types of Tracebacks DIFF_STATE = Traceback current state until a different state is encountered STATE_NAME = Traceback until STATE_NAME changes from current state, essentially the same as DIFF_STATE STATE_LABEL = Traceback until a State with a different label is encountered STATE_GFF = Traceback until a State witha a different GFF tag is encountered START_INIT = Traceback until the start of the sequence
Definition at line 52 of file stochTypes.h.
enum StochHMM::trackType |
enum StochHMM::transType |
Definition at line 41 of file stochTypes.h.
{SIMPLE, STOCH, NTH}; *Defines what type of trellis cells to use *Types of trellis SIMPLE = Trellis will only contain single viterbi, forward, and backward values STOCH = Trellis will contain multiple viterbi,forward,backward values and traceback probabilities for stochastic tracebacks NTH = Trellis will contain N viterbi values for top N tracebacks
Definition at line 71 of file stochTypes.h.
enum unknownCharScoringType { DEFINED_SCORE, AVERAGE_SCORE, LOWEST_SCORE, HIGHEST_SCORE, NO_SCORE}; How to score unknown or ambiguous characters when encountered in emission or transition Scoring types: DEFINED_SCORE = user-defined score AVERAGE_SCORE = average of all possible scores LOWEST_SCORE = lowest of the possible scores HIGHEST_SCORE = highest of the possible scores NO_SCORE = No score will be defined (Produces error if unknown alphabet encountered)
Definition at line 99 of file stochTypes.h.
enum StochHMM::valueType |
Value types that are provided by user *PROBABILITY = basic probability between [0,1] *LOG_ODDS = log odds score *COUNTS = word counts *LOG_PROG = log2 value of probability *PERCENTAGE = [0,100] or 100*Probability
Definition at line 109 of file stochTypes.h.
double StochHMM::_ibeta | ( | double | , |
std::vector< double > & | |||
) |
double StochHMM::_igamma_lower | ( | double | , |
std::vector< double > & | |||
) |
double StochHMM::_integrate | ( | double(*)(double, std::vector< double > &) | funct, |
double | upper, | ||
double | lower, | ||
std::vector< double > & | param | ||
) |
Definition at line 107 of file stochMath.cpp.
double StochHMM::_integrate | ( | double(*)(double, std::vector< double >) | funct, |
double | upper, | ||
double | lower, | ||
std::vector< double > | param | ||
) |
Definition at line 116 of file statistics.cpp.
Referenced by integrate().
double StochHMM::_low_igamma | ( | double | x, |
std::vector< double > | param | ||
) |
Definition at line 338 of file statistics.cpp.
Referenced by low_igamma().
bool StochHMM::_vec_sort | ( | const nthScore & | i, |
const nthScore & | j | ||
) |
Definition at line 23 of file nth_best.cpp.
References StochHMM::nthScore::score.
Referenced by sort_scores().
double StochHMM::adapt_simpson | ( | double(*)(double, double, double) | funct, |
double | alpha, | ||
double | beta, | ||
double | lower, | ||
double | upper, | ||
double | max_error, | ||
double | sum | ||
) |
Definition at line 141 of file statistics.cpp.
References simpson().
T StochHMM::addLog | ( | T | first, |
T | second | ||
) |
Takes two logd values and adds them together
first | log'd Double value |
second | log'd Double value |
Definition at line 179 of file stochMath.h.
Referenced by StochHMM::stochTable::finalize(), StochHMM::alt_simple_stochTable::finalize(), StochHMM::trellis::naive_backward(), StochHMM::trellis::naive_baum_welch(), StochHMM::trellis::naive_forward(), StochHMM::trellis::naive_stochastic_forward(), StochHMM::trellis::simple_backward(), StochHMM::trellis::simple_forward(), StochHMM::trellis::simple_posterior(), StochHMM::trellis::simple_stochastic_forward(), and StochHMM::trellis::update_transitions().
void StochHMM::addValueToVector | ( | std::vector< T > & | vec, |
T | value | ||
) |
Definition at line 272 of file stochMath.h.
Referenced by StochHMM::Index::operator+(), and StochHMM::Index::operator+=().
void StochHMM::addVector | ( | std::vector< T > & | lhs, |
std::vector< T > & | rhs | ||
) |
Definition at line 434 of file stochMath.h.
void StochHMM::addVectorCombinatorial | ( | std::vector< T > & | result, |
std::vector< T > & | lhs, | ||
std::vector< T > & | rhs | ||
) |
Definition at line 209 of file stochMath.h.
Referenced by StochHMM::Index::operator+(), and StochHMM::Index::operator+=().
T StochHMM::avgLogVector | ( | std::vector< T > & | data | ) |
Definition at line 409 of file stochMath.h.
References expVector(), and sumVector().
T StochHMM::avgVector | ( | std::vector< T > & | data | ) |
Definition at line 375 of file stochMath.h.
References sumVector().
std::pair< size_t, size_t > StochHMM::balanced_brackets | ( | const std::string & | text, |
const std::string & | brackets, | ||
size_t | offset | ||
) |
Returns a pair of size_t values that describe the coordinates of between brackets
text | String to use to search for brackets |
brackets | String of length two containing opening and closing bracket |
offset | Offset of where to start searching for balanced brackets |
Definition at line 758 of file text.cpp.
Referenced by balanced_brackets(), and extractTag().
std::pair< size_t, size_t > StochHMM::balanced_brackets | ( | const std::string & | text, |
const std::string & | brackets | ||
) |
Returns a pair of size_t values that describe the coordinates of between brackets from start of the string
text | String to use to search for brackets |
brackets | String of length two containing opening and closing bracket |
Definition at line 800 of file text.cpp.
References balanced_brackets().
double StochHMM::beta | ( | double | a, |
double | b | ||
) |
Definition at line 192 of file stochMath.cpp.
Referenced by beta_binomial_pdf(), beta_cdf(), beta_prime_pdf(), betaPDF(), cBetaBinomial(), f_pdf(), fishers_z_pdf(), gamma_cdf(), ribeta(), sBetaBinomial(), truncated_normal_pdf(), u_quadratic_pdf(), and yule_simon_pdf().
double StochHMM::beta_binomial_cdf | ( | double | ) |
double StochHMM::beta_cdf | ( | double | x, |
double | alpha, | ||
double | beta | ||
) |
Definition at line 284 of file statistics.cpp.
References beta(), beta_pdf(), and integrate().
Referenced by truncated_normal_pdf().
double StochHMM::beta_prime_cdf | ( | double | ) |
float StochHMM::betaPDF | ( | float | x, |
float | a, | ||
float | b | ||
) |
Beta probability distribution function *param x Value 0<x<1 *param a Shape parameter a>0 *param b Shape parameter b>0
Definition at line 207 of file stochMath.cpp.
References beta().
Referenced by beta_pdf(), and ibeta().
int StochHMM::bin_coef | ( | int | n, |
int | k | ||
) |
Binomial coefficient *number of combinations possible given k unordered outcomes from n possibilities *param n number of items *param k number in set
Definition at line 181 of file statistics.cpp.
Referenced by beta_binomial_pdf(), beta_negative_binomial_pdf(), binomial_pdf(), cBetaBinomial(), cBinomial(), cHypergeometric(), hypergeometric_cdf(), hypergeometric_pdf(), negative_binomial_pdf(), sBetaBinomial(), sBinomial(), and sHypergeometric().
double StochHMM::bin_coef | ( | double | n, |
double | r | ||
) |
Definition at line 242 of file stochMath.cpp.
double StochHMM::binomial_cdf | ( | double | ) |
float StochHMM::binomial_cdf | ( | int | k, |
int | n, | ||
float | p | ||
) |
Binomial Cumulative Distribution Function *param k Number of successes *param n Number of trials *param p Probability of success *If we can get an incomplete beta function. We can update this function and
Definition at line 210 of file statistics.cpp.
References binomial_pdf(), and summation().
float StochHMM::binomial_pdf | ( | int | k, |
int | n, | ||
float | p | ||
) |
Binomial probability mass function *param k Number of successes *param n Number of trials *param p Probability of success
Definition at line 192 of file statistics.cpp.
References bin_coef().
float StochHMM::binomial_pdf | ( | int | k, |
std::vector< float > | param | ||
) |
Binomial probaility mass function *param k Number of successes *param param std::vector<float> (n=number of trials, p=probability of success)
Definition at line 199 of file statistics.cpp.
References binomial_pdf().
double StochHMM::boltzman_cdf | ( | double | ) |
void StochHMM::cBetaBinomial | ( | std::vector< double > & | dist, |
int | trials, | ||
double | a, | ||
double | b | ||
) |
BetaBinomial Cumulative Distribution *a href = "http://en.wikipedia.org/wiki/Beta-binomial_model">
[out] | dist | |
trials | Number of trials | |
a | alpha | |
b | beta |
Definition at line 101 of file distributions.cpp.
References beta(), bin_coef(), and maximum.
void StochHMM::cBinomial | ( | std::vector< double > & | dist, |
int | trials, | ||
double | prob | ||
) |
Binomial Cumulative Distribution
[out] | dist | |
trials | Number of trials in experiment | |
prob | Probability of success |
Definition at line 48 of file distributions.cpp.
References bin_coef(), and maximum.
double StochHMM::cChiSquared | ( | double | x, |
double | df | ||
) |
CDF of Chi-Squared Distribution
x | Chi-Square Value |
df | Degrees of freedom |
Definition at line 252 of file distributions.cpp.
References igamma_lower().
void StochHMM::cDegenerate | ( | std::vector< double > & | dist, |
double | value | ||
) |
Degenerate Cumulative Distribution *Support consists of only one value
[out] | dist | |
value | *a href = "http://en.wikipedia.org/wiki/Degenerate_distribution"> |
Definition at line 141 of file distributions.cpp.
void StochHMM::cExponential | ( | std::vector< double > & | dist, |
double | lambda | ||
) |
CDF Exponential Distribution
[out] | dist | |
lambda | Value of lambda to use *a href = "http://en.wikipedia.org/wiki/Exponential_distribution"> |
Definition at line 309 of file distributions.cpp.
References maximum.
void StochHMM::cFDistribution | ( | std::vector< double > & | dist, |
double | dOne, | ||
double | dTwo | ||
) |
Definition at line 372 of file distributions.cpp.
void StochHMM::cGamma | ( | std::vector< double > & | dist, |
double | shape, | ||
double | scale | ||
) |
Definition at line 407 of file distributions.cpp.
References igamma_lower(), and maximum.
void StochHMM::cGeometric | ( | std::vector< double > & | dist, |
double | p | ||
) |
Definition at line 438 of file distributions.cpp.
References maximum.
double StochHMM::chi2_cdf | ( | double | x, |
double | df | ||
) |
Definition at line 272 of file statistics.cpp.
References gamma_cdf().
double StochHMM::chi2_pdf | ( | double | x, |
double | df | ||
) |
Definition at line 268 of file statistics.cpp.
References gamma_pdf().
double StochHMM::chi_cdf | ( | double | ) |
double StochHMM::chi_square_cdf | ( | double | ) |
void StochHMM::cHypergeometric | ( | std::vector< double > & | dist, |
int | N, | ||
int | m, | ||
int | n | ||
) |
CDF Hypergeometric Distribution
[out] | dist | |
N | Population Size | |
m | Number of successes | |
n | Number of draws |
Definition at line 212 of file distributions.cpp.
References bin_coef(), and maximum.
void StochHMM::clear_whitespace | ( | std::string & | input, |
std::string | white | ||
) |
Given a string, and a white space character, it will remove all the whitespace characters from the string
input | String to remove whitespace from |
white | String of whitespace characters to remove |
Definition at line 435 of file text.cpp.
Referenced by StochHMM::sequence::_digitize(), StochHMM::PWM::_getOrderedPositionNames(), StochHMM::model::_getOrderedStateNames(), StochHMM::state::_parseHeader(), StochHMM::PWM::_parseSpacer(), StochHMM::state::_parseTransition(), StochHMM::model::_processTemplateState(), StochHMM::track::_splitAmbiguousList(), StochHMM::PWM::_splitPositions(), StochHMM::model::_splitStates(), StochHMM::sequence::getMaskedFasta(), StochHMM::matrixPosition::parse(), StochHMM::weight::parse(), and StochHMM::stringList::processString().
bool StochHMM::compXval | ( | const std::pair< double, double > & | a, |
const std::pair< double, double > & | b | ||
) |
Definition at line 121 of file weight.cpp.
Referenced by StochHMM::weight::getWeightedScore().
T StochHMM::construct_histogram | ( | std::vector< T > & | set, |
int | N_bins | ||
) |
Definition at line 49 of file statistics.cpp.
float StochHMM::continuous_uniform_cdf | ( | float | , |
float | , | ||
float | |||
) |
void StochHMM::cUniform | ( | std::vector< double > & | dist, |
int | lower, | ||
int | upper | ||
) |
Discrete Uniform Cumulative Distribution *a href = "http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)">
Definition at line 167 of file distributions.cpp.
double StochHMM::degenerate_distribution | ( | double | ) |
float StochHMM::discrete_uniform_cdf | ( | int | a, |
int | b, | ||
int | position | ||
) |
Discrete Uniform CDF *param a Minimum position *param b Maximum position *param position Position to calculate
Definition at line 163 of file statistics.cpp.
void StochHMM::divideValueToVector | ( | std::vector< T > & | vec, |
T | value | ||
) |
Definition at line 300 of file stochMath.h.
std::string StochHMM::double_to_string | ( | double | input | ) |
Convert a double to a string
input | Double you want to convert to a string |
Definition at line 585 of file text.cpp.
Referenced by StochHMM::model::_stringifyHeader(), join(), StochHMM::PWM::stringify(), StochHMM::weight::stringify(), StochHMM::emm::stringify(), StochHMM::lexicalTable::stringify(), StochHMM::transitionFuncParam::stringify(), StochHMM::sequence::stringify(), StochHMM::matrixPosition::stringify(), StochHMM::weightDef::stringify(), StochHMM::emissionFuncParam::stringify(), and StochHMM::transition::stringify().
std::string StochHMM::double_to_string | ( | float | input | ) |
double StochHMM::entropy | ( | std::vector< double > & | set | ) |
Definition at line 65 of file stochMath.cpp.
float StochHMM::entropy | ( | std::vector< float > & | set | ) |
Shannon's Entropy in log(2) space.
Definition at line 90 of file statistics.cpp.
double StochHMM::erf | ( | double | x | ) |
Definition at line 353 of file statistics.cpp.
References upper_igamma().
Referenced by sLogNormal(), sMaxwellBoltzman(), sNormal(), std_normal_cdf(), and truncated_normal_pdf().
double StochHMM::expon_cdf | ( | double | x, |
double | beta | ||
) |
Definition at line 295 of file statistics.cpp.
References gamma_cdf().
double StochHMM::expon_pdf | ( | double | x, |
double | beta | ||
) |
Definition at line 291 of file statistics.cpp.
References gamma_pdf().
double StochHMM::exponential_cdf | ( | double | ) |
void StochHMM::expVector | ( | std::vector< T > & | data | ) |
Definition at line 397 of file stochMath.h.
Referenced by StochHMM::transition::_parseLexical(), avgLogVector(), and StochHMM::emm::parse().
double StochHMM::extended_negative_binomial_cdf | ( | double | ) |
stringList StochHMM::extractTag | ( | std::string & | txt | ) |
Parse a line and extract a bracketed tag from the model file Returns a stringList which contains the tag split using ":\\t[space]"
txt | String to be have tag extracted from |
Definition at line 743 of file text.cpp.
References balanced_brackets(), and StochHMM::stringList::splitString().
Referenced by StochHMM::emm::_processTags(), StochHMM::transition::_processTags(), and StochHMM::track::parse().
double StochHMM::extrapolate | ( | std::pair< double, double > & | a, |
std::pair< double, double > & | b, | ||
double & | cx | ||
) |
Extrapolates the Y value of point given by cx and two previous points.
a | pair of doubles (X1,Y1) |
b | pair of doubles (X2,Y2) |
cx | double value of X |
Definition at line 51 of file stochMath.cpp.
Referenced by StochHMM::weight::getWeightedScore().
double StochHMM::F_cdf | ( | double | ) |
double StochHMM::factorial | ( | double | x | ) |
Definition at line 236 of file stochMath.cpp.
Referenced by multivariate_ewens_pdf(), poisson_pdf(), and sPoisson().
double StochHMM::fisher_z_cdf | ( | double | ) |
double StochHMM::folded_normal_distribution | ( | double | ) |
double StochHMM::gamma_cdf | ( | double | ) |
double StochHMM::gamma_cdf | ( | double | x, |
double | alpha, | ||
double | beta | ||
) |
Definition at line 261 of file statistics.cpp.
References beta(), gamma_pdf(), and integrate().
Referenced by chi2_cdf(), and expon_cdf().
double StochHMM::gamma_func | ( | double | x | ) |
Definition at line 240 of file statistics.cpp.
References PI.
Referenced by multinomial_pdf(), and upper_igamma().
double StochHMM::gamma_pdf | ( | double | x, |
std::vector< double > | param | ||
) |
Definition at line 257 of file statistics.cpp.
References gamma_pdf().
void StochHMM::generateUnknownIndices | ( | std::vector< size_t > & | results, |
size_t | alphabetSize, | ||
size_t | order, | ||
size_t | value | ||
) |
Definition at line 33 of file stochMath.cpp.
References POWER.
double StochHMM::geometric_cdf | ( | double | ) |
void StochHMM::getKeyValue | ( | std::string & | txt, |
std::string & | key, | ||
std::string & | value | ||
) |
Parses key and value from a line Where key is delimited by <<KEY>> = Value
txt | String to extract key value from |
key | String to assign key to |
value | String to assign value to |
Definition at line 467 of file text.cpp.
References removeLeadingWS(), and StochHMM::stringList::splitString().
Referenced by StochHMM::model::_processTemplateState().
double StochHMM::half_normal_distribution | ( | double | ) |
double StochHMM::hotelling_t_square_cdf | ( | double | ) |
double StochHMM::hypergeometric_cdf | ( | double | ) |
double StochHMM::hypergeometric_cdf | ( | int | n, |
int | N, | ||
int | m, | ||
int | k | ||
) |
Hypergeometric Cumulative Distribution Function *param n Number of draws from Population *param N Size of population *param m Number of successes in Population *param k Number of successes
Definition at line 224 of file statistics.cpp.
References bin_coef().
double StochHMM::ibeta | ( | double | x, |
double | a, | ||
double | b | ||
) |
double StochHMM::igamma_lower | ( | double | a, |
double | x | ||
) |
http://wwwC/.rskey.org/CMS/index.php/the-library/11
Definition at line 166 of file stochMath.cpp.
Referenced by cChiSquared(), cGamma(), igamma_upper(), rgammap(), sChiSquared(), and sGamma().
double StochHMM::igamma_upper | ( | double | s, |
double | x | ||
) |
Definition at line 159 of file stochMath.cpp.
References igamma_lower().
Referenced by rgammaq(), and sPoisson().
std::string StochHMM::int_to_string | ( | int | input | ) |
Convert an integer to a string
input | Integer you want to convert to string; |
Definition at line 564 of file text.cpp.
Referenced by join(), StochHMM::emm::parse(), StochHMM::emm::stringify(), StochHMM::ExDef::stringify(), StochHMM::sequence::stringify(), StochHMM::weightDef::stringify(), StochHMM::sequences::stringify(), StochHMM::transition::stringify(), and StochHMM::sequences::undigitize().
std::string StochHMM::int_to_string | ( | size_t | input | ) |
T StochHMM::integerPower | ( | T | base, |
T | exponent | ||
) |
Integer Power function The function is overflow safe, all the calculations are checked to make sure that the result won't overflow. Works for positive or negative bases. Any overflow will result in the return value of zero
base | |
exponent |
Definition at line 135 of file stochMath.h.
References max().
Referenced by StochHMM::lexicalTable::init_array_dimension_values().
double StochHMM::integrate | ( | double(*)(double, std::vector< double > &) | funct, |
double | lower, | ||
double | upper, | ||
std::vector< double > & | param, | ||
double | max_error = 0.000001 , |
||
double | sum = 0 |
||
) |
Definition at line 113 of file stochMath.cpp.
References _integrate(), and integrate().
double StochHMM::integrate | ( | double(*)(double, std::vector< double >) | funct, |
double | lower, | ||
double | upper, | ||
std::vector< double > | param, | ||
double | max_error = 0.001 , |
||
double | sum = 0 |
||
) |
Definition at line 122 of file statistics.cpp.
References _integrate().
Referenced by beta_cdf(), gamma_cdf(), integrate(), and low_igamma().
double StochHMM::interpolate | ( | std::pair< double, double > & | a, |
std::pair< double, double > & | b, | ||
double & | cx | ||
) |
Interpolates the y value given cx and two surrounding points on either side a and b.
a | pair of doubles (X1,Y1) |
b | pair of doubles (X2,Y2) |
cx | double value X |
Definition at line 43 of file stochMath.cpp.
Referenced by StochHMM::weight::getWeightedScore().
std::string StochHMM::intToBinString | ( | uint32_t | val | ) |
Definition at line 13 of file bitwise_ops.cpp.
References SIZE_MAX.
Referenced by StochHMM::dynamic_bitset::stringify_all().
double StochHMM::inverse_gaussian_cdf | ( | double | ) |
bool StochHMM::isNumeric | ( | const std::string & | str | ) |
Is the value of string numeric
str | String to determine if it is numeric |
Definition at line 808 of file text.cpp.
Referenced by StochHMM::transitionFuncParam::parse(), and StochHMM::emissionFuncParam::parse().
std::string StochHMM::join | ( | std::vector< int > & | input, |
char | c | ||
) |
Converts a vector of ints into a string delimited by a character c
input | Vector of integers to be converted |
c | Character to use as a delimiter |
Definition at line 519 of file text.cpp.
References int_to_string().
Referenced by StochHMM::multiTraceback::print_hits(), StochHMM::PWM::stringify(), StochHMM::emm::stringify(), StochHMM::stringList::stringify(), StochHMM::matrixPosition::stringify(), and StochHMM::track::stringify().
std::string StochHMM::join | ( | std::vector< size_t > & | input, |
char | c | ||
) |
Converts a vector of size_t into a string delimited by a character c
input | Vector of integers to be converted |
c | Character to use as a delimiter |
Definition at line 542 of file text.cpp.
References int_to_string().
std::string StochHMM::join | ( | std::vector< short > & | input, |
char | c | ||
) |
Converts a vector of shorts into a string delimited by a character c
input | Vector of shorts to be converted |
c | Character to use as a delimiter |
Definition at line 650 of file text.cpp.
References int_to_string().
std::string StochHMM::join | ( | std::vector< double > & | input, |
char | c | ||
) |
Converts a vector of doubles into a string delimited by a character c
input | Vector of doubles to be converted |
c | Character to use as a delimiter |
Definition at line 673 of file text.cpp.
References double_to_string().
std::string StochHMM::join | ( | std::vector< std::string > & | input, |
char | c | ||
) |
Converts a vector of strings into a string delimited by a character c
input | Vector of strings to be converted |
c | Character to use as a delimiter |
Definition at line 696 of file text.cpp.
double StochHMM::log_logistic_cdf | ( | double | ) |
double StochHMM::log_normal_cdf | ( | double | ) |
double StochHMM::logarithmic_cdf | ( | double | ) |
|
inline |
Logit function Inverse of the sigmoidal logistic function *Also known as log-odds score or ratio
Definition at line 581 of file stochMath.h.
Referenced by logit_normal_pdf().
void StochHMM::logProbVector | ( | std::vector< T > & | data | ) |
Definition at line 444 of file stochMath.h.
References sumVector().
void StochHMM::logVector | ( | std::vector< T > & | data | ) |
Definition at line 385 of file stochMath.h.
Referenced by StochHMM::transition::_parseLexical(), and StochHMM::emm::parse().
double StochHMM::low_igamma | ( | double | x, |
double | alpha | ||
) |
Definition at line 343 of file statistics.cpp.
References _low_igamma(), and integrate().
Referenced by upper_igamma().
size_t StochHMM::lowestBitSet | ( | uint32_t | x | ) |
Definition at line 56 of file bitwise_ops.cpp.
T StochHMM::lso | ( | T & | val, |
uint8_t | n | ||
) |
Left Shift with shift off *Shifts the value to the left by n bits. The bits that would get shifted off value are returned in lsb
Definition at line 55 of file bitwise_ops.h.
References CHAR_BIT.
Referenced by StochHMM::dynamic_bitset::insert(), and StochHMM::dynamic_bitset::operator<<=().
T StochHMM::lsoso | ( | T & | val, |
T & | old_val, | ||
uint8_t | n | ||
) |
Left Shift with shift off *Shifts the value to the left by n bits. The bits that get shifted off val are returned in lsb of return value
[in,out] | val | Value to shift |
[in] | old_val | Values to shift on to val |
Definition at line 91 of file bitwise_ops.h.
References CHAR_BIT.
Referenced by StochHMM::dynamic_bitset::operator<<=().
uint32_t StochHMM::maskLeft | ( | uint32_t | val, |
uint8_t | pos | ||
) |
Returns integer's higher bits from position up to msb *Lower bits are set to zero
Definition at line 86 of file bitwise_ops.cpp.
Referenced by StochHMM::dynamic_bitset::erase(), and StochHMM::dynamic_bitset::insert().
uint32_t StochHMM::maskRight | ( | uint32_t | val, |
uint8_t | pos | ||
) |
Returns integer's lower bits from position down to lsb *Higher bits are set to zero
Definition at line 96 of file bitwise_ops.cpp.
Referenced by StochHMM::dynamic_bitset::erase(), and StochHMM::dynamic_bitset::insert().
T StochHMM::max | ( | std::vector< T > & | set | ) |
Definition at line 40 of file statistics.cpp.
References min().
Referenced by construct_histogram(), StochHMM::track::getIndex(), integerPower(), StochHMM::weight::parse(), StochHMM::track::setIndex(), StochHMM::sequences::setLength(), StochHMM::trellis::traceback_posterior(), and StochHMM::track::track().
T StochHMM::maxVector | ( | std::vector< T > & | data | ) |
Definition at line 366 of file stochMath.h.
T StochHMM::min | ( | std::vector< T > & | set | ) |
Definition at line 31 of file statistics.cpp.
Referenced by construct_histogram(), StochHMM::seqTracks::getNext(), max(), and StochHMM::weight::parse().
T StochHMM::minVector | ( | std::vector< T > & | data | ) |
Definition at line 357 of file stochMath.h.
size_t StochHMM::msb | ( | uint32_t | val | ) |
Definition at line 27 of file bitwise_ops.cpp.
double StochHMM::multinomial_pdf | ( | std::vector< int > | r, |
int | n, | ||
std::vector< double > | p | ||
) |
check to make sure this is right;
Definition at line 322 of file statistics.cpp.
References gamma_func().
void StochHMM::multiplyValueToVector | ( | std::vector< T > & | vec, |
T | value | ||
) |
Definition at line 286 of file stochMath.h.
Referenced by StochHMM::Index::operator*(), and StochHMM::Index::operator*=().
void StochHMM::multiplyVectorCombinatorial | ( | std::vector< T > & | result, |
std::vector< T > & | lhs, | ||
std::vector< T > & | rhs | ||
) |
Definition at line 241 of file stochMath.h.
double StochHMM::negative_binomial_cdf | ( | double | ) |
double StochHMM::noncentral_chi_cdf | ( | double | ) |
std::ostream& StochHMM::operator<< | ( | std::ostream & | output, |
const dynamic_bitset & | bs | ||
) |
Overloaded ostream for using dynamic_bitsets in ostream *Usage: std::cout << bs << ....;
Definition at line 270 of file dynamic_bitset.cpp.
References StochHMM::dynamic_bitset::stringify().
double StochHMM::parabolic_fractal_cdf | ( | double | ) |
double StochHMM::pareto_cdf | ( | double | ) |
std::string StochHMM::parseComment | ( | std::string & | txt, |
char | commentChar | ||
) |
Find first comment character and then return everything following the character.
Definition at line 422 of file text.cpp.
Referenced by StochHMM::stringList::processString(), and StochHMM::stringList::removeComments().
double StochHMM::poisson_binomial_cdf | ( | double | ) |
double StochHMM::poisson_binomial_pdf | ( | size_t | k, |
std::vector< double > & | p | ||
) |
Poisson Binomial Probability mass function Iterative calculations don't make this appropriate for using with emissions
k | Value or Number of successful trials |
p | Probability of Success for each trial of N trials |
Definition at line 85 of file PDF.cpp.
double StochHMM::poisson_cdf | ( | double | ) |
int8_t StochHMM::popCount | ( | uint32_t | val | ) |
Population distance (Hamming Distance) *Returns the number of bits set in the 32bit integer
Definition at line 76 of file bitwise_ops.cpp.
void StochHMM::print_vec | ( | std::vector< std::vector< double > > & | x | ) |
void StochHMM::probVector | ( | std::vector< T > & | data | ) |
Definition at line 420 of file stochMath.h.
References sumVector().
Referenced by StochHMM::transition::_parseLexical(), and StochHMM::emm::parse().
T StochHMM::productVector | ( | std::vector< T > & | data | ) |
Multiply terms in vector and return the product.
data | Vector of T |
Definition at line 343 of file stochMath.h.
sequence StochHMM::random_sequence | ( | std::vector< double > & | freq, |
size_t | length, | ||
track * | tr | ||
) |
Randomly generate a sequence based on Probabilities of each character
freq | Reference to std::vector<double> that contains frequencies of alphabet corresponding to alphabet in track |
length | Length of sequence to generate |
tr | Pointer to StochHMM::track where alphabet and ambiguous characters are defined |
Definition at line 1010 of file sequence.cpp.
References StochHMM::track::getAlpha(), StochHMM::track::getAlphaSize(), and StochHMM::sequence::setSeq().
double StochHMM::rel_entropy | ( | std::vector< double > & | set, |
std::vector< double > & | set2 | ||
) |
Definition at line 89 of file stochMath.cpp.
References rel_entropy().
float StochHMM::rel_entropy | ( | std::vector< float > & | set, |
std::vector< float > & | set2 | ||
) |
Shannon's Relative entropy (Kullback-Leibler Divergence) *Normalized for A->B and B->A
Definition at line 98 of file statistics.cpp.
Referenced by rel_entropy().
void StochHMM::removeLeadingWS | ( | std::string & | txt, |
const std::string & | ws | ||
) |
Removes leading whitespace characters from a string
txt | String user wants to remove whitespace from |
ws | String containing whitespace characters to remove |
Definition at line 450 of file text.cpp.
Referenced by getKeyValue(), and StochHMM::stringList::removeLWS().
void StochHMM::replaceChar | ( | std::string & | txt, |
char | ch, | ||
char | replaceCh | ||
) |
Replace a given character with another character in a string
txt | String to use have characters replaced |
ch | Character to search string for |
replaceCh | Character to replace found ch with |
Definition at line 507 of file text.cpp.
double StochHMM::rgammap | ( | double | s, |
double | x | ||
) |
Definition at line 182 of file stochMath.cpp.
References igamma_lower().
double StochHMM::rgammaq | ( | double | s, |
double | x | ||
) |
Definition at line 187 of file stochMath.cpp.
References igamma_upper().
double StochHMM::ribeta | ( | double | x, |
double | a, | ||
double | b | ||
) |
Definition at line 231 of file stochMath.cpp.
References beta(), and ibeta().
Referenced by cFDistribution(), sFDistribution(), and sNegativeBinomial().
uint32_t StochHMM::rol | ( | uint32_t & | val, |
uint8_t | shift_register | ||
) |
T StochHMM::rol | ( | T | val, |
uint8_t | shift_register | ||
) |
uint32_t StochHMM::ror | ( | uint32_t & | val, |
uint8_t | shift_register | ||
) |
T StochHMM::ror | ( | T | val, |
uint8_t | shift_register | ||
) |
T StochHMM::rso | ( | T & | val, |
uint8_t | n | ||
) |
Right Shift with shift off *Shifts the value to the right by n bits. The bits that would get shifted off value are returned in msb
Definition at line 71 of file bitwise_ops.h.
References CHAR_BIT.
Referenced by StochHMM::dynamic_bitset::erase(), and StochHMM::dynamic_bitset::operator>>=().
T StochHMM::rsoso | ( | T & | val, |
T & | old_val, | ||
uint8_t | n | ||
) |
Right Shift with shift off *Shifts the value to the right by n bits. The bits that would get shifted off value are returned in msb of return value
[in,out] | val | Value to shift |
[in] | old_val | Values to shift on to val |
Definition at line 103 of file bitwise_ops.h.
References CHAR_BIT.
Referenced by StochHMM::dynamic_bitset::operator>>=().
void StochHMM::sBetaBinomial | ( | std::vector< double > & | dist, |
int | trials, | ||
double | a, | ||
double | b | ||
) |
BetaBinomial Survival Function *a href = "http://en.wikipedia.org/wiki/Beta-binomial_model">
[out] | dist | |
trials | Number of trials | |
a | alpha | |
b | beta |
Definition at line 74 of file distributions.cpp.
References beta(), bin_coef(), and maximum.
void StochHMM::sBinomial | ( | std::vector< double > & | dist, |
int | trials, | ||
double | prob | ||
) |
Binomial Distribution Survival Function
[out] | dist | |
trials | Number of trials in experiment | |
prob | Probability of success |
Definition at line 26 of file distributions.cpp.
References bin_coef(), and maximum.
void StochHMM::sCauchy | ( | std::vector< double > & | dist, |
double | location, | ||
double | scale | ||
) |
Definition at line 234 of file distributions.cpp.
References maximum.
void StochHMM::sChiSquared | ( | std::vector< double > & | dist, |
double | df | ||
) |
Complement CDF/Survival of Chi-Squared Distribution
[out] | dist | Vector to store distribution in |
df | Degrees of freedom |
Definition at line 263 of file distributions.cpp.
References igamma_lower(), and maximum.
void StochHMM::sDegenerate | ( | std::vector< double > & | dist, |
double | value | ||
) |
Degenerate Survival Function *Support consists of only one value
[out] | dist | |
value |
Definition at line 127 of file distributions.cpp.
void StochHMM::sExponential | ( | std::vector< double > & | dist, |
double | lambda | ||
) |
Complement CDF Exponential Distribution
[out] | dist | |
lambda | Value of lambda to use *a href = "http://en.wikipedia.org/wiki/Exponential_distribution"> |
Definition at line 292 of file distributions.cpp.
References maximum.
void StochHMM::sExtremeValue | ( | std::vector< double > & | , |
double | , | ||
double | , | ||
double | |||
) |
void StochHMM::sFDistribution | ( | std::vector< double > & | dist, |
double | dOne, | ||
double | dTwo | ||
) |
void StochHMM::sGamma | ( | std::vector< double > & | dist, |
double | shape, | ||
double | scale | ||
) |
Definition at line 392 of file distributions.cpp.
References igamma_lower(), and maximum.
void StochHMM::sGeometric | ( | std::vector< double > & | dist, |
double | p | ||
) |
Definition at line 424 of file distributions.cpp.
References maximum.
void StochHMM::sHypergeometric | ( | std::vector< double > & | dist, |
int | N, | ||
int | m, | ||
int | n | ||
) |
Complement CDF Hypergeometric Distribution
[out] | dist | |
N | Population Size | |
m | Number of successes | |
n | Number of draws |
Definition at line 188 of file distributions.cpp.
References bin_coef(), and maximum.
double StochHMM::simpson | ( | double(*)(double, std::vector< double >) | funct, |
double | alpha, | ||
double | beta, | ||
double | lower, | ||
double | upper | ||
) |
double StochHMM::simpson | ( | double(*)(double, double, double) | funct, |
double | alpha, | ||
double | beta, | ||
double | lower, | ||
double | upper | ||
) |
Definition at line 135 of file statistics.cpp.
Referenced by adapt_simpson().
double StochHMM::simpson | ( | double(*)(double, std::vector< double > &) | funct, |
double | alpha, | ||
double | beta, | ||
double | lower, | ||
double | upper | ||
) |
double StochHMM::skellam_cdf | ( | double | ) |
void StochHMM::sLaplace | ( | std::vector< double > & | dist, |
double | location, | ||
double | scale | ||
) |
Definition at line 457 of file distributions.cpp.
References maximum.
void StochHMM::sLogarithmic | ( | std::vector< double > & | dist, |
double | prob | ||
) |
Definition at line 488 of file distributions.cpp.
References maximum.
void StochHMM::sLogistic | ( | std::vector< double > & | dist, |
double | location, | ||
double | scale | ||
) |
Definition at line 506 of file distributions.cpp.
References maximum.
void StochHMM::sLogNormal | ( | std::vector< double > & | dist, |
double | location, | ||
double | scale | ||
) |
std::string StochHMM::slurpFile | ( | std::string & | file | ) |
Slurp a file into a string
file | Filename |
Definition at line 823 of file text.cpp.
Referenced by StochHMM::PWM::import(), and StochHMM::model::import().
void StochHMM::sMaxwellBoltzman | ( | std::vector< double > & | dist, |
double | scale | ||
) |
Definition at line 522 of file distributions.cpp.
References erf(), and maximum.
T StochHMM::smooth_histogram | ( | std::vector< T > | histo, |
int | intervals, | ||
int | window_size, | ||
int | iterations | ||
) |
Definition at line 62 of file statistics.cpp.
T StochHMM::smooth_histogram | ( | std::vector< T > & | , |
int | , | ||
int | , | ||
int | |||
) |
void StochHMM::sNegativeBinomial | ( | std::vector< double > & | dist, |
int | r, | ||
double | p | ||
) |
void StochHMM::sNonCentralF | ( | std::vector< double > & | , |
double | , | ||
double | , | ||
double | |||
) |
void StochHMM::sNonCentralT | ( | std::vector< double > & | , |
double | , | ||
double | |||
) |
void StochHMM::sNormal | ( | std::vector< double > & | dist, |
double | mean, | ||
double | stdev | ||
) |
void StochHMM::sort_scores | ( | std::vector< nthScore > & | nth_scores | ) |
Sort the viterbi scores in the nth trellis cells.
Definition at line 17 of file nth_best.cpp.
References _vec_sort().
Referenced by StochHMM::trellis::naive_nth_viterbi(), and StochHMM::trellis::simple_nth_viterbi().
bool StochHMM::sortTBVec | ( | std::map< traceback_path, int >::iterator | lhs, |
std::map< traceback_path, int >::iterator | rhs | ||
) |
Definition at line 615 of file traceback_path.cpp.
Referenced by StochHMM::multiTraceback::finalize().
void StochHMM::sPareto | ( | std::vector< double > & | dist, |
double | shape, | ||
double | scale | ||
) |
Definition at line 606 of file distributions.cpp.
References maximum.
void StochHMM::split_line | ( | std::vector< std::string > & | line, |
std::string & | input | ||
) |
Splits a line into a vector of string using delimiters ' ",[space]\n\t'
line | vector of strings to split input into |
input | String to be split using delimiters ' ",[space]\n\t' |
Definition at line 716 of file text.cpp.
Referenced by StochHMM::ExDefSequence::_parseAbsDef(), and StochHMM::track::_splitAmbiguousList().
stringList & StochHMM::splitString | ( | const std::string & | txt, |
const std::string & | delimiters | ||
) |
Splits string using delimiters and return stringList.
Definition at line 495 of file text.cpp.
References StochHMM::stringList::clear(), and StochHMM::stringList::splitString().
Referenced by StochHMM::state::_parseHeader(), and StochHMM::state::_parseTransition().
void StochHMM::sPoisson | ( | std::vector< double > & | dist, |
double | lambda | ||
) |
Definition at line 620 of file distributions.cpp.
References factorial(), igamma_upper(), and maximum.
void StochHMM::sRayleigh | ( | std::vector< double > & | dist, |
double | sigma | ||
) |
Definition at line 636 of file distributions.cpp.
References maximum.
double StochHMM::std_normal_cdf | ( | double | x | ) |
Definition at line 357 of file statistics.cpp.
References erf().
void StochHMM::sTriangular | ( | std::vector< double > & | dist, |
int | a, | ||
int | b, | ||
int | c | ||
) |
Definition at line 651 of file distributions.cpp.
bool StochHMM::stringToDouble | ( | std::string & | txt, |
double & | val | ||
) |
Convert string to double
txt | Text representation of double |
val | Integer to be assigned |
Definition at line 636 of file text.cpp.
Referenced by StochHMM::transition::_parseDuration(), StochHMM::model::_parseHeader(), StochHMM::transition::_parseLexical(), StochHMM::transition::_parseStandard(), StochHMM::ExDefSequence::_parseWeightDef(), StochHMM::transitionFuncParam::parse(), StochHMM::emm::parse(), StochHMM::emissionFuncParam::parse(), StochHMM::weight::parse(), and StochHMM::stringList::toVecDouble().
bool StochHMM::stringToInt | ( | std::string & | txt, |
int & | val | ||
) |
Convert string to integer
txt | Text representation of integer |
val | Integer to be assigned |
Definition at line 607 of file text.cpp.
Referenced by StochHMM::ExDefSequence::_parseAbsDef(), StochHMM::transition::_parseDuration(), StochHMM::transition::_parseLexical(), StochHMM::ExDefSequence::_parseWeightDef(), StochHMM::emm::parse(), and StochHMM::stringList::toVecInt().
bool StochHMM::stringToInt | ( | std::string & | txt, |
size_t & | val | ||
) |
double StochHMM::summation | ( | double(*)(int, std::vector< double >) | funct, |
int | lower, | ||
int | upper, | ||
std::vector< double > | param | ||
) |
Definition at line 149 of file stochMath.cpp.
float StochHMM::summation | ( | float(*)(int, std::vector< float >) | funct, |
int | lower, | ||
int | upper, | ||
std::vector< float > | param | ||
) |
Definition at line 309 of file statistics.cpp.
Referenced by binomial_cdf().
double StochHMM::summation | ( | double(*)(int, std::vector< double > &) | funct, |
int | , | ||
int | , | ||
std::vector< double > & | |||
) |
T StochHMM::sumVector | ( | std::vector< T > & | data | ) |
Sum the vector and return the sum.
data | Vector of doubles |
Definition at line 317 of file stochMath.h.
Referenced by avgLogVector(), avgVector(), dirichlet_pdf(), StochHMM::lexicalTable::init_table_dimension_values(), logProbVector(), and probVector().
T StochHMM::sumVector | ( | const std::vector< T > & | data | ) |
Definition at line 330 of file stochMath.h.
void StochHMM::sUniform | ( | std::vector< double > & | dist, |
int | lower, | ||
int | upper | ||
) |
Discrete Uniform Survival Function *a href = "http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)">
Definition at line 152 of file distributions.cpp.
void StochHMM::sUser | ( | std::vector< double > & | dist, |
std::vector< double > & | prob_dist | ||
) |
Definition at line 674 of file distributions.cpp.
void StochHMM::sWeibull | ( | std::vector< double > & | dist, |
double | shape, | ||
double | scale | ||
) |
Definition at line 689 of file distributions.cpp.
References maximum.
double StochHMM::upper_igamma | ( | double | x, |
double | alpha | ||
) |
Definition at line 349 of file statistics.cpp.
References gamma_func(), and low_igamma().
Referenced by erf().
double StochHMM::yule_simon_cdf | ( | double | ) |
double StochHMM::zeta | ( | double | ) |
int StochHMM::maximum = 1000000 |
Definition at line 12 of file distributions.cpp.
Referenced by cBetaBinomial(), cBinomial(), cExponential(), cFDistribution(), cGamma(), cGeometric(), cHypergeometric(), sBetaBinomial(), sBinomial(), sCauchy(), sChiSquared(), sExponential(), sFDistribution(), sGamma(), sGeometric(), sHypergeometric(), sLaplace(), sLogarithmic(), sLogistic(), sLogNormal(), sMaxwellBoltzman(), sNegativeBinomial(), sNormal(), sPareto(), sPoisson(), sRayleigh(), and sWeibull().
const uint32_t StochHMM::POWER[32][128] |
Definition at line 91 of file stochMath.h.
Referenced by StochHMM::transition::_parseLexical(), StochHMM::track::convertIndexToDigital(), StochHMM::track::convertIndexToWord(), generateUnknownIndices(), StochHMM::emm::parse(), and StochHMM::lexicalTable::stringify().
bool StochHMM::quiet |
int StochHMM::WID = 80 |
Definition at line 32 of file traceback_path.cpp.