From 33284a250582ebc8c84c1496dd056382c3f6d9c7 Mon Sep 17 00:00:00 2001 From: Amine Ghozlane Date: Tue, 26 Nov 2024 11:00:59 +0100 Subject: [PATCH] Fix distance matrix --- meteor/phylogeny.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/meteor/phylogeny.py b/meteor/phylogeny.py index fc72877..534265d 100644 --- a/meteor/phylogeny.py +++ b/meteor/phylogeny.py @@ -175,11 +175,12 @@ def process_msp_file( if self.gtr: d = EstimateDistances(aligned_seqs, submodel=GTR()) d.run(show_progress=False) + # Create UPGMA Tree + mycluster = upgma(d.get_pairwise_distances()) else: - d = aligned_seqs.distance_matrix(calc="tn93", show_progress=False) + dists = aligned_seqs.distance_matrix(calc="tn93", show_progress=False) + mycluster = upgma(dists) - # Create UPGMA Tree - mycluster = upgma(d.get_pairwise_distances()) mycluster = mycluster.unrooted_deepcopy() with tree_file.open("w") as f: