phykit 2.1.69__tar.gz → 2.1.71__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.
Files changed (134) hide show
  1. {phykit-2.1.69 → phykit-2.1.71}/PKG-INFO +1 -1
  2. {phykit-2.1.69 → phykit-2.1.71}/phykit/cli_registry.py +2 -0
  3. {phykit-2.1.69 → phykit-2.1.71}/phykit/phykit.py +124 -0
  4. {phykit-2.1.69 → phykit-2.1.71}/phykit/service_factories.py +1 -0
  5. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/alignment/__init__.py +1 -0
  6. phykit-2.1.71/phykit/services/alignment/phylo_gwas.py +683 -0
  7. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/phylogenetic_signal.py +243 -0
  8. phykit-2.1.71/phykit/version.py +1 -0
  9. {phykit-2.1.69 → phykit-2.1.71}/phykit.egg-info/PKG-INFO +1 -1
  10. {phykit-2.1.69 → phykit-2.1.71}/phykit.egg-info/SOURCES.txt +1 -0
  11. {phykit-2.1.69 → phykit-2.1.71}/phykit.egg-info/entry_points.txt +2 -0
  12. {phykit-2.1.69 → phykit-2.1.71}/setup.py +2 -0
  13. phykit-2.1.69/phykit/version.py +0 -1
  14. {phykit-2.1.69 → phykit-2.1.71}/LICENSE.md +0 -0
  15. {phykit-2.1.69 → phykit-2.1.71}/README.md +0 -0
  16. {phykit-2.1.69 → phykit-2.1.71}/phykit/__init__.py +0 -0
  17. {phykit-2.1.69 → phykit-2.1.71}/phykit/__main__.py +0 -0
  18. {phykit-2.1.69 → phykit-2.1.71}/phykit/errors.py +0 -0
  19. {phykit-2.1.69 → phykit-2.1.71}/phykit/helpers/__init__.py +0 -0
  20. {phykit-2.1.69 → phykit-2.1.71}/phykit/helpers/boolean_argument_parsing.py +0 -0
  21. {phykit-2.1.69 → phykit-2.1.71}/phykit/helpers/caching.py +0 -0
  22. {phykit-2.1.69 → phykit-2.1.71}/phykit/helpers/circular_layout.py +0 -0
  23. {phykit-2.1.69 → phykit-2.1.71}/phykit/helpers/color_annotations.py +0 -0
  24. {phykit-2.1.69 → phykit-2.1.71}/phykit/helpers/discrete_models.py +0 -0
  25. {phykit-2.1.69 → phykit-2.1.71}/phykit/helpers/files.py +0 -0
  26. {phykit-2.1.69 → phykit-2.1.71}/phykit/helpers/json_output.py +0 -0
  27. {phykit-2.1.69 → phykit-2.1.71}/phykit/helpers/parallel.py +0 -0
  28. {phykit-2.1.69 → phykit-2.1.71}/phykit/helpers/parsimony_utils.py +0 -0
  29. {phykit-2.1.69 → phykit-2.1.71}/phykit/helpers/plot_config.py +0 -0
  30. {phykit-2.1.69 → phykit-2.1.71}/phykit/helpers/quartet_utils.py +0 -0
  31. {phykit-2.1.69 → phykit-2.1.71}/phykit/helpers/stats_summary.py +0 -0
  32. {phykit-2.1.69 → phykit-2.1.71}/phykit/helpers/streaming.py +0 -0
  33. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/__init__.py +0 -0
  34. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/alignment/alignment_entropy.py +0 -0
  35. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/alignment/alignment_length.py +0 -0
  36. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/alignment/alignment_length_no_gaps.py +0 -0
  37. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/alignment/alignment_outlier_taxa.py +0 -0
  38. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/alignment/alignment_recoding.py +0 -0
  39. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/alignment/alignment_subsample.py +0 -0
  40. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/alignment/base.py +0 -0
  41. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/alignment/column_score.py +0 -0
  42. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/alignment/composition_per_taxon.py +0 -0
  43. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/alignment/compositional_bias_per_site.py +0 -0
  44. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/alignment/create_concatenation_matrix.py +0 -0
  45. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/alignment/dfoil.py +0 -0
  46. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/alignment/dna_threader.py +0 -0
  47. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/alignment/dstatistic.py +0 -0
  48. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/alignment/evolutionary_rate_per_site.py +0 -0
  49. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/alignment/faidx.py +0 -0
  50. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/alignment/gc_content.py +0 -0
  51. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/alignment/identity_matrix.py +0 -0
  52. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/alignment/mask_alignment.py +0 -0
  53. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/alignment/occupancy_per_taxon.py +0 -0
  54. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/alignment/pairwise_identity.py +0 -0
  55. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/alignment/parsimony_informative_sites.py +0 -0
  56. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/alignment/plot_alignment_qc.py +0 -0
  57. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/alignment/rcv.py +0 -0
  58. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/alignment/rcvt.py +0 -0
  59. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/alignment/rename_fasta_entries.py +0 -0
  60. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/alignment/sum_of_pairs_score.py +0 -0
  61. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/alignment/variable_sites.py +0 -0
  62. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/base.py +0 -0
  63. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/__init__.py +0 -0
  64. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/ancestral_reconstruction.py +0 -0
  65. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/base.py +0 -0
  66. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/bipartition_support_stats.py +0 -0
  67. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/branch_length_multiplier.py +0 -0
  68. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/character_map.py +0 -0
  69. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/collapse_branches.py +0 -0
  70. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/concordance_asr.py +0 -0
  71. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/consensus_network.py +0 -0
  72. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/consensus_tree.py +0 -0
  73. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/cont_map.py +0 -0
  74. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/cophylo.py +0 -0
  75. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/covarying_evolutionary_rates.py +0 -0
  76. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/density_map.py +0 -0
  77. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/discordance_asymmetry.py +0 -0
  78. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/dvmc.py +0 -0
  79. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/evo_tempo_map.py +0 -0
  80. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/evolutionary_rate.py +0 -0
  81. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/fit_continuous.py +0 -0
  82. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/fit_discrete.py +0 -0
  83. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/hidden_paralogy_check.py +0 -0
  84. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/independent_contrasts.py +0 -0
  85. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/internal_branch_stats.py +0 -0
  86. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/internode_labeler.py +0 -0
  87. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/kf_distance.py +0 -0
  88. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/last_common_ancestor_subtree.py +0 -0
  89. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/lb_score.py +0 -0
  90. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/ltt.py +0 -0
  91. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/monophyly_check.py +0 -0
  92. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/nearest_neighbor_interchange.py +0 -0
  93. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/network_signal.py +0 -0
  94. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/ou_shift_detection.py +0 -0
  95. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/ouwie.py +0 -0
  96. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/parsimony_score.py +0 -0
  97. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/patristic_distances.py +0 -0
  98. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/phenogram.py +0 -0
  99. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/phylo_heatmap.py +0 -0
  100. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/phylo_logistic.py +0 -0
  101. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/phylogenetic_glm.py +0 -0
  102. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/phylogenetic_ordination.py +0 -0
  103. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/phylogenetic_regression.py +0 -0
  104. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/phylomorphospace.py +0 -0
  105. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/polytomy_test.py +0 -0
  106. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/print_tree.py +0 -0
  107. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/prune_tree.py +0 -0
  108. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/quartet_network.py +0 -0
  109. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/quartet_pie.py +0 -0
  110. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/rate_heterogeneity.py +0 -0
  111. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/relative_rate_test.py +0 -0
  112. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/rename_tree_tips.py +0 -0
  113. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/rf_distance.py +0 -0
  114. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/root_tree.py +0 -0
  115. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/saturation.py +0 -0
  116. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/spectral_discordance.py +0 -0
  117. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/spurious_sequence.py +0 -0
  118. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/stochastic_character_map.py +0 -0
  119. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/terminal_branch_stats.py +0 -0
  120. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/threshold_model.py +0 -0
  121. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/tip_labels.py +0 -0
  122. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/tip_to_tip_distance.py +0 -0
  123. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/tip_to_tip_node_distance.py +0 -0
  124. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/total_tree_length.py +0 -0
  125. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/trait_correlation.py +0 -0
  126. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/trait_rate_map.py +0 -0
  127. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/tree_space.py +0 -0
  128. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/treeness.py +0 -0
  129. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/treeness_over_rcv.py +0 -0
  130. {phykit-2.1.69 → phykit-2.1.71}/phykit/services/tree/vcv_utils.py +0 -0
  131. {phykit-2.1.69 → phykit-2.1.71}/phykit.egg-info/dependency_links.txt +0 -0
  132. {phykit-2.1.69 → phykit-2.1.71}/phykit.egg-info/requires.txt +0 -0
  133. {phykit-2.1.69 → phykit-2.1.71}/phykit.egg-info/top_level.txt +0 -0
  134. {phykit-2.1.69 → phykit-2.1.71}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: phykit
3
- Version: 2.1.69
3
+ Version: 2.1.71
4
4
  Home-page: https://github.com/jlsteenwyk/phykit
5
5
  Author: Jacob L. Steenwyk
6
6
  Author-email: jlsteenwyk@gmail.com
@@ -55,6 +55,8 @@ ALIAS_TO_HANDLER: Dict[str, str] = {
55
55
  "sum_of_pairs_score": "sum_of_pairs_score",
56
56
  "sops": "sum_of_pairs_score",
57
57
  "sop": "sum_of_pairs_score",
58
+ "phylo_gwas": "phylo_gwas",
59
+ "pgwas": "phylo_gwas",
58
60
  "vs": "variable_sites",
59
61
  # Tree aliases
60
62
  "bss": "bipartition_support_stats",
@@ -167,6 +167,9 @@ class Phykit:
167
167
  - calculate sum-of-pairs score between a reference and query alignment
168
168
  thread_dna (alias: pal2nal; p2n)
169
169
  - thread dna sequences over a protein alignment
170
+ phylo_gwas (alias: pgwas)
171
+ - phylogenetic genome-wide association study
172
+ (Pease et al. 2016 approach)
170
173
  variable_sites (alias: vs)
171
174
  - calculates the number and percentage of variable sites
172
175
  in an alignment
@@ -1878,6 +1881,115 @@ class Phykit:
1878
1881
  _add_json_argument(parser)
1879
1882
  _run_service(parser, argv, VariableSites)
1880
1883
 
1884
+ @staticmethod
1885
+ def phylo_gwas(argv):
1886
+ parser = _new_parser(
1887
+ description=textwrap.dedent(
1888
+ f"""\
1889
+ {help_header}
1890
+
1891
+ Phylogenetic genome-wide association study following the
1892
+ Pease et al. (2016) approach.
1893
+
1894
+ Performs per-site association tests between alignment
1895
+ columns and a phenotype (categorical or continuous),
1896
+ applies Benjamini-Hochberg FDR correction, optionally
1897
+ classifies significant associations as monophyletic or
1898
+ polyphyletic using a phylogenetic tree, and produces a
1899
+ Manhattan plot.
1900
+
1901
+ Categorical phenotypes use Fisher's exact test (2 groups)
1902
+ or chi-squared test (>2 groups). Continuous phenotypes use
1903
+ point-biserial correlation. Only biallelic sites are tested.
1904
+
1905
+ Aliases:
1906
+ phylo_gwas, pgwas
1907
+ Command line interfaces:
1908
+ pk_phylo_gwas, pk_pgwas
1909
+
1910
+ Usage:
1911
+ phykit phylo_gwas -a <alignment> -d <phenotype> -o <output>
1912
+ [-t <tree>] [-p <partition>] [--alpha 0.05]
1913
+ [--exclude-monophyletic] [--csv <file>] [--json]
1914
+ [shared plot options]
1915
+
1916
+ Options
1917
+ =====================================================
1918
+ -a/--alignment FASTA alignment file
1919
+
1920
+ -d/--phenotype two-column TSV file:
1921
+ taxon<tab>phenotype
1922
+
1923
+ -o/--output output Manhattan plot path
1924
+
1925
+ -t/--tree optional Newick tree for
1926
+ monophyletic/polyphyletic
1927
+ classification
1928
+
1929
+ -p/--partition optional RAxML-style partition
1930
+ file for gene annotations
1931
+
1932
+ --alpha FDR significance threshold
1933
+ (default: 0.05)
1934
+
1935
+ --exclude-monophyletic exclude monophyletic
1936
+ associations from results
1937
+
1938
+ --dot-size scale factor for dot size
1939
+ in the Manhattan plot
1940
+ (default: 1.0; use 2.0
1941
+ for double, 0.5 for half)
1942
+
1943
+ --csv output per-site results as CSV
1944
+ to the specified file
1945
+
1946
+ --fig-width figure width in inches
1947
+ (auto-scaled if omitted)
1948
+
1949
+ --fig-height figure height in inches
1950
+ (auto-scaled if omitted)
1951
+
1952
+ --dpi resolution in DPI
1953
+ (default: 300)
1954
+
1955
+ --no-title hide the plot title
1956
+
1957
+ --title custom title text
1958
+
1959
+ --legend-position legend location (e.g.,
1960
+ "upper right", "none")
1961
+
1962
+ --ylabel-fontsize font size for y-axis labels;
1963
+ 0 to hide
1964
+
1965
+ --xlabel-fontsize font size for x-axis labels;
1966
+ 0 to hide
1967
+
1968
+ --title-fontsize font size for the title
1969
+
1970
+ --axis-fontsize font size for axis labels
1971
+
1972
+ --colors comma-separated colors
1973
+ (hex or named)
1974
+
1975
+ --json optional argument to output
1976
+ results as JSON
1977
+ """
1978
+ ),
1979
+ )
1980
+ parser.add_argument("-a", "--alignment", type=str, required=True, help=SUPPRESS, metavar="")
1981
+ parser.add_argument("-d", "--phenotype", type=str, required=True, help=SUPPRESS, metavar="")
1982
+ parser.add_argument("-o", "--output", type=str, required=True, help=SUPPRESS, metavar="")
1983
+ parser.add_argument("-t", "--tree", type=str, default=None, help=SUPPRESS, metavar="")
1984
+ parser.add_argument("-p", "--partition", type=str, default=None, help=SUPPRESS, metavar="")
1985
+ parser.add_argument("--alpha", type=float, default=0.05, help=SUPPRESS, metavar="")
1986
+ parser.add_argument("--exclude-monophyletic", action="store_true", default=False, help=SUPPRESS)
1987
+ parser.add_argument("--dot-size", type=float, default=1.0, help=SUPPRESS, metavar="")
1988
+ parser.add_argument("--csv", type=str, default=None, help=SUPPRESS, metavar="")
1989
+ add_plot_arguments(parser)
1990
+ _add_json_argument(parser)
1991
+ _run_service(parser, argv, PhyloGwas)
1992
+
1881
1993
  @staticmethod
1882
1994
  def alignment_subsample(argv):
1883
1995
  parser = _new_parser(
@@ -3442,6 +3554,10 @@ class Phykit:
3442
3554
  gene trees for discordance-aware
3443
3555
  VCV computation
3444
3556
 
3557
+ --multivariate compute K_mult (Adams 2014)
3558
+ for multivariate traits using
3559
+ a multi-column TSV file
3560
+
3445
3561
  --json optional argument to output
3446
3562
  results as JSON
3447
3563
  """
@@ -3476,6 +3592,10 @@ class Phykit:
3476
3592
  "-g", "--gene-trees", type=str, required=False, default=None,
3477
3593
  help=SUPPRESS, metavar=""
3478
3594
  )
3595
+ parser.add_argument(
3596
+ "--multivariate", action="store_true", default=False,
3597
+ help=SUPPRESS,
3598
+ )
3479
3599
  _add_json_argument(parser)
3480
3600
  _run_service(parser, argv, PhylogeneticSignal)
3481
3601
 
@@ -8155,6 +8275,10 @@ def dstatistic(argv=None):
8155
8275
  Phykit.dstatistic(sys.argv[1:])
8156
8276
 
8157
8277
 
8278
+ def phylo_gwas(argv=None):
8279
+ Phykit.phylo_gwas(sys.argv[1:])
8280
+
8281
+
8158
8282
  def dfoil(argv=None):
8159
8283
  Phykit.dfoil(sys.argv[1:])
8160
8284
 
@@ -44,6 +44,7 @@ RelativeCompositionVariability = _LazyServiceFactory("phykit.services.alignment.
44
44
  RelativeCompositionVariabilityTaxon = _LazyServiceFactory("phykit.services.alignment.rcvt", "RelativeCompositionVariabilityTaxon")
45
45
  RenameFastaEntries = _LazyServiceFactory("phykit.services.alignment.rename_fasta_entries", "RenameFastaEntries")
46
46
  SumOfPairsScore = _LazyServiceFactory("phykit.services.alignment.sum_of_pairs_score", "SumOfPairsScore")
47
+ PhyloGwas = _LazyServiceFactory("phykit.services.alignment.phylo_gwas", "PhyloGwas")
47
48
  VariableSites = _LazyServiceFactory("phykit.services.alignment.variable_sites", "VariableSites")
48
49
 
49
50
  AncestralReconstruction = _LazyServiceFactory("phykit.services.tree.ancestral_reconstruction", "AncestralReconstruction")
@@ -26,6 +26,7 @@ _EXPORTS = {
26
26
  "RelativeCompositionVariabilityTaxon": "rcvt",
27
27
  "RenameFastaEntries": "rename_fasta_entries",
28
28
  "SumOfPairsScore": "sum_of_pairs_score",
29
+ "PhyloGwas": "phylo_gwas",
29
30
  "VariableSites": "variable_sites",
30
31
  }
31
32