libpll(3) | Library Functions Manual | libpll(3) |
libpll — Phylogenetic Likelihood Library
Partition management
void pll_partition_destroy(pll_partition_t * partition);
Partition parameters setup
int pll_set_tip_clv(pll_partition_t * partition, unsigned int tip_index, const double * clv);
void pll_set_pattern_weights(pll_partition_t * partition, const unsigned int * pattern_weights);
int pll_set_asc_bias_type(pll_partition_t * partition, int asc_bias_type);
void pll_set_asc_state_weights(pll_partition_t * partition, const unsigned int * state_weights);
void pll_set_subst_params(pll_partition_t * partition, unsigned int params_index, const double * params);
void pll_set_frequencies(pll_partition_t * partition, unsigned int params_index, const double * frequencies);
void pll_set_category_rates(pll_partition_t * partition, const double * rates);
void pll_set_category_weights(pll_partition_t * partition, const double * rate_weights);
Transition probability matrices
int pll_update_eigen(pll_partition_t * partition, unsigned int params_index);
void pll_show_pmatrix(pll_partition_t * partition, unsigned int index, unsigned int float_precision);
Invariant sites
int pll_update_invariant_sites(pll_partition_t * partition);
int pll_update_invariant_sites_proportion(pll_partition_t * partition, unsigned int params_index, double prop_invar);
Conditional probability vectors
void pll_show_clv(pll_partition_t * partition, unsigned int clv_index, int scaler_index, unsigned int float_precision);
Evaluation of log-Likelihood
double pll_compute_edge_loglikelihood(pll_partition_t * partition, unsigned int parent_clv_index, int parent_scaler_index, unsigned int child_clv_index, int child_scaler_index, unsigned int matrix_index, const unsigned int * freqs_index, double * persite_lnl);
Likelihood function derivatives
int pll_compute_likelihood_derivatives(pll_partition_t * partition, int parent_scaler_index, int child_scaler_index, double branch_length, const unsigned int * params_indices, const double * sumtable, double * d_f, double * dd_f);
FASTA file handling
int pll_fasta_getnext(pll_fasta_t * fd, char ** head, long * head_len, char ** seq, long * seq_len, long * seqno);
void pll_fasta_close(pll_fasta_t * fd);
long pll_fasta_getfilesize(pll_fasta_t * fd);
long pll_fasta_getfilepos(pll_fasta_t * fd);
int pll_fasta_rewind(pll_fasta_t * fd);
PHYLIP file handling
void pll_msa_destroy(pll_msa_t * msa);
Newick handling
pll_utree_t * pll_utree_parse_newick(const char * filename, unsigned int * tip_count);
pll_utree_t * pll_utree_parse_newick_string(char * s, unsigned int * tip_count);
Unrooted tree structure manipulation
void pll_utree_show_ascii(pll_utree_t * tree, int options);
char * pll_utree_export_newick(pll_utree_t * root);
int pll_utree_traverse(pll_utree_t * root, int (*cbtrav)(pll_utree_t *), pll_utree_t ** outbuffer, unsigned int * trav_size);
unsigned int pll_utree_query_tipnodes(pll_utree_t * root, pll_utree_t ** node_list);
unsigned int pll_utree_query_innernodes(pll_utree_t * root, pll_utree_t ** node_list);
void pll_utree_create_operations(pll_utree_t ** trav_buffer, unsigned int trav_buffer_size, double * branches, unsigned int * pmatrix_indices, pll_operation_t * ops, unsigned int * matrix_count, unsigned int * ops_count);
int pll_utree_check_integrity(pll_utree_t * root);
pll_utree_t * pll_utree_clone(pll_utree_t * root);
pll_utree_t * pll_rtree_unroot(pll_rtree_t * root);
int pll_utree_every(pll_utree_t * node, int (*cb)(pll_utree_t *));
Rooted tree structure manipulation
void pll_rtree_show_ascii(pll_rtree_t * tree, int options);
char * pll_rtree_export_newick(pll_rtree_t * root);
int pll_rtree_traverse(pll_rtree_t * root, int (*cbtrav)(pll_rtree_t *), pll_rtree_t ** outbuffer, unsigned int * trav_size);
unsigned int pll_rtree_query_tipnodes(pll_rtree_t * root, pll_rtree_t ** node_list);
unsigned int pll_rtree_query_innernodes(pll_rtree_t * root, pll_rtree_t ** node_list);
void pll_rtree_create_operations(pll_rtree_t ** trav_buffer, unsigned int trav_buffer_size, double * branches, unsigned int * pmatrix_indices, pll_operation_t * ops, unsigned int * matrix_count, unsigned int * ops_count);
void pll_rtree_create_pars_buildops(pll_rtree_t ** trav_buffer, unsigned int trav_buffer_size, pll_pars_buildop_t * ops, unsigned int * ops_count);
void pll_rtree_create_pars_recops(pll_rtree_t ** trav_buffer, unsigned int trav_buffer_size, pll_pars_recop_t * ops, unsigned int * ops_count);
Topological rearrangement moves
int pll_utree_spr_safe(pll_utree_t * p, pll_utree_t * r, pll_utree_rb_t * rb, double * branch_lengths, unsigned int * matrix_indices);
int pll_utree_nni(pll_utree_t * p, int type, pll_utree_rb_t * rb);
int pll_utree_rollback(pll_utree_rb_t * rollback, double * branch_lengths, unsigned int * matrix_indices);
Parsimony functions
pll_parsimony_t * pll_parsimony_create(unsigned int * tips, unsigned int states, unsigned int sites, double * score_matrix, unsigned int score_buffers, unsigned int ancestral_buffers);
double pll_parsimony_build(pll_parsimony_t * pars, pll_pars_buildop_t * operations, unsigned int count);
void pll_parsimony_reconstruct(pll_parsimony_t * pars, const unsigned int * map, pll_pars_recop_t * operations, unsigned int count);
double pll_parsimony_score(pll_parsimony_t * pars, unsigned int score_buffer_index);
void pll_parsimony_destroy(pll_parsimony_t * pars);
Auxiliary functions
void * pll_aligned_alloc(size_t size, size_t alignment);
void pll_aligned_free(void * ptr);
unsigned int * pll_compress_site_patterns(char ** sequence, const unsigned int * map, int count, int * length);
Core functions
void pll_core_update_partial_tt(unsigned int states, unsigned int sites, unsigned int rate_cats, double * parent_clv, unsigned int * parent_scaler, const unsigned char * left_tipchars, const unsigned char * right_tipchars, const unsigned int * tipmap, unsigned int tipmap_size, const double * lookup, unsigned int attrib);
void pll_core_update_partial_ti(unsigned int states, unsigned int sites, unsigned int rate_cats, double * parent_clv, unsigned int * parent_scaler, const unsigned char * left_tipchars, const double * right_clv, const double * left_matrix, const double * right_matrix, const unsigned int * right_scaler, const unsigned int * tipmap, unsigned int attrib);
void pll_core_update_partial_ii(unsigned int states, unsigned int sites, unsigned int rate_cats, double * parent_clv, unsigned int * parent_scaler, const double * left_clv, const double * right_clv, const double * left_matrix, const double * right_matrix, const unsigned int * left_scaler, const unsigned int * right_scaler, unsigned int attrib);
int pll_core_update_sumtable_ti(unsigned int states, unsigned int sites, unsigned int rate_cats, const double * parent_clv, const unsigned char * left_tipchars, double ** eigenvecs, double ** inv_eigenvecs, double ** freqs, unsigned int * tipmap, double * sumtable, unsigned int attrib);
int pll_core_likelihood_derivatives(unsigned int states, unsigned intsites, unsigned int rate_cats, const double * rate_weights, const unsigned int * parent_scaler, const unsigned int * child_scaler, const int * invariant, const unsigned int * pattern_weights, double branch_length, const double * prop_invar, double ** freqs, const double * rates, double ** eigenvals, const double * sumtable, double * d_f, double * dd_f, unsigned int attrib);
double pll_core_edge_loglikelihood_ii(unsigned int states, unsigned int sites, unsigned int rate_cats, const double * parent_clv, const unsigned int * parent_scaler, const double * child_clv, const unsigned int * child_scaler, const double * pmatrix, double ** frequencies, const double * rate_weights, const unsigned int * pattern_weights, const double * invar_proportion, const int * invar_indices, const unsigned int * freqs_indices, double * persite_lnl, unsigned int attrib);
double pll_core_edge_loglikelihood_ti(unsigned int states, unsigned int sites, unsigned int rate_cats, const double * parent_clv, const unsigned int * parent_scaler, const unsigned char * tipchars, const unsigned int * tipmap, const double * pmatrix, double ** frequencies, const double * rate_weights, const unsigned int * pattern_weights, const double * invar_proportion, const int * invar_indices, const unsigned int * freqs_indices, double * persite_lnl, unsigned int attrib);
int pll_core_update_pmatrix(double * pmatrix, unsigned int states, double rate, double prop_invar, double branch_length, double * eigenvals, double * eigenvecs, double * inv_eigenvecs, unsigned int attrib);
libpll is a library for phylogenetics.
Source code and binaries are available at <https://github.com/xflouris/libpll>.
Copyright (C) 2015-2017, Tomas Flouri, Diego Darriba
All rights reserved.
Contact: Tomas Flouri <Tomas.Flouri@h-its.org>, Scientific Computing, Heidelberg Insititute for Theoretical Studies, 69118 Heidelberg, Germany
This software is licensed under the terms of the GNU Affero General Public License version 3.
GNU Affero General Public License version 3
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
New features and important modifications of libpll (short lived or minor bug releases may not be mentioned):
July 12, 2017 | libpll 0.3.2 |