phykit 2.1.62__tar.gz → 2.1.63__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.62 → phykit-2.1.63}/PKG-INFO +1 -1
- {phykit-2.1.62 → phykit-2.1.63}/phykit/cli_registry.py +3 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/phykit.py +129 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/service_factories.py +1 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/__init__.py +1 -0
- phykit-2.1.63/phykit/services/tree/trait_rate_map.py +658 -0
- phykit-2.1.63/phykit/version.py +1 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit.egg-info/PKG-INFO +1 -1
- {phykit-2.1.62 → phykit-2.1.63}/phykit.egg-info/SOURCES.txt +1 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit.egg-info/entry_points.txt +3 -0
- {phykit-2.1.62 → phykit-2.1.63}/setup.py +3 -0
- phykit-2.1.62/phykit/version.py +0 -1
- {phykit-2.1.62 → phykit-2.1.63}/LICENSE.md +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/README.md +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/__init__.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/__main__.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/errors.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/helpers/__init__.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/helpers/boolean_argument_parsing.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/helpers/caching.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/helpers/circular_layout.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/helpers/color_annotations.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/helpers/discrete_models.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/helpers/files.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/helpers/json_output.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/helpers/parallel.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/helpers/parsimony_utils.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/helpers/plot_config.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/helpers/quartet_utils.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/helpers/stats_summary.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/helpers/streaming.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/__init__.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/alignment/__init__.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/alignment/alignment_entropy.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/alignment/alignment_length.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/alignment/alignment_length_no_gaps.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/alignment/alignment_outlier_taxa.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/alignment/alignment_recoding.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/alignment/alignment_subsample.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/alignment/base.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/alignment/column_score.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/alignment/composition_per_taxon.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/alignment/compositional_bias_per_site.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/alignment/create_concatenation_matrix.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/alignment/dna_threader.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/alignment/evolutionary_rate_per_site.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/alignment/faidx.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/alignment/gc_content.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/alignment/identity_matrix.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/alignment/mask_alignment.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/alignment/occupancy_per_taxon.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/alignment/pairwise_identity.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/alignment/parsimony_informative_sites.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/alignment/plot_alignment_qc.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/alignment/rcv.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/alignment/rcvt.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/alignment/rename_fasta_entries.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/alignment/sum_of_pairs_score.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/alignment/variable_sites.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/base.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/ancestral_reconstruction.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/base.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/bipartition_support_stats.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/branch_length_multiplier.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/character_map.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/collapse_branches.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/concordance_asr.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/consensus_network.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/consensus_tree.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/cont_map.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/cophylo.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/covarying_evolutionary_rates.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/density_map.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/discordance_asymmetry.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/dvmc.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/evo_tempo_map.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/evolutionary_rate.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/fit_continuous.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/fit_discrete.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/hidden_paralogy_check.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/independent_contrasts.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/internal_branch_stats.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/internode_labeler.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/kf_distance.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/last_common_ancestor_subtree.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/lb_score.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/ltt.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/monophyly_check.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/nearest_neighbor_interchange.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/network_signal.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/ou_shift_detection.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/ouwie.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/parsimony_score.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/patristic_distances.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/phenogram.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/phylo_heatmap.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/phylogenetic_glm.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/phylogenetic_ordination.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/phylogenetic_regression.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/phylogenetic_signal.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/phylomorphospace.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/polytomy_test.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/print_tree.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/prune_tree.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/quartet_network.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/quartet_pie.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/rate_heterogeneity.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/relative_rate_test.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/rename_tree_tips.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/rf_distance.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/root_tree.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/saturation.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/spectral_discordance.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/spurious_sequence.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/stochastic_character_map.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/terminal_branch_stats.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/threshold_model.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/tip_labels.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/tip_to_tip_distance.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/tip_to_tip_node_distance.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/total_tree_length.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/trait_correlation.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/tree_space.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/treeness.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/treeness_over_rcv.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit/services/tree/vcv_utils.py +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit.egg-info/dependency_links.txt +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit.egg-info/requires.txt +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/phykit.egg-info/top_level.txt +0 -0
- {phykit-2.1.62 → phykit-2.1.63}/setup.cfg +0 -0
|
@@ -182,6 +182,9 @@ ALIAS_TO_HANDLER: Dict[str, str] = {
|
|
|
182
182
|
"trait_correlation": "trait_correlation",
|
|
183
183
|
"trait_corr": "trait_correlation",
|
|
184
184
|
"phylo_corr": "trait_correlation",
|
|
185
|
+
"trait_rate_map": "trait_rate_map",
|
|
186
|
+
"rate_map": "trait_rate_map",
|
|
187
|
+
"branch_rates": "trait_rate_map",
|
|
185
188
|
"tree_space": "tree_space",
|
|
186
189
|
"tspace": "tree_space",
|
|
187
190
|
"tree_landscape": "tree_space",
|
|
@@ -234,6 +234,8 @@ class Phykit:
|
|
|
234
234
|
- stochastic character mapping (SIMMAP) of discrete traits
|
|
235
235
|
cont_map (alias: contmap; cmap)
|
|
236
236
|
- continuous trait map (contMap) visualization on a phylogeny
|
|
237
|
+
trait_rate_map (alias: rate_map; branch_rates)
|
|
238
|
+
- per-branch evolutionary rate map for a continuous trait
|
|
237
239
|
density_map (alias: densitymap; dmap)
|
|
238
240
|
- density map of posterior state probabilities on a phylogeny
|
|
239
241
|
cophylo (alias: tanglegram; tangle)
|
|
@@ -7353,6 +7355,129 @@ class Phykit:
|
|
|
7353
7355
|
_add_json_argument(parser)
|
|
7354
7356
|
_run_service(parser, argv, SpectralDiscordance)
|
|
7355
7357
|
|
|
7358
|
+
@staticmethod
|
|
7359
|
+
def trait_rate_map(argv):
|
|
7360
|
+
parser = _new_parser(
|
|
7361
|
+
description=textwrap.dedent(
|
|
7362
|
+
f"""\
|
|
7363
|
+
{help_header}
|
|
7364
|
+
|
|
7365
|
+
Trait Rate Map — estimate per-branch evolutionary
|
|
7366
|
+
rates for a continuous trait and display them as a
|
|
7367
|
+
branch-colored phylogram.
|
|
7368
|
+
|
|
7369
|
+
Ancestral states are reconstructed via Felsenstein's
|
|
7370
|
+
weighted-average method (inverse-branch-length
|
|
7371
|
+
weighting, postorder traversal). Per-branch rate is
|
|
7372
|
+
the squared standardized contrast:
|
|
7373
|
+
rate = (child_val - parent_val)^2 / branch_length
|
|
7374
|
+
|
|
7375
|
+
Input is a phylogenetic tree and either:
|
|
7376
|
+
(a) a two-column TSV (taxon<tab>value, no header), or
|
|
7377
|
+
(b) a multi-column TSV with header (use --trait to
|
|
7378
|
+
select a column)
|
|
7379
|
+
|
|
7380
|
+
Aliases:
|
|
7381
|
+
trait_rate_map, rate_map, branch_rates
|
|
7382
|
+
Command line interfaces:
|
|
7383
|
+
pk_trait_rate_map, pk_rate_map, pk_branch_rates
|
|
7384
|
+
|
|
7385
|
+
Usage:
|
|
7386
|
+
phykit trait_rate_map -t <tree> -d <trait_data> -o <output>
|
|
7387
|
+
[--trait <column>] [--json]
|
|
7388
|
+
[--fig-width <float>] [--fig-height <float>]
|
|
7389
|
+
[--dpi <int>] [--no-title] [--title <str>]
|
|
7390
|
+
[--legend-position <str>]
|
|
7391
|
+
[--ylabel-fontsize <float>] [--xlabel-fontsize <float>]
|
|
7392
|
+
[--title-fontsize <float>] [--axis-fontsize <float>]
|
|
7393
|
+
[--colors <str>] [--ladderize] [--cladogram] [--circular] [--color-file <file>]
|
|
7394
|
+
|
|
7395
|
+
Options
|
|
7396
|
+
=====================================================
|
|
7397
|
+
-t/--tree a tree file
|
|
7398
|
+
|
|
7399
|
+
-d/--trait_data tab-delimited trait file
|
|
7400
|
+
(two-column: taxon<tab>value,
|
|
7401
|
+
no header; or multi-column
|
|
7402
|
+
with header when --trait is
|
|
7403
|
+
used)
|
|
7404
|
+
|
|
7405
|
+
-o/--output output plot file path
|
|
7406
|
+
(required)
|
|
7407
|
+
|
|
7408
|
+
--trait column name to use from a
|
|
7409
|
+
multi-column trait file
|
|
7410
|
+
(if omitted, two-column
|
|
7411
|
+
format is expected)
|
|
7412
|
+
|
|
7413
|
+
--fig-width figure width in inches
|
|
7414
|
+
(auto-scaled if omitted)
|
|
7415
|
+
|
|
7416
|
+
--fig-height figure height in inches
|
|
7417
|
+
(auto-scaled if omitted)
|
|
7418
|
+
|
|
7419
|
+
--dpi resolution in DPI
|
|
7420
|
+
(default: 300)
|
|
7421
|
+
|
|
7422
|
+
--no-title hide the plot title
|
|
7423
|
+
|
|
7424
|
+
--title custom title text
|
|
7425
|
+
|
|
7426
|
+
--legend-position legend location (e.g.,
|
|
7427
|
+
"upper right", "none")
|
|
7428
|
+
|
|
7429
|
+
--ylabel-fontsize font size for y-axis labels;
|
|
7430
|
+
0 to hide
|
|
7431
|
+
|
|
7432
|
+
--xlabel-fontsize font size for x-axis labels;
|
|
7433
|
+
0 to hide
|
|
7434
|
+
|
|
7435
|
+
--title-fontsize font size for the title
|
|
7436
|
+
|
|
7437
|
+
--axis-fontsize font size for axis labels
|
|
7438
|
+
|
|
7439
|
+
--colors comma-separated colors
|
|
7440
|
+
(hex or named, e.g.,
|
|
7441
|
+
"#ff0000,blue,#00ff00")
|
|
7442
|
+
|
|
7443
|
+
--ladderize ladderize (sort) the tree
|
|
7444
|
+
before plotting
|
|
7445
|
+
|
|
7446
|
+
--cladogram draw cladogram (equal branch
|
|
7447
|
+
lengths, tips aligned)
|
|
7448
|
+
instead of phylogram
|
|
7449
|
+
|
|
7450
|
+
--circular draw circular (radial/fan)
|
|
7451
|
+
phylogram instead of
|
|
7452
|
+
rectangular
|
|
7453
|
+
|
|
7454
|
+
--color-file color annotation file for
|
|
7455
|
+
tip labels, clade ranges,
|
|
7456
|
+
and branch colors (iTOL-
|
|
7457
|
+
inspired TSV format)
|
|
7458
|
+
|
|
7459
|
+
--json optional argument to also
|
|
7460
|
+
output results as JSON
|
|
7461
|
+
"""
|
|
7462
|
+
),
|
|
7463
|
+
)
|
|
7464
|
+
parser.add_argument(
|
|
7465
|
+
"-t", "--tree", type=str, required=True, help=SUPPRESS, metavar=""
|
|
7466
|
+
)
|
|
7467
|
+
parser.add_argument(
|
|
7468
|
+
"-d", "--trait_data", type=str, required=True, help=SUPPRESS, metavar=""
|
|
7469
|
+
)
|
|
7470
|
+
parser.add_argument(
|
|
7471
|
+
"-o", "--output", type=str, required=True, help=SUPPRESS, metavar=""
|
|
7472
|
+
)
|
|
7473
|
+
parser.add_argument(
|
|
7474
|
+
"--trait", type=str, required=False, default=None,
|
|
7475
|
+
help=SUPPRESS, metavar=""
|
|
7476
|
+
)
|
|
7477
|
+
add_plot_arguments(parser)
|
|
7478
|
+
_add_json_argument(parser)
|
|
7479
|
+
_run_service(parser, argv, TraitRateMap)
|
|
7480
|
+
|
|
7356
7481
|
@staticmethod
|
|
7357
7482
|
def tree_space(argv):
|
|
7358
7483
|
parser = _new_parser(
|
|
@@ -8029,3 +8154,7 @@ def spectral_discordance(argv=None):
|
|
|
8029
8154
|
|
|
8030
8155
|
def tree_space(argv=None):
|
|
8031
8156
|
Phykit.tree_space(sys.argv[1:])
|
|
8157
|
+
|
|
8158
|
+
|
|
8159
|
+
def trait_rate_map(argv=None):
|
|
8160
|
+
Phykit.trait_rate_map(sys.argv[1:])
|
|
@@ -109,6 +109,7 @@ EvoTempoMap = _LazyServiceFactory("phykit.services.tree.evo_tempo_map", "EvoTemp
|
|
|
109
109
|
DiscordanceAsymmetry = _LazyServiceFactory("phykit.services.tree.discordance_asymmetry", "DiscordanceAsymmetry")
|
|
110
110
|
SpectralDiscordance = _LazyServiceFactory("phykit.services.tree.spectral_discordance", "SpectralDiscordance")
|
|
111
111
|
TraitCorrelation = _LazyServiceFactory("phykit.services.tree.trait_correlation", "TraitCorrelation")
|
|
112
|
+
TraitRateMap = _LazyServiceFactory("phykit.services.tree.trait_rate_map", "TraitRateMap")
|
|
112
113
|
TreeSpace = _LazyServiceFactory("phykit.services.tree.tree_space", "TreeSpace")
|
|
113
114
|
|
|
114
115
|
SERVICE_FACTORIES: Dict[str, _LazyServiceFactory] = {
|