From 83b49af85e7e1ffaa081cd3926f5b6d7007742f3 Mon Sep 17 00:00:00 2001 From: computations Date: Wed, 27 Jan 2021 13:40:43 +0100 Subject: [PATCH 1/2] Update pllmodules to allow for floating point weights --- libs/libpll | 2 +- src/msa/pll_msa.c | 10 +++++----- src/msa/pll_msa.h | 2 +- src/tree/pll_tree.c | 2 +- src/tree/pll_tree.h | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/libs/libpll b/libs/libpll index f946d90..508db35 160000 --- a/libs/libpll +++ b/libs/libpll @@ -1 +1 @@ -Subproject commit f946d906bef1ac0ccc4380eb11fbceebfb0ca1e7 +Subproject commit 508db3562ae9f27a198bf76f733ee9528d8e9fbd diff --git a/src/msa/pll_msa.c b/src/msa/pll_msa.c index de79714..b145ff8 100644 --- a/src/msa/pll_msa.c +++ b/src/msa/pll_msa.c @@ -49,7 +49,7 @@ PLL_EXPORT double * pllmod_msa_empirical_frequencies(pll_partition_t * partition unsigned int rate_cats = partition->rate_cats; unsigned int tips = partition->tips; const pll_state_t * tipmap = partition->tipmap; - const unsigned int * w = partition->pattern_weights; + const double * w = partition->pattern_weights; double * frequencies; if ((frequencies = (double *) calloc ((size_t) states, sizeof(double))) @@ -146,7 +146,7 @@ PLL_EXPORT double * pllmod_msa_empirical_frequencies(pll_partition_t * partition void compute_pair_rates(unsigned int states, unsigned int tips, unsigned long sites, unsigned char ** tipchars, - const unsigned int * w, const pll_state_t * tipmap, + const double * w, const pll_state_t * tipmap, size_t * state_freq, size_t * pair_rates) { unsigned int i, j, k; @@ -191,7 +191,7 @@ PLL_EXPORT double * pllmod_msa_empirical_subst_rates(pll_partition_t * partition unsigned int tips = partition->tips; unsigned int rate_cats = partition->rate_cats; const pll_state_t * tipmap = partition->tipmap; - const unsigned int * w = partition->pattern_weights; + const double * w = partition->pattern_weights; unsigned char ** tipchars = partition->tipchars; unsigned int n_subst_rates = (states * (states - 1) / 2); @@ -287,7 +287,7 @@ PLL_EXPORT double pllmod_msa_empirical_invariant_sites(pll_partition_t *partitio unsigned int n; unsigned int n_inv = 0; unsigned int sites = partition->sites; - const unsigned int * w = partition->pattern_weights; + const double * w = partition->pattern_weights; /* reset errno */ pll_errno = 0; @@ -577,7 +577,7 @@ PLL_EXPORT void pllmod_msa_destroy_errors(pllmod_msa_errors_t * errs) PLL_EXPORT pllmod_msa_stats_t * pllmod_msa_compute_stats(const pll_msa_t * msa, unsigned int states, const pll_state_t * tipmap, - const unsigned int * weights, + const double * weights, unsigned long stats_mask) { if (!msa) diff --git a/src/msa/pll_msa.h b/src/msa/pll_msa.h index 99982fd..353d6ac 100644 --- a/src/msa/pll_msa.h +++ b/src/msa/pll_msa.h @@ -86,7 +86,7 @@ PLL_EXPORT void pllmod_msa_destroy_errors(pllmod_msa_errors_t * errs); PLL_EXPORT pllmod_msa_stats_t * pllmod_msa_compute_stats(const pll_msa_t * msa, unsigned int states, const pll_state_t * tipmap, - const unsigned int * weights, + const double * weights, unsigned long stats_mask); PLL_EXPORT void pllmod_msa_destroy_stats(pllmod_msa_stats_t * stats); diff --git a/src/tree/pll_tree.c b/src/tree/pll_tree.c index e90b34c..c108bcf 100644 --- a/src/tree/pll_tree.c +++ b/src/tree/pll_tree.c @@ -989,7 +989,7 @@ pll_utree_t * pllmod_utree_create_parsimony(unsigned int taxon_count, unsigned int seq_length, char * const * names, char * const * sequences, - const unsigned int * site_weights, + const double * site_weights, const pll_state_t * map, unsigned int states, unsigned int attributes, diff --git a/src/tree/pll_tree.h b/src/tree/pll_tree.h index d5806cd..a6626ce 100644 --- a/src/tree/pll_tree.h +++ b/src/tree/pll_tree.h @@ -390,7 +390,7 @@ pll_utree_t * pllmod_utree_create_parsimony(unsigned int taxon_count, unsigned int seq_length, char * const * names, char * const * sequences, - const unsigned int * site_weights, + const double * site_weights, const pll_state_t * map, unsigned int states, unsigned int attributes, From edf8c36f256ca7f164ca774e98f1204c8139c492 Mon Sep 17 00:00:00 2001 From: computations Date: Thu, 28 Jan 2021 11:46:18 +0100 Subject: [PATCH 2/2] Switches the libpll to the repo branch --- .gitmodules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 6c7d404..1f97f2b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "libpll"] path = libs/libpll - url = https://github.com/xflouris/libpll-2.git - branch = master + url = https://github.com/computations/libpll-2.git + branch = floating_weights