phykit 2.1.75__tar.gz → 2.1.76__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.75 → phykit-2.1.76}/PKG-INFO +1 -1
- {phykit-2.1.75 → phykit-2.1.76}/phykit/cli_registry.py +2 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/phykit.py +115 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/service_factories.py +1 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/__init__.py +1 -0
- phykit-2.1.76/phykit/services/tree/neighbor_net.py +601 -0
- phykit-2.1.76/phykit/version.py +1 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit.egg-info/PKG-INFO +1 -1
- {phykit-2.1.75 → phykit-2.1.76}/phykit.egg-info/SOURCES.txt +1 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit.egg-info/entry_points.txt +2 -0
- {phykit-2.1.75 → phykit-2.1.76}/setup.py +2 -0
- phykit-2.1.75/phykit/version.py +0 -1
- {phykit-2.1.75 → phykit-2.1.76}/LICENSE.md +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/README.md +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/__init__.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/__main__.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/errors.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/helpers/__init__.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/helpers/boolean_argument_parsing.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/helpers/caching.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/helpers/circular_layout.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/helpers/color_annotations.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/helpers/discrete_models.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/helpers/files.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/helpers/json_output.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/helpers/parallel.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/helpers/parsimony_utils.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/helpers/plot_config.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/helpers/quartet_utils.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/helpers/stats_summary.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/helpers/streaming.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/__init__.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/alignment/__init__.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/alignment/alignment_entropy.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/alignment/alignment_length.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/alignment/alignment_length_no_gaps.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/alignment/alignment_outlier_taxa.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/alignment/alignment_recoding.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/alignment/alignment_subsample.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/alignment/base.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/alignment/column_score.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/alignment/composition_per_taxon.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/alignment/compositional_bias_per_site.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/alignment/create_concatenation_matrix.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/alignment/dfoil.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/alignment/dna_threader.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/alignment/dstatistic.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/alignment/evolutionary_rate_per_site.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/alignment/faidx.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/alignment/gc_content.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/alignment/identity_matrix.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/alignment/mask_alignment.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/alignment/occupancy_per_taxon.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/alignment/pairwise_identity.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/alignment/parsimony_informative_sites.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/alignment/phylo_gwas.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/alignment/plot_alignment_qc.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/alignment/rcv.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/alignment/rcvt.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/alignment/rename_fasta_entries.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/alignment/sum_of_pairs_score.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/alignment/variable_sites.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/base.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/ancestral_reconstruction.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/base.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/bipartition_support_stats.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/branch_length_multiplier.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/character_map.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/collapse_branches.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/concordance_asr.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/consensus_network.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/consensus_tree.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/cont_map.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/cophylo.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/covarying_evolutionary_rates.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/density_map.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/discordance_asymmetry.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/dvmc.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/evo_tempo_map.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/evolutionary_rate.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/fit_continuous.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/fit_discrete.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/hidden_paralogy_check.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/independent_contrasts.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/internal_branch_stats.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/internode_labeler.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/kf_distance.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/last_common_ancestor_subtree.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/lb_score.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/ltt.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/monophyly_check.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/nearest_neighbor_interchange.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/network_signal.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/ou_shift_detection.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/ouwie.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/parsimony_score.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/patristic_distances.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/phenogram.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/phylo_heatmap.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/phylo_impute.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/phylo_logistic.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/phylogenetic_glm.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/phylogenetic_ordination.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/phylogenetic_regression.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/phylogenetic_signal.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/phylomorphospace.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/polytomy_test.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/print_tree.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/prune_tree.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/quartet_network.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/quartet_pie.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/rate_heterogeneity.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/relative_rate_test.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/rename_tree_tips.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/rf_distance.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/root_tree.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/saturation.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/spectral_discordance.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/spurious_sequence.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/stochastic_character_map.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/terminal_branch_stats.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/threshold_model.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/tip_labels.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/tip_to_tip_distance.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/tip_to_tip_node_distance.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/total_tree_length.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/trait_correlation.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/trait_rate_map.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/tree_space.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/treeness.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/treeness_over_rcv.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit/services/tree/vcv_utils.py +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit.egg-info/dependency_links.txt +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit.egg-info/requires.txt +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/phykit.egg-info/top_level.txt +0 -0
- {phykit-2.1.75 → phykit-2.1.76}/setup.cfg +0 -0
|
@@ -135,6 +135,8 @@ ALIAS_TO_HANDLER: Dict[str, str] = {
|
|
|
135
135
|
"ou_shifts": "ou_shift_detection",
|
|
136
136
|
"l1ou": "ou_shift_detection",
|
|
137
137
|
"detect_shifts": "ou_shift_detection",
|
|
138
|
+
"neighbor_net": "neighbor_net",
|
|
139
|
+
"nnet": "neighbor_net",
|
|
138
140
|
"quartet_net": "quartet_network",
|
|
139
141
|
"qnet": "quartet_network",
|
|
140
142
|
"nanuq": "quartet_network",
|
|
@@ -199,6 +199,9 @@ class Phykit:
|
|
|
199
199
|
consensus_network (alias: consnet; splitnet; splits_network)
|
|
200
200
|
- extract bipartition splits from gene trees and visualize
|
|
201
201
|
conflicting phylogenetic signal as a splits network
|
|
202
|
+
neighbor_net (alias: nnet)
|
|
203
|
+
- construct a NeighborNet phylogenetic network from
|
|
204
|
+
pairwise distances (alignment or CSV distance matrix)
|
|
202
205
|
consensus_tree (alias: consensus; ctree)
|
|
203
206
|
- infer strict or majority-rule consensus from a tree collection
|
|
204
207
|
degree_of_violation_of_a_molecular_clock (alias: dvmc)
|
|
@@ -5860,6 +5863,114 @@ class Phykit:
|
|
|
5860
5863
|
_add_json_argument(parser)
|
|
5861
5864
|
_run_service(parser, argv, ConsensusNetwork)
|
|
5862
5865
|
|
|
5866
|
+
@staticmethod
|
|
5867
|
+
def neighbor_net(argv):
|
|
5868
|
+
parser = _new_parser(
|
|
5869
|
+
description=textwrap.dedent(
|
|
5870
|
+
f"""\
|
|
5871
|
+
{help_header}
|
|
5872
|
+
|
|
5873
|
+
Construct a NeighborNet phylogenetic network from pairwise
|
|
5874
|
+
distances and visualize it as a planar splits graph.
|
|
5875
|
+
|
|
5876
|
+
Accepts either a FASTA alignment (from which pairwise
|
|
5877
|
+
distances are computed using the chosen metric) or a
|
|
5878
|
+
pre-computed CSV distance matrix.
|
|
5879
|
+
|
|
5880
|
+
The implementation builds a Neighbor-Joining tree to obtain
|
|
5881
|
+
a circular ordering, enumerates all circular splits
|
|
5882
|
+
compatible with that ordering, and estimates split weights
|
|
5883
|
+
via non-negative least squares (NNLS).
|
|
5884
|
+
|
|
5885
|
+
Aliases:
|
|
5886
|
+
neighbor_net, nnet
|
|
5887
|
+
Command line interfaces:
|
|
5888
|
+
pk_neighbor_net, pk_nnet
|
|
5889
|
+
|
|
5890
|
+
Usage:
|
|
5891
|
+
phykit neighbor_net -a/--alignment <alignment>
|
|
5892
|
+
-o/--output <output_figure>
|
|
5893
|
+
[--distance-matrix <csv>]
|
|
5894
|
+
[--metric identity|p-distance|jc]
|
|
5895
|
+
[--max-splits 30]
|
|
5896
|
+
[--json]
|
|
5897
|
+
[shared plot options]
|
|
5898
|
+
|
|
5899
|
+
Options
|
|
5900
|
+
=====================================================
|
|
5901
|
+
-a/--alignment FASTA alignment file
|
|
5902
|
+
(computes distances
|
|
5903
|
+
internally)
|
|
5904
|
+
|
|
5905
|
+
--distance-matrix pre-computed distance
|
|
5906
|
+
matrix as CSV (taxon
|
|
5907
|
+
labels as row/column
|
|
5908
|
+
headers). One of -a or
|
|
5909
|
+
--distance-matrix is
|
|
5910
|
+
required.
|
|
5911
|
+
|
|
5912
|
+
-o/--output output figure path
|
|
5913
|
+
(required)
|
|
5914
|
+
|
|
5915
|
+
--metric distance metric when
|
|
5916
|
+
using -a: identity,
|
|
5917
|
+
p-distance, or jc
|
|
5918
|
+
(Jukes-Cantor)
|
|
5919
|
+
(Default: p-distance)
|
|
5920
|
+
|
|
5921
|
+
--max-splits maximum number of splits
|
|
5922
|
+
for visualization
|
|
5923
|
+
(Default: 30)
|
|
5924
|
+
|
|
5925
|
+
--json optional argument to
|
|
5926
|
+
output results as JSON
|
|
5927
|
+
"""
|
|
5928
|
+
),
|
|
5929
|
+
)
|
|
5930
|
+
parser.add_argument(
|
|
5931
|
+
"-a", "--alignment",
|
|
5932
|
+
type=str,
|
|
5933
|
+
default=None,
|
|
5934
|
+
required=False,
|
|
5935
|
+
help=SUPPRESS,
|
|
5936
|
+
metavar="",
|
|
5937
|
+
)
|
|
5938
|
+
parser.add_argument(
|
|
5939
|
+
"--distance-matrix",
|
|
5940
|
+
type=str,
|
|
5941
|
+
default=None,
|
|
5942
|
+
required=False,
|
|
5943
|
+
help=SUPPRESS,
|
|
5944
|
+
metavar="",
|
|
5945
|
+
)
|
|
5946
|
+
parser.add_argument(
|
|
5947
|
+
"-o", "--output",
|
|
5948
|
+
type=str,
|
|
5949
|
+
required=True,
|
|
5950
|
+
help=SUPPRESS,
|
|
5951
|
+
metavar="",
|
|
5952
|
+
)
|
|
5953
|
+
parser.add_argument(
|
|
5954
|
+
"--metric",
|
|
5955
|
+
type=str,
|
|
5956
|
+
default="p-distance",
|
|
5957
|
+
choices=["identity", "p-distance", "jc"],
|
|
5958
|
+
required=False,
|
|
5959
|
+
help=SUPPRESS,
|
|
5960
|
+
metavar="",
|
|
5961
|
+
)
|
|
5962
|
+
parser.add_argument(
|
|
5963
|
+
"--max-splits",
|
|
5964
|
+
type=int,
|
|
5965
|
+
default=30,
|
|
5966
|
+
required=False,
|
|
5967
|
+
help=SUPPRESS,
|
|
5968
|
+
metavar="",
|
|
5969
|
+
)
|
|
5970
|
+
add_plot_arguments(parser)
|
|
5971
|
+
_add_json_argument(parser)
|
|
5972
|
+
_run_service(parser, argv, NeighborNet)
|
|
5973
|
+
|
|
5863
5974
|
@staticmethod
|
|
5864
5975
|
def quartet_pie(argv):
|
|
5865
5976
|
parser = _new_parser(
|
|
@@ -8552,6 +8663,10 @@ def consensus_network(argv=None):
|
|
|
8552
8663
|
Phykit.consensus_network(sys.argv[1:])
|
|
8553
8664
|
|
|
8554
8665
|
|
|
8666
|
+
def neighbor_net(argv=None):
|
|
8667
|
+
Phykit.neighbor_net(sys.argv[1:])
|
|
8668
|
+
|
|
8669
|
+
|
|
8555
8670
|
def quartet_network(argv=None):
|
|
8556
8671
|
Phykit.quartet_network(sys.argv[1:])
|
|
8557
8672
|
|
|
@@ -56,6 +56,7 @@ BranchLengthMultiplier = _LazyServiceFactory("phykit.services.tree.branch_length
|
|
|
56
56
|
CollapseBranches = _LazyServiceFactory("phykit.services.tree.collapse_branches", "CollapseBranches")
|
|
57
57
|
CovaryingEvolutionaryRates = _LazyServiceFactory("phykit.services.tree.covarying_evolutionary_rates", "CovaryingEvolutionaryRates")
|
|
58
58
|
ConsensusNetwork = _LazyServiceFactory("phykit.services.tree.consensus_network", "ConsensusNetwork")
|
|
59
|
+
NeighborNet = _LazyServiceFactory("phykit.services.tree.neighbor_net", "NeighborNet")
|
|
59
60
|
ConsensusTree = _LazyServiceFactory("phykit.services.tree.consensus_tree", "ConsensusTree")
|
|
60
61
|
DVMC = _LazyServiceFactory("phykit.services.tree.dvmc", "DVMC")
|
|
61
62
|
EvolutionaryRate = _LazyServiceFactory("phykit.services.tree.evolutionary_rate", "EvolutionaryRate")
|
|
@@ -7,6 +7,7 @@ _EXPORTS = {
|
|
|
7
7
|
"CollapseBranches": "collapse_branches",
|
|
8
8
|
"CovaryingEvolutionaryRates": "covarying_evolutionary_rates",
|
|
9
9
|
"ConsensusNetwork": "consensus_network",
|
|
10
|
+
"NeighborNet": "neighbor_net",
|
|
10
11
|
"ConsensusTree": "consensus_tree",
|
|
11
12
|
"DVMC": "dvmc",
|
|
12
13
|
"DiscordanceAsymmetry": "discordance_asymmetry",
|