phykit 2.1.43__tar.gz → 2.1.44__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.43 → phykit-2.1.44}/PKG-INFO +1 -1
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/quartet_pie.py +43 -45
- phykit-2.1.44/phykit/version.py +1 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit.egg-info/PKG-INFO +1 -1
- phykit-2.1.43/phykit/version.py +0 -1
- {phykit-2.1.43 → phykit-2.1.44}/LICENSE.md +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/README.md +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/__init__.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/__main__.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/cli_registry.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/errors.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/helpers/__init__.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/helpers/boolean_argument_parsing.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/helpers/caching.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/helpers/discrete_models.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/helpers/files.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/helpers/json_output.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/helpers/parallel.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/helpers/plot_config.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/helpers/quartet_utils.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/helpers/stats_summary.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/helpers/streaming.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/phykit.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/service_factories.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/__init__.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/alignment/__init__.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/alignment/alignment_entropy.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/alignment/alignment_length.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/alignment/alignment_length_no_gaps.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/alignment/alignment_outlier_taxa.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/alignment/alignment_recoding.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/alignment/base.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/alignment/column_score.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/alignment/composition_per_taxon.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/alignment/compositional_bias_per_site.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/alignment/create_concatenation_matrix.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/alignment/dna_threader.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/alignment/evolutionary_rate_per_site.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/alignment/faidx.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/alignment/gc_content.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/alignment/mask_alignment.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/alignment/occupancy_per_taxon.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/alignment/pairwise_identity.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/alignment/parsimony_informative_sites.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/alignment/plot_alignment_qc.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/alignment/rcv.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/alignment/rcvt.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/alignment/rename_fasta_entries.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/alignment/sum_of_pairs_score.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/alignment/variable_sites.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/base.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/__init__.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/ancestral_reconstruction.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/base.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/bipartition_support_stats.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/branch_length_multiplier.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/collapse_branches.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/concordance_asr.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/consensus_network.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/consensus_tree.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/cont_map.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/cophylo.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/covarying_evolutionary_rates.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/density_map.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/discordance_asymmetry.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/dvmc.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/evo_tempo_map.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/evolutionary_rate.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/fit_continuous.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/fit_discrete.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/hidden_paralogy_check.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/internal_branch_stats.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/internode_labeler.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/kf_distance.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/last_common_ancestor_subtree.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/lb_score.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/ltt.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/monophyly_check.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/nearest_neighbor_interchange.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/network_signal.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/ou_shift_detection.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/ouwie.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/patristic_distances.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/phenogram.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/phylogenetic_glm.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/phylogenetic_ordination.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/phylogenetic_regression.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/phylogenetic_signal.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/phylomorphospace.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/polytomy_test.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/print_tree.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/prune_tree.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/quartet_network.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/rate_heterogeneity.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/relative_rate_test.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/rename_tree_tips.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/rf_distance.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/root_tree.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/saturation.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/spectral_discordance.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/spurious_sequence.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/stochastic_character_map.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/terminal_branch_stats.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/threshold_model.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/tip_labels.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/tip_to_tip_distance.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/tip_to_tip_node_distance.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/total_tree_length.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/treeness.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/treeness_over_rcv.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit/services/tree/vcv_utils.py +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit.egg-info/SOURCES.txt +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit.egg-info/dependency_links.txt +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit.egg-info/entry_points.txt +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit.egg-info/requires.txt +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/phykit.egg-info/top_level.txt +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/setup.cfg +0 -0
- {phykit-2.1.43 → phykit-2.1.44}/setup.py +0 -0
|
@@ -177,17 +177,53 @@ class QuartetPie(Tree):
|
|
|
177
177
|
ax.plot([x0, x1], [y1, y1], color="black", lw=1.5)
|
|
178
178
|
ax.plot([x0, x0], [y0, y1], color="black", lw=1.5)
|
|
179
179
|
|
|
180
|
+
# Tip labels
|
|
181
|
+
max_x = max(node_x.values()) if node_x else 1.0
|
|
182
|
+
offset = max_x * 0.03
|
|
183
|
+
label_fontsize = config.ylabel_fontsize if config.ylabel_fontsize and config.ylabel_fontsize > 0 else 9
|
|
184
|
+
for tip in tips:
|
|
185
|
+
ax.text(
|
|
186
|
+
node_x[id(tip)] + offset, node_y[id(tip)],
|
|
187
|
+
tip.name, va="center", fontsize=label_fontsize,
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
# Legend
|
|
191
|
+
legend_handles = [
|
|
192
|
+
Patch(facecolor=colors[0], edgecolor="black", linewidth=0.5,
|
|
193
|
+
label="Concordant (gCF / q1)"),
|
|
194
|
+
Patch(facecolor=colors[1], edgecolor="black", linewidth=0.5,
|
|
195
|
+
label="Discordant alt 1 (gDF1 / q2)"),
|
|
196
|
+
Patch(facecolor=colors[2], edgecolor="black", linewidth=0.5,
|
|
197
|
+
label="Discordant alt 2 (gDF2 / q3)"),
|
|
198
|
+
]
|
|
199
|
+
legend_loc = config.legend_position or "upper right"
|
|
200
|
+
if legend_loc != "none":
|
|
201
|
+
ax.legend(handles=legend_handles, loc=legend_loc, fontsize=8, frameon=True)
|
|
202
|
+
|
|
203
|
+
ax.set_xlabel("Branch length (subs/site)")
|
|
204
|
+
ax.set_yticks([])
|
|
205
|
+
ax.spines["top"].set_visible(False)
|
|
206
|
+
ax.spines["right"].set_visible(False)
|
|
207
|
+
ax.spines["left"].set_visible(False)
|
|
208
|
+
|
|
209
|
+
if config.show_title:
|
|
210
|
+
ax.set_title(
|
|
211
|
+
config.title or "Quartet Concordance Pie Chart",
|
|
212
|
+
fontsize=config.title_fontsize,
|
|
213
|
+
)
|
|
214
|
+
if config.axis_fontsize:
|
|
215
|
+
ax.xaxis.label.set_fontsize(config.axis_fontsize)
|
|
216
|
+
|
|
217
|
+
# Finalize layout BEFORE placing pie insets, so transData is stable
|
|
218
|
+
fig.subplots_adjust(left=0.05, right=0.85, top=0.92, bottom=0.12)
|
|
219
|
+
fig.canvas.draw()
|
|
220
|
+
|
|
180
221
|
# Pie charts at internal nodes — rendered as inset axes so they
|
|
181
222
|
# appear as perfect circles regardless of axis scaling, and are
|
|
182
223
|
# drawn above the phylogeny branches.
|
|
183
|
-
max_x = max(node_x.values()) if node_x else 1.0
|
|
184
224
|
n_tips = len(tips)
|
|
185
|
-
# Pie size in figure-fraction units (scales with figure, not data)
|
|
186
225
|
pie_size = min(0.06, 0.8 / max(n_tips, 1))
|
|
187
226
|
|
|
188
|
-
# Force a draw so transData is populated
|
|
189
|
-
fig.canvas.draw()
|
|
190
|
-
|
|
191
227
|
for clade in tree.find_clades(order="preorder"):
|
|
192
228
|
if clade.is_terminal() or clade == root:
|
|
193
229
|
continue
|
|
@@ -233,46 +269,8 @@ class QuartetPie(Tree):
|
|
|
233
269
|
zorder=11,
|
|
234
270
|
)
|
|
235
271
|
|
|
236
|
-
#
|
|
237
|
-
|
|
238
|
-
label_fontsize = config.ylabel_fontsize if config.ylabel_fontsize and config.ylabel_fontsize > 0 else 9
|
|
239
|
-
for tip in tips:
|
|
240
|
-
ax.text(
|
|
241
|
-
node_x[id(tip)] + offset, node_y[id(tip)],
|
|
242
|
-
tip.name, va="center", fontsize=label_fontsize,
|
|
243
|
-
)
|
|
244
|
-
|
|
245
|
-
# Legend
|
|
246
|
-
legend_handles = [
|
|
247
|
-
Patch(facecolor=colors[0], edgecolor="black", linewidth=0.5,
|
|
248
|
-
label="Concordant (gCF / q1)"),
|
|
249
|
-
Patch(facecolor=colors[1], edgecolor="black", linewidth=0.5,
|
|
250
|
-
label="Discordant alt 1 (gDF1 / q2)"),
|
|
251
|
-
Patch(facecolor=colors[2], edgecolor="black", linewidth=0.5,
|
|
252
|
-
label="Discordant alt 2 (gDF2 / q3)"),
|
|
253
|
-
]
|
|
254
|
-
legend_loc = config.legend_position or "upper right"
|
|
255
|
-
if legend_loc != "none":
|
|
256
|
-
ax.legend(handles=legend_handles, loc=legend_loc, fontsize=8, frameon=True)
|
|
257
|
-
|
|
258
|
-
ax.set_xlabel("Branch length (subs/site)")
|
|
259
|
-
ax.set_yticks([])
|
|
260
|
-
ax.spines["top"].set_visible(False)
|
|
261
|
-
ax.spines["right"].set_visible(False)
|
|
262
|
-
ax.spines["left"].set_visible(False)
|
|
263
|
-
|
|
264
|
-
if config.show_title:
|
|
265
|
-
ax.set_title(
|
|
266
|
-
config.title or "Quartet Concordance Pie Chart",
|
|
267
|
-
fontsize=config.title_fontsize,
|
|
268
|
-
)
|
|
269
|
-
if config.axis_fontsize:
|
|
270
|
-
ax.xaxis.label.set_fontsize(config.axis_fontsize)
|
|
271
|
-
|
|
272
|
-
# Use constrained_layout=False since inset pie axes are incompatible
|
|
273
|
-
# with tight_layout; manual padding via subplots_adjust instead
|
|
274
|
-
fig.subplots_adjust(left=0.05, right=0.85, top=0.92, bottom=0.12)
|
|
275
|
-
fig.savefig(output_path, dpi=config.dpi, bbox_inches="tight")
|
|
272
|
+
# Save without bbox_inches="tight" to preserve inset positions
|
|
273
|
+
fig.savefig(output_path, dpi=config.dpi)
|
|
276
274
|
plt.close(fig)
|
|
277
275
|
|
|
278
276
|
def _print_json(self, tree, proportions, input_mode, n_gene_trees):
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.1.44"
|
phykit-2.1.43/phykit/version.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.1.43"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|