Skip to content

Commit

Permalink
NRI/NTI: Avoid recalculation of most probably LCA depths
Browse files Browse the repository at this point in the history
Fixes regression introduced in d852492

Updates #786
  • Loading branch information
shawnlaffan committed Apr 30, 2021
1 parent 81f7b6a commit fa49008
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Biodiverse/Indices/PhyloCom.pm
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@ sub _calc_phylo_mpd_mntd {

my $last_shared_ancestor_mx = $args{PHYLO_LCA_MX}
|| croak "Argument PHYLO_LCA_MX not defined";
my $most_probable_lca_depths
= $tree_ref->get_most_probable_lca_depths;

# make the code cleaner below
my %common_args_for_path_call = (
Expand All @@ -315,7 +317,7 @@ sub _calc_phylo_mpd_mntd {
last_shared_ancestor_mx
=> $last_shared_ancestor_mx,
most_probable_lca_depths
=> scalar $tree_ref->get_most_probable_lca_depths,
=> $most_probable_lca_depths,
nri_nti_generation => $nri_nti_generation,
tree_is_ultrametric => $tree_is_ultrametric,
);
Expand Down

0 comments on commit fa49008

Please sign in to comment.