phykit 2.1.50__tar.gz → 2.1.51__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {phykit-2.1.50 → phykit-2.1.51}/PKG-INFO +1 -1
- {phykit-2.1.50 → phykit-2.1.51}/phykit/helpers/plot_config.py +30 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/phykit.py +141 -29
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/ancestral_reconstruction.py +23 -17
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/character_map.py +4 -21
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/concordance_asr.py +12 -9
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/cont_map.py +12 -9
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/cophylo.py +12 -9
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/density_map.py +12 -9
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/discordance_asymmetry.py +12 -9
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/phylo_heatmap.py +11 -8
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/quartet_pie.py +11 -8
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/rate_heterogeneity.py +11 -8
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/stochastic_character_map.py +12 -9
- phykit-2.1.51/phykit/version.py +1 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit.egg-info/PKG-INFO +1 -1
- phykit-2.1.50/phykit/version.py +0 -1
- {phykit-2.1.50 → phykit-2.1.51}/LICENSE.md +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/README.md +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/__init__.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/__main__.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/cli_registry.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/errors.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/helpers/__init__.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/helpers/boolean_argument_parsing.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/helpers/caching.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/helpers/discrete_models.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/helpers/files.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/helpers/json_output.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/helpers/parallel.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/helpers/parsimony_utils.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/helpers/quartet_utils.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/helpers/stats_summary.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/helpers/streaming.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/service_factories.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/__init__.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/alignment/__init__.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/alignment/alignment_entropy.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/alignment/alignment_length.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/alignment/alignment_length_no_gaps.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/alignment/alignment_outlier_taxa.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/alignment/alignment_recoding.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/alignment/base.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/alignment/column_score.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/alignment/composition_per_taxon.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/alignment/compositional_bias_per_site.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/alignment/create_concatenation_matrix.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/alignment/dna_threader.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/alignment/evolutionary_rate_per_site.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/alignment/faidx.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/alignment/gc_content.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/alignment/mask_alignment.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/alignment/occupancy_per_taxon.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/alignment/pairwise_identity.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/alignment/parsimony_informative_sites.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/alignment/plot_alignment_qc.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/alignment/rcv.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/alignment/rcvt.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/alignment/rename_fasta_entries.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/alignment/sum_of_pairs_score.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/alignment/variable_sites.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/base.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/__init__.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/base.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/bipartition_support_stats.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/branch_length_multiplier.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/collapse_branches.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/consensus_network.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/consensus_tree.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/covarying_evolutionary_rates.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/dvmc.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/evo_tempo_map.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/evolutionary_rate.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/fit_continuous.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/fit_discrete.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/hidden_paralogy_check.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/independent_contrasts.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/internal_branch_stats.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/internode_labeler.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/kf_distance.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/last_common_ancestor_subtree.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/lb_score.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/ltt.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/monophyly_check.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/nearest_neighbor_interchange.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/network_signal.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/ou_shift_detection.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/ouwie.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/parsimony_score.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/patristic_distances.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/phenogram.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/phylogenetic_glm.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/phylogenetic_ordination.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/phylogenetic_regression.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/phylogenetic_signal.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/phylomorphospace.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/polytomy_test.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/print_tree.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/prune_tree.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/quartet_network.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/relative_rate_test.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/rename_tree_tips.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/rf_distance.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/root_tree.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/saturation.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/spectral_discordance.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/spurious_sequence.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/terminal_branch_stats.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/threshold_model.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/tip_labels.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/tip_to_tip_distance.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/tip_to_tip_node_distance.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/total_tree_length.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/treeness.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/treeness_over_rcv.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit/services/tree/vcv_utils.py +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit.egg-info/SOURCES.txt +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit.egg-info/dependency_links.txt +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit.egg-info/entry_points.txt +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit.egg-info/requires.txt +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/phykit.egg-info/top_level.txt +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/setup.cfg +0 -0
- {phykit-2.1.50 → phykit-2.1.51}/setup.py +0 -0
|
@@ -24,6 +24,7 @@ class PlotConfig:
|
|
|
24
24
|
axis_fontsize: Optional[float] = None
|
|
25
25
|
colors: Optional[List[str]] = None
|
|
26
26
|
ladderize: bool = False
|
|
27
|
+
cladogram: bool = False
|
|
27
28
|
|
|
28
29
|
def validate(self) -> None:
|
|
29
30
|
if self.fig_width is not None and self.fig_width <= 0:
|
|
@@ -189,6 +190,7 @@ class PlotConfig:
|
|
|
189
190
|
axis_fontsize=getattr(args, "axis_fontsize", None),
|
|
190
191
|
colors=colors,
|
|
191
192
|
ladderize=getattr(args, "ladderize", False),
|
|
193
|
+
cladogram=getattr(args, "cladogram", False),
|
|
192
194
|
)
|
|
193
195
|
config.validate()
|
|
194
196
|
return config
|
|
@@ -208,3 +210,31 @@ def add_plot_arguments(parser) -> None:
|
|
|
208
210
|
group.add_argument("--axis-fontsize", type=float, default=None, help="Font size for axis labels")
|
|
209
211
|
group.add_argument("--colors", type=str, default=None, help="Comma-separated colors (hex or named)")
|
|
210
212
|
group.add_argument("--ladderize", action="store_true", default=False, help="Ladderize (sort) the tree before plotting")
|
|
213
|
+
group.add_argument("--cladogram", action="store_true", default=False, help="Draw cladogram (equal branch lengths, tips aligned) instead of phylogram")
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
def compute_node_x_cladogram(tree, parent_map):
|
|
217
|
+
"""Compute cladogram x-coordinates: tips aligned at right, internal nodes at depth.
|
|
218
|
+
|
|
219
|
+
Returns dict mapping node id -> x-coordinate (0.0 to 1.0 range).
|
|
220
|
+
"""
|
|
221
|
+
root = tree.root
|
|
222
|
+
node_depth = {}
|
|
223
|
+
for clade in tree.find_clades(order="preorder"):
|
|
224
|
+
if clade == root:
|
|
225
|
+
node_depth[id(clade)] = 0
|
|
226
|
+
elif id(clade) in parent_map:
|
|
227
|
+
parent = parent_map[id(clade)]
|
|
228
|
+
node_depth[id(clade)] = node_depth.get(id(parent), 0) + 1
|
|
229
|
+
|
|
230
|
+
max_depth = max(node_depth.values()) if node_depth else 1
|
|
231
|
+
step_size = 1.0 / max(max_depth, 1)
|
|
232
|
+
|
|
233
|
+
node_x = {}
|
|
234
|
+
for clade in tree.find_clades(order="preorder"):
|
|
235
|
+
cid = id(clade)
|
|
236
|
+
if clade.is_terminal():
|
|
237
|
+
node_x[cid] = float(max_depth) * step_size
|
|
238
|
+
else:
|
|
239
|
+
node_x[cid] = float(node_depth.get(cid, 0)) * step_size
|
|
240
|
+
return node_x
|
|
@@ -466,7 +466,7 @@ class Phykit:
|
|
|
466
466
|
[--legend-position <str>]
|
|
467
467
|
[--ylabel-fontsize <float>] [--xlabel-fontsize <float>]
|
|
468
468
|
[--title-fontsize <float>] [--axis-fontsize <float>]
|
|
469
|
-
[--colors <str>] [--ladderize]
|
|
469
|
+
[--colors <str>] [--ladderize] [--cladogram]
|
|
470
470
|
[--json]
|
|
471
471
|
|
|
472
472
|
Options
|
|
@@ -517,6 +517,10 @@ class Phykit:
|
|
|
517
517
|
--ladderize ladderize (sort) the tree
|
|
518
518
|
before plotting
|
|
519
519
|
|
|
520
|
+
--cladogram draw cladogram (equal branch
|
|
521
|
+
lengths, tips aligned)
|
|
522
|
+
instead of phylogram
|
|
523
|
+
|
|
520
524
|
--json optional argument to output
|
|
521
525
|
results as JSON
|
|
522
526
|
"""
|
|
@@ -821,7 +825,7 @@ class Phykit:
|
|
|
821
825
|
[--legend-position <str>]
|
|
822
826
|
[--ylabel-fontsize <float>] [--xlabel-fontsize <float>]
|
|
823
827
|
[--title-fontsize <float>] [--axis-fontsize <float>]
|
|
824
|
-
[--colors <str>] [--ladderize]
|
|
828
|
+
[--colors <str>] [--ladderize] [--cladogram]
|
|
825
829
|
[--json]
|
|
826
830
|
|
|
827
831
|
Options
|
|
@@ -870,6 +874,10 @@ class Phykit:
|
|
|
870
874
|
--ladderize ladderize (sort) the tree
|
|
871
875
|
before plotting
|
|
872
876
|
|
|
877
|
+
--cladogram draw cladogram (equal branch
|
|
878
|
+
lengths, tips aligned)
|
|
879
|
+
instead of phylogram
|
|
880
|
+
|
|
873
881
|
--json optional argument to output
|
|
874
882
|
results as JSON
|
|
875
883
|
"""
|
|
@@ -955,7 +963,7 @@ class Phykit:
|
|
|
955
963
|
[--legend-position <str>]
|
|
956
964
|
[--ylabel-fontsize <float>] [--xlabel-fontsize <float>]
|
|
957
965
|
[--title-fontsize <float>] [--axis-fontsize <float>]
|
|
958
|
-
[--colors <str>] [--ladderize]
|
|
966
|
+
[--colors <str>] [--ladderize] [--cladogram]
|
|
959
967
|
[--json]
|
|
960
968
|
|
|
961
969
|
Options
|
|
@@ -1003,6 +1011,10 @@ class Phykit:
|
|
|
1003
1011
|
--ladderize ladderize (sort) the tree
|
|
1004
1012
|
before plotting
|
|
1005
1013
|
|
|
1014
|
+
--cladogram draw cladogram (equal branch
|
|
1015
|
+
lengths, tips aligned)
|
|
1016
|
+
instead of phylogram
|
|
1017
|
+
|
|
1006
1018
|
--json optional argument to output
|
|
1007
1019
|
results as JSON
|
|
1008
1020
|
"""
|
|
@@ -1309,7 +1321,7 @@ class Phykit:
|
|
|
1309
1321
|
[--legend-position <str>]
|
|
1310
1322
|
[--ylabel-fontsize <float>] [--xlabel-fontsize <float>]
|
|
1311
1323
|
[--title-fontsize <float>] [--axis-fontsize <float>]
|
|
1312
|
-
[--colors <str>] [--ladderize]
|
|
1324
|
+
[--colors <str>] [--ladderize] [--cladogram]
|
|
1313
1325
|
[--json]
|
|
1314
1326
|
|
|
1315
1327
|
Options
|
|
@@ -1362,6 +1374,10 @@ class Phykit:
|
|
|
1362
1374
|
--ladderize ladderize (sort) the tree
|
|
1363
1375
|
before plotting
|
|
1364
1376
|
|
|
1377
|
+
--cladogram draw cladogram (equal branch
|
|
1378
|
+
lengths, tips aligned)
|
|
1379
|
+
instead of phylogram
|
|
1380
|
+
|
|
1365
1381
|
--json optional argument to output
|
|
1366
1382
|
results as JSON
|
|
1367
1383
|
"""
|
|
@@ -1499,7 +1515,7 @@ class Phykit:
|
|
|
1499
1515
|
[--legend-position <str>]
|
|
1500
1516
|
[--ylabel-fontsize <float>] [--xlabel-fontsize <float>]
|
|
1501
1517
|
[--title-fontsize <float>] [--axis-fontsize <float>]
|
|
1502
|
-
[--colors <str>] [--ladderize]
|
|
1518
|
+
[--colors <str>] [--ladderize] [--cladogram]
|
|
1503
1519
|
[--json]
|
|
1504
1520
|
|
|
1505
1521
|
Options
|
|
@@ -1547,6 +1563,10 @@ class Phykit:
|
|
|
1547
1563
|
--ladderize ladderize (sort) the tree
|
|
1548
1564
|
before plotting
|
|
1549
1565
|
|
|
1566
|
+
--cladogram draw cladogram (equal branch
|
|
1567
|
+
lengths, tips aligned)
|
|
1568
|
+
instead of phylogram
|
|
1569
|
+
|
|
1550
1570
|
--json optional argument to output
|
|
1551
1571
|
results as JSON
|
|
1552
1572
|
"""
|
|
@@ -1793,7 +1813,7 @@ class Phykit:
|
|
|
1793
1813
|
[--legend-position <str>]
|
|
1794
1814
|
[--ylabel-fontsize <float>] [--xlabel-fontsize <float>]
|
|
1795
1815
|
[--title-fontsize <float>] [--axis-fontsize <float>]
|
|
1796
|
-
[--colors <str>] [--ladderize]
|
|
1816
|
+
[--colors <str>] [--ladderize] [--cladogram]
|
|
1797
1817
|
|
|
1798
1818
|
Options
|
|
1799
1819
|
=====================================================
|
|
@@ -1947,7 +1967,7 @@ class Phykit:
|
|
|
1947
1967
|
[--legend-position <str>]
|
|
1948
1968
|
[--ylabel-fontsize <float>] [--xlabel-fontsize <float>]
|
|
1949
1969
|
[--title-fontsize <float>] [--axis-fontsize <float>]
|
|
1950
|
-
[--colors <str>] [--ladderize]
|
|
1970
|
+
[--colors <str>] [--ladderize] [--cladogram]
|
|
1951
1971
|
[--json]
|
|
1952
1972
|
|
|
1953
1973
|
Options
|
|
@@ -2007,6 +2027,10 @@ class Phykit:
|
|
|
2007
2027
|
--ladderize ladderize (sort) the tree
|
|
2008
2028
|
before plotting
|
|
2009
2029
|
|
|
2030
|
+
--cladogram draw cladogram (equal branch
|
|
2031
|
+
lengths, tips aligned)
|
|
2032
|
+
instead of phylogram
|
|
2033
|
+
|
|
2010
2034
|
--json output results as JSON
|
|
2011
2035
|
"""
|
|
2012
2036
|
),
|
|
@@ -2080,7 +2104,7 @@ class Phykit:
|
|
|
2080
2104
|
[--legend-position <str>]
|
|
2081
2105
|
[--ylabel-fontsize <float>] [--xlabel-fontsize <float>]
|
|
2082
2106
|
[--title-fontsize <float>] [--axis-fontsize <float>]
|
|
2083
|
-
[--colors <str>] [--ladderize]
|
|
2107
|
+
[--colors <str>] [--ladderize] [--cladogram]
|
|
2084
2108
|
[--json]
|
|
2085
2109
|
|
|
2086
2110
|
Options
|
|
@@ -2141,6 +2165,10 @@ class Phykit:
|
|
|
2141
2165
|
--ladderize ladderize (sort) the tree
|
|
2142
2166
|
before plotting
|
|
2143
2167
|
|
|
2168
|
+
--cladogram draw cladogram (equal branch
|
|
2169
|
+
lengths, tips aligned)
|
|
2170
|
+
instead of phylogram
|
|
2171
|
+
|
|
2144
2172
|
--json output results as JSON
|
|
2145
2173
|
"""
|
|
2146
2174
|
),
|
|
@@ -2371,7 +2399,7 @@ class Phykit:
|
|
|
2371
2399
|
[--legend-position <str>]
|
|
2372
2400
|
[--ylabel-fontsize <float>] [--xlabel-fontsize <float>]
|
|
2373
2401
|
[--title-fontsize <float>] [--axis-fontsize <float>]
|
|
2374
|
-
[--colors <str>] [--ladderize]
|
|
2402
|
+
[--colors <str>] [--ladderize] [--cladogram]
|
|
2375
2403
|
[--json]
|
|
2376
2404
|
|
|
2377
2405
|
Options
|
|
@@ -2432,6 +2460,10 @@ class Phykit:
|
|
|
2432
2460
|
--ladderize ladderize (sort) the tree
|
|
2433
2461
|
before plotting
|
|
2434
2462
|
|
|
2463
|
+
--cladogram draw cladogram (equal branch
|
|
2464
|
+
lengths, tips aligned)
|
|
2465
|
+
instead of phylogram
|
|
2466
|
+
|
|
2435
2467
|
--json optional argument to output
|
|
2436
2468
|
results as JSON
|
|
2437
2469
|
"""
|
|
@@ -3045,7 +3077,7 @@ class Phykit:
|
|
|
3045
3077
|
[--legend-position <str>]
|
|
3046
3078
|
[--ylabel-fontsize <float>] [--xlabel-fontsize <float>]
|
|
3047
3079
|
[--title-fontsize <float>] [--axis-fontsize <float>]
|
|
3048
|
-
[--colors <str>] [--ladderize]
|
|
3080
|
+
[--colors <str>] [--ladderize] [--cladogram]
|
|
3049
3081
|
[--json]
|
|
3050
3082
|
|
|
3051
3083
|
Options
|
|
@@ -3134,6 +3166,10 @@ class Phykit:
|
|
|
3134
3166
|
--ladderize ladderize (sort) the tree
|
|
3135
3167
|
before plotting
|
|
3136
3168
|
|
|
3169
|
+
--cladogram draw cladogram (equal branch
|
|
3170
|
+
lengths, tips aligned)
|
|
3171
|
+
instead of phylogram
|
|
3172
|
+
|
|
3137
3173
|
--json optional argument to output
|
|
3138
3174
|
results as JSON
|
|
3139
3175
|
"""
|
|
@@ -3383,7 +3419,7 @@ class Phykit:
|
|
|
3383
3419
|
[--legend-position <str>]
|
|
3384
3420
|
[--ylabel-fontsize <float>] [--xlabel-fontsize <float>]
|
|
3385
3421
|
[--title-fontsize <float>] [--axis-fontsize <float>]
|
|
3386
|
-
[--colors <str>] [--ladderize]
|
|
3422
|
+
[--colors <str>] [--ladderize] [--cladogram]
|
|
3387
3423
|
[--json]
|
|
3388
3424
|
|
|
3389
3425
|
Options
|
|
@@ -3438,6 +3474,10 @@ class Phykit:
|
|
|
3438
3474
|
--ladderize ladderize (sort) the tree
|
|
3439
3475
|
before plotting
|
|
3440
3476
|
|
|
3477
|
+
--cladogram draw cladogram (equal branch
|
|
3478
|
+
lengths, tips aligned)
|
|
3479
|
+
instead of phylogram
|
|
3480
|
+
|
|
3441
3481
|
--json optional argument to output
|
|
3442
3482
|
results as JSON
|
|
3443
3483
|
"""
|
|
@@ -3737,7 +3777,7 @@ class Phykit:
|
|
|
3737
3777
|
[--legend-position <str>]
|
|
3738
3778
|
[--ylabel-fontsize <float>] [--xlabel-fontsize <float>]
|
|
3739
3779
|
[--title-fontsize <float>] [--axis-fontsize <float>]
|
|
3740
|
-
[--colors <str>] [--ladderize]
|
|
3780
|
+
[--colors <str>] [--ladderize] [--cladogram]
|
|
3741
3781
|
[--json]
|
|
3742
3782
|
|
|
3743
3783
|
Options
|
|
@@ -3795,6 +3835,10 @@ class Phykit:
|
|
|
3795
3835
|
--ladderize ladderize (sort) the tree
|
|
3796
3836
|
before plotting
|
|
3797
3837
|
|
|
3838
|
+
--cladogram draw cladogram (equal branch
|
|
3839
|
+
lengths, tips aligned)
|
|
3840
|
+
instead of phylogram
|
|
3841
|
+
|
|
3798
3842
|
--json optional argument to output
|
|
3799
3843
|
results as JSON
|
|
3800
3844
|
"""
|
|
@@ -3865,7 +3909,7 @@ class Phykit:
|
|
|
3865
3909
|
[--legend-position <str>]
|
|
3866
3910
|
[--ylabel-fontsize <float>] [--xlabel-fontsize <float>]
|
|
3867
3911
|
[--title-fontsize <float>] [--axis-fontsize <float>]
|
|
3868
|
-
[--colors <str>] [--ladderize]
|
|
3912
|
+
[--colors <str>] [--ladderize] [--cladogram]
|
|
3869
3913
|
[--json]
|
|
3870
3914
|
|
|
3871
3915
|
Options
|
|
@@ -3911,6 +3955,10 @@ class Phykit:
|
|
|
3911
3955
|
--ladderize ladderize (sort) the tree
|
|
3912
3956
|
before plotting
|
|
3913
3957
|
|
|
3958
|
+
--cladogram draw cladogram (equal branch
|
|
3959
|
+
lengths, tips aligned)
|
|
3960
|
+
instead of phylogram
|
|
3961
|
+
|
|
3914
3962
|
--json optional argument to also
|
|
3915
3963
|
output results as JSON
|
|
3916
3964
|
"""
|
|
@@ -3960,7 +4008,7 @@ class Phykit:
|
|
|
3960
4008
|
[--legend-position <str>]
|
|
3961
4009
|
[--ylabel-fontsize <float>] [--xlabel-fontsize <float>]
|
|
3962
4010
|
[--title-fontsize <float>] [--axis-fontsize <float>]
|
|
3963
|
-
[--colors <str>] [--ladderize]
|
|
4011
|
+
[--colors <str>] [--ladderize] [--cladogram]
|
|
3964
4012
|
[--json]
|
|
3965
4013
|
|
|
3966
4014
|
Options
|
|
@@ -4016,6 +4064,10 @@ class Phykit:
|
|
|
4016
4064
|
--ladderize ladderize (sort) the tree
|
|
4017
4065
|
before plotting
|
|
4018
4066
|
|
|
4067
|
+
--cladogram draw cladogram (equal branch
|
|
4068
|
+
lengths, tips aligned)
|
|
4069
|
+
instead of phylogram
|
|
4070
|
+
|
|
4019
4071
|
--json optional argument to also
|
|
4020
4072
|
output results as JSON
|
|
4021
4073
|
"""
|
|
@@ -4070,7 +4122,7 @@ class Phykit:
|
|
|
4070
4122
|
[--legend-position <str>]
|
|
4071
4123
|
[--ylabel-fontsize <float>] [--xlabel-fontsize <float>]
|
|
4072
4124
|
[--title-fontsize <float>] [--axis-fontsize <float>]
|
|
4073
|
-
[--colors <str>] [--ladderize]
|
|
4125
|
+
[--colors <str>] [--ladderize] [--cladogram]
|
|
4074
4126
|
[--json]
|
|
4075
4127
|
|
|
4076
4128
|
Options
|
|
@@ -4116,6 +4168,10 @@ class Phykit:
|
|
|
4116
4168
|
--ladderize ladderize (sort) the tree
|
|
4117
4169
|
before plotting
|
|
4118
4170
|
|
|
4171
|
+
--cladogram draw cladogram (equal branch
|
|
4172
|
+
lengths, tips aligned)
|
|
4173
|
+
instead of phylogram
|
|
4174
|
+
|
|
4119
4175
|
--json optional argument to output
|
|
4120
4176
|
results as JSON
|
|
4121
4177
|
"""
|
|
@@ -4162,7 +4218,7 @@ class Phykit:
|
|
|
4162
4218
|
[--legend-position <str>]
|
|
4163
4219
|
[--ylabel-fontsize <float>] [--xlabel-fontsize <float>]
|
|
4164
4220
|
[--title-fontsize <float>] [--axis-fontsize <float>]
|
|
4165
|
-
[--colors <str>] [--ladderize]
|
|
4221
|
+
[--colors <str>] [--ladderize] [--cladogram]
|
|
4166
4222
|
[--json]
|
|
4167
4223
|
|
|
4168
4224
|
Options
|
|
@@ -4211,6 +4267,10 @@ class Phykit:
|
|
|
4211
4267
|
--ladderize ladderize (sort) the tree
|
|
4212
4268
|
before plotting
|
|
4213
4269
|
|
|
4270
|
+
--cladogram draw cladogram (equal branch
|
|
4271
|
+
lengths, tips aligned)
|
|
4272
|
+
instead of phylogram
|
|
4273
|
+
|
|
4214
4274
|
--json optional argument to output
|
|
4215
4275
|
results as JSON
|
|
4216
4276
|
"""
|
|
@@ -4264,7 +4324,7 @@ class Phykit:
|
|
|
4264
4324
|
[--legend-position <str>]
|
|
4265
4325
|
[--ylabel-fontsize <float>] [--xlabel-fontsize <float>]
|
|
4266
4326
|
[--title-fontsize <float>] [--axis-fontsize <float>]
|
|
4267
|
-
[--colors <str>] [--ladderize]
|
|
4327
|
+
[--colors <str>] [--ladderize] [--cladogram]
|
|
4268
4328
|
[--json]
|
|
4269
4329
|
|
|
4270
4330
|
Options
|
|
@@ -4319,6 +4379,10 @@ class Phykit:
|
|
|
4319
4379
|
--ladderize ladderize (sort) the tree
|
|
4320
4380
|
before plotting
|
|
4321
4381
|
|
|
4382
|
+
--cladogram draw cladogram (equal branch
|
|
4383
|
+
lengths, tips aligned)
|
|
4384
|
+
instead of phylogram
|
|
4385
|
+
|
|
4322
4386
|
--json optional argument to output
|
|
4323
4387
|
results as JSON
|
|
4324
4388
|
"""
|
|
@@ -4806,7 +4870,7 @@ class Phykit:
|
|
|
4806
4870
|
[--legend-position <str>]
|
|
4807
4871
|
[--ylabel-fontsize <float>] [--xlabel-fontsize <float>]
|
|
4808
4872
|
[--title-fontsize <float>] [--axis-fontsize <float>]
|
|
4809
|
-
[--colors <str>] [--ladderize]
|
|
4873
|
+
[--colors <str>] [--ladderize] [--cladogram]
|
|
4810
4874
|
[--json]
|
|
4811
4875
|
|
|
4812
4876
|
Options
|
|
@@ -4860,6 +4924,10 @@ class Phykit:
|
|
|
4860
4924
|
--ladderize ladderize (sort) the tree
|
|
4861
4925
|
before plotting
|
|
4862
4926
|
|
|
4927
|
+
--cladogram draw cladogram (equal branch
|
|
4928
|
+
lengths, tips aligned)
|
|
4929
|
+
instead of phylogram
|
|
4930
|
+
|
|
4863
4931
|
--json optional argument to output
|
|
4864
4932
|
results as JSON
|
|
4865
4933
|
"""
|
|
@@ -4924,7 +4992,7 @@ class Phykit:
|
|
|
4924
4992
|
[--legend-position <str>]
|
|
4925
4993
|
[--ylabel-fontsize <float>] [--xlabel-fontsize <float>]
|
|
4926
4994
|
[--title-fontsize <float>] [--axis-fontsize <float>]
|
|
4927
|
-
[--colors <str>] [--ladderize]
|
|
4995
|
+
[--colors <str>] [--ladderize] [--cladogram]
|
|
4928
4996
|
|
|
4929
4997
|
Options
|
|
4930
4998
|
=====================================================
|
|
@@ -4976,6 +5044,10 @@ class Phykit:
|
|
|
4976
5044
|
--ladderize ladderize (sort) the tree
|
|
4977
5045
|
before plotting
|
|
4978
5046
|
|
|
5047
|
+
--cladogram draw cladogram (equal branch
|
|
5048
|
+
lengths, tips aligned)
|
|
5049
|
+
instead of phylogram
|
|
5050
|
+
|
|
4979
5051
|
--json optional argument to output
|
|
4980
5052
|
per-node concordance as JSON
|
|
4981
5053
|
"""
|
|
@@ -5047,7 +5119,7 @@ class Phykit:
|
|
|
5047
5119
|
[--legend-position <str>]
|
|
5048
5120
|
[--ylabel-fontsize <float>] [--xlabel-fontsize <float>]
|
|
5049
5121
|
[--title-fontsize <float>] [--axis-fontsize <float>]
|
|
5050
|
-
[--colors <str>] [--ladderize]
|
|
5122
|
+
[--colors <str>] [--ladderize] [--cladogram]
|
|
5051
5123
|
[--json]
|
|
5052
5124
|
|
|
5053
5125
|
Options
|
|
@@ -5107,6 +5179,10 @@ class Phykit:
|
|
|
5107
5179
|
--ladderize ladderize (sort) the tree
|
|
5108
5180
|
before plotting
|
|
5109
5181
|
|
|
5182
|
+
--cladogram draw cladogram (equal branch
|
|
5183
|
+
lengths, tips aligned)
|
|
5184
|
+
instead of phylogram
|
|
5185
|
+
|
|
5110
5186
|
--json optional argument to output
|
|
5111
5187
|
results as JSON
|
|
5112
5188
|
"""
|
|
@@ -5272,7 +5348,7 @@ class Phykit:
|
|
|
5272
5348
|
[--legend-position <str>]
|
|
5273
5349
|
[--ylabel-fontsize <float>] [--xlabel-fontsize <float>]
|
|
5274
5350
|
[--title-fontsize <float>] [--axis-fontsize <float>]
|
|
5275
|
-
[--colors <str>] [--ladderize]
|
|
5351
|
+
[--colors <str>] [--ladderize] [--cladogram]
|
|
5276
5352
|
[--json]
|
|
5277
5353
|
|
|
5278
5354
|
Options
|
|
@@ -5321,6 +5397,10 @@ class Phykit:
|
|
|
5321
5397
|
--ladderize ladderize (sort) the tree
|
|
5322
5398
|
before plotting
|
|
5323
5399
|
|
|
5400
|
+
--cladogram draw cladogram (equal branch
|
|
5401
|
+
lengths, tips aligned)
|
|
5402
|
+
instead of phylogram
|
|
5403
|
+
|
|
5324
5404
|
--json optional argument to output
|
|
5325
5405
|
results as JSON
|
|
5326
5406
|
"""
|
|
@@ -5429,7 +5509,7 @@ class Phykit:
|
|
|
5429
5509
|
[--legend-position <str>]
|
|
5430
5510
|
[--ylabel-fontsize <float>] [--xlabel-fontsize <float>]
|
|
5431
5511
|
[--title-fontsize <float>] [--axis-fontsize <float>]
|
|
5432
|
-
[--colors <str>] [--ladderize]
|
|
5512
|
+
[--colors <str>] [--ladderize] [--cladogram]
|
|
5433
5513
|
[--json]
|
|
5434
5514
|
|
|
5435
5515
|
Options
|
|
@@ -5480,6 +5560,10 @@ class Phykit:
|
|
|
5480
5560
|
--ladderize ladderize (sort) the tree
|
|
5481
5561
|
before plotting
|
|
5482
5562
|
|
|
5563
|
+
--cladogram draw cladogram (equal branch
|
|
5564
|
+
lengths, tips aligned)
|
|
5565
|
+
instead of phylogram
|
|
5566
|
+
|
|
5483
5567
|
--json optional argument to output
|
|
5484
5568
|
results as JSON
|
|
5485
5569
|
"""
|
|
@@ -5539,7 +5623,7 @@ class Phykit:
|
|
|
5539
5623
|
[--legend-position <str>]
|
|
5540
5624
|
[--ylabel-fontsize <float>] [--xlabel-fontsize <float>]
|
|
5541
5625
|
[--title-fontsize <float>] [--axis-fontsize <float>]
|
|
5542
|
-
[--colors <str>] [--ladderize]
|
|
5626
|
+
[--colors <str>] [--ladderize] [--cladogram]
|
|
5543
5627
|
[--json]
|
|
5544
5628
|
|
|
5545
5629
|
Options
|
|
@@ -5606,6 +5690,10 @@ class Phykit:
|
|
|
5606
5690
|
--ladderize ladderize (sort) the tree
|
|
5607
5691
|
before plotting
|
|
5608
5692
|
|
|
5693
|
+
--cladogram draw cladogram (equal branch
|
|
5694
|
+
lengths, tips aligned)
|
|
5695
|
+
instead of phylogram
|
|
5696
|
+
|
|
5609
5697
|
--json optional argument to output
|
|
5610
5698
|
results as JSON
|
|
5611
5699
|
"""
|
|
@@ -6005,7 +6093,7 @@ class Phykit:
|
|
|
6005
6093
|
[--legend-position <str>]
|
|
6006
6094
|
[--ylabel-fontsize <float>] [--xlabel-fontsize <float>]
|
|
6007
6095
|
[--title-fontsize <float>] [--axis-fontsize <float>]
|
|
6008
|
-
[--colors <str>] [--ladderize]
|
|
6096
|
+
[--colors <str>] [--ladderize] [--cladogram]
|
|
6009
6097
|
[--json]
|
|
6010
6098
|
|
|
6011
6099
|
Options
|
|
@@ -6065,6 +6153,10 @@ class Phykit:
|
|
|
6065
6153
|
--ladderize ladderize (sort) the tree
|
|
6066
6154
|
before plotting
|
|
6067
6155
|
|
|
6156
|
+
--cladogram draw cladogram (equal branch
|
|
6157
|
+
lengths, tips aligned)
|
|
6158
|
+
instead of phylogram
|
|
6159
|
+
|
|
6068
6160
|
--json optional argument to output
|
|
6069
6161
|
results as JSON
|
|
6070
6162
|
"""
|
|
@@ -6244,7 +6336,7 @@ class Phykit:
|
|
|
6244
6336
|
[--legend-position <str>]
|
|
6245
6337
|
[--ylabel-fontsize <float>] [--xlabel-fontsize <float>]
|
|
6246
6338
|
[--title-fontsize <float>] [--axis-fontsize <float>]
|
|
6247
|
-
[--colors <str>] [--ladderize]
|
|
6339
|
+
[--colors <str>] [--ladderize] [--cladogram]
|
|
6248
6340
|
[--json]
|
|
6249
6341
|
|
|
6250
6342
|
Options
|
|
@@ -6298,6 +6390,10 @@ class Phykit:
|
|
|
6298
6390
|
--ladderize ladderize (sort) the tree
|
|
6299
6391
|
before plotting
|
|
6300
6392
|
|
|
6393
|
+
--cladogram draw cladogram (equal branch
|
|
6394
|
+
lengths, tips aligned)
|
|
6395
|
+
instead of phylogram
|
|
6396
|
+
|
|
6301
6397
|
--json optional argument to output
|
|
6302
6398
|
results as JSON
|
|
6303
6399
|
"""
|
|
@@ -6416,7 +6512,7 @@ class Phykit:
|
|
|
6416
6512
|
[--legend-position <str>]
|
|
6417
6513
|
[--ylabel-fontsize <float>] [--xlabel-fontsize <float>]
|
|
6418
6514
|
[--title-fontsize <float>] [--axis-fontsize <float>]
|
|
6419
|
-
[--colors <str>] [--ladderize]
|
|
6515
|
+
[--colors <str>] [--ladderize] [--cladogram]
|
|
6420
6516
|
[--json]
|
|
6421
6517
|
|
|
6422
6518
|
Options
|
|
@@ -6464,6 +6560,10 @@ class Phykit:
|
|
|
6464
6560
|
--ladderize ladderize (sort) the tree
|
|
6465
6561
|
before plotting
|
|
6466
6562
|
|
|
6563
|
+
--cladogram draw cladogram (equal branch
|
|
6564
|
+
lengths, tips aligned)
|
|
6565
|
+
instead of phylogram
|
|
6566
|
+
|
|
6467
6567
|
--json optional argument to output
|
|
6468
6568
|
results as JSON
|
|
6469
6569
|
"""
|
|
@@ -6519,7 +6619,7 @@ class Phykit:
|
|
|
6519
6619
|
[--legend-position <str>]
|
|
6520
6620
|
[--ylabel-fontsize <float>] [--xlabel-fontsize <float>]
|
|
6521
6621
|
[--title-fontsize <float>] [--axis-fontsize <float>]
|
|
6522
|
-
[--colors <str>] [--ladderize]
|
|
6622
|
+
[--colors <str>] [--ladderize] [--cladogram]
|
|
6523
6623
|
[--json]
|
|
6524
6624
|
|
|
6525
6625
|
Options
|
|
@@ -6566,6 +6666,10 @@ class Phykit:
|
|
|
6566
6666
|
--ladderize ladderize (sort) the tree
|
|
6567
6667
|
before plotting
|
|
6568
6668
|
|
|
6669
|
+
--cladogram draw cladogram (equal branch
|
|
6670
|
+
lengths, tips aligned)
|
|
6671
|
+
instead of phylogram
|
|
6672
|
+
|
|
6569
6673
|
--json optional argument to output
|
|
6570
6674
|
results as JSON
|
|
6571
6675
|
"""
|
|
@@ -6628,7 +6732,7 @@ class Phykit:
|
|
|
6628
6732
|
[--legend-position <str>]
|
|
6629
6733
|
[--ylabel-fontsize <float>] [--xlabel-fontsize <float>]
|
|
6630
6734
|
[--title-fontsize <float>] [--axis-fontsize <float>]
|
|
6631
|
-
[--colors <str>] [--ladderize]
|
|
6735
|
+
[--colors <str>] [--ladderize] [--cladogram]
|
|
6632
6736
|
[--json]
|
|
6633
6737
|
|
|
6634
6738
|
Options
|
|
@@ -6689,6 +6793,10 @@ class Phykit:
|
|
|
6689
6793
|
--ladderize ladderize (sort) the tree
|
|
6690
6794
|
before plotting
|
|
6691
6795
|
|
|
6796
|
+
--cladogram draw cladogram (equal branch
|
|
6797
|
+
lengths, tips aligned)
|
|
6798
|
+
instead of phylogram
|
|
6799
|
+
|
|
6692
6800
|
--json output results as JSON
|
|
6693
6801
|
"""
|
|
6694
6802
|
),
|
|
@@ -6762,7 +6870,7 @@ class Phykit:
|
|
|
6762
6870
|
[--legend-position <str>]
|
|
6763
6871
|
[--ylabel-fontsize <float>] [--xlabel-fontsize <float>]
|
|
6764
6872
|
[--title-fontsize <float>] [--axis-fontsize <float>]
|
|
6765
|
-
[--colors <str>] [--ladderize]
|
|
6873
|
+
[--colors <str>] [--ladderize] [--cladogram]
|
|
6766
6874
|
|
|
6767
6875
|
Options
|
|
6768
6876
|
=====================================================
|
|
@@ -6825,6 +6933,10 @@ class Phykit:
|
|
|
6825
6933
|
--ladderize ladderize (sort) the tree
|
|
6826
6934
|
before plotting
|
|
6827
6935
|
|
|
6936
|
+
--cladogram draw cladogram (equal branch
|
|
6937
|
+
lengths, tips aligned)
|
|
6938
|
+
instead of phylogram
|
|
6939
|
+
|
|
6828
6940
|
--json optional argument to output
|
|
6829
6941
|
results as JSON
|
|
6830
6942
|
"""
|
|
@@ -9,7 +9,7 @@ from scipy.optimize import minimize
|
|
|
9
9
|
|
|
10
10
|
from .base import Tree
|
|
11
11
|
from ...helpers.json_output import print_json
|
|
12
|
-
from ...helpers.plot_config import PlotConfig
|
|
12
|
+
from ...helpers.plot_config import PlotConfig, compute_node_x_cladogram
|
|
13
13
|
from ...helpers.discrete_models import (
|
|
14
14
|
build_q_matrix,
|
|
15
15
|
matrix_exp,
|
|
@@ -831,14 +831,17 @@ class AncestralReconstruction(Tree):
|
|
|
831
831
|
|
|
832
832
|
# Assign x-positions via preorder traversal
|
|
833
833
|
root = tree.root
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
if
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
834
|
+
if self.plot_config.cladogram:
|
|
835
|
+
node_x = compute_node_x_cladogram(tree, parent_map)
|
|
836
|
+
else:
|
|
837
|
+
for clade in tree.find_clades(order="preorder"):
|
|
838
|
+
if clade == root:
|
|
839
|
+
node_x[id(clade)] = 0.0
|
|
840
|
+
else:
|
|
841
|
+
if id(clade) in parent_map:
|
|
842
|
+
parent = parent_map[id(clade)]
|
|
843
|
+
t = clade.branch_length if clade.branch_length else 0.0
|
|
844
|
+
node_x[id(clade)] = node_x[id(parent)] + t
|
|
842
845
|
|
|
843
846
|
# Assign internal y-positions (mean of children)
|
|
844
847
|
for clade in tree.find_clades(order="postorder"):
|
|
@@ -1413,14 +1416,17 @@ class AncestralReconstruction(Tree):
|
|
|
1413
1416
|
|
|
1414
1417
|
# Assign x-positions via preorder traversal
|
|
1415
1418
|
root = tree.root
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
if
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1419
|
+
if self.plot_config.cladogram:
|
|
1420
|
+
node_x = compute_node_x_cladogram(tree, parent_map)
|
|
1421
|
+
else:
|
|
1422
|
+
for clade in tree.find_clades(order="preorder"):
|
|
1423
|
+
if clade == root:
|
|
1424
|
+
node_x[id(clade)] = 0.0
|
|
1425
|
+
else:
|
|
1426
|
+
if id(clade) in parent_map:
|
|
1427
|
+
parent = parent_map[id(clade)]
|
|
1428
|
+
t = clade.branch_length if clade.branch_length else 0.0
|
|
1429
|
+
node_x[id(clade)] = node_x[id(parent)] + t
|
|
1424
1430
|
|
|
1425
1431
|
# Internal y-positions (mean of children)
|
|
1426
1432
|
for clade in tree.find_clades(order="postorder"):
|