Skip to content

Commit

Permalink
Merge pull request #102 from natetrux/master
Browse files Browse the repository at this point in the history
Network Restructuring without Hidden Files
  • Loading branch information
eaton-lab authored Nov 29, 2024
2 parents 17b1e48 + 0ebef82 commit 4847a1d
Show file tree
Hide file tree
Showing 5 changed files with 578 additions and 43 deletions.
49 changes: 49 additions & 0 deletions toytree/annotate/src/add_admixture_edge.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/usr/bin/env python

"""
Adds admixture edge to existing ToyTree Object.
Method
------
Creates and draws an admixture edge between two tree tips
>>> annotate.add_admixture_edge()
"""

import numpy as np
import toyplot
from toyplot.coordinates import Cartesian
from loguru import logger
from toytree import ToyTree, Node
from toytree.core.apis import add_subpackage_method, AnnotationAPI
from toytree.annotate.src.checks import get_last_toytree_mark, assert_tree_matches_mark



@add_subpackage_method(AnnotationAPI)
def add_admixture_edge(
tree: ToyTree,
axes: Cartesian,
src: Node = None,
dest: Node = None
) -> Mark:
"""Returns a Toyplot mark of the admixture edge added.
Parameters
----------
src: source node at which the admixture edge will start
dest: destination where the admixture edge will end
Below is old implementation
TODO: add functionality for this argument to add_admixture_edge
Admixture edges add colored edges to the plot in the
style of the 'edge_align_style'. These will be drawn
from (source, dest, height, width, color). Example:
`>>> [(4, 3, 50000, 3, 'red')]`.
fixed_order: Sequence[str]
"""
12 changes: 7 additions & 5 deletions toytree/infer/src/phylomaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@
Data Sources
------------
[name scope ntips nnodes reference]
[-------------------------------------------------------]
[... birds 10,000 20,000 author...]
[... plants 300,000 400,000 author...]
[... ... ... ... ... ]
[name scope ntips nnodes reference]
[----------------------------------------------------------------------------------------------------------------]
[World Plants (WP) vascular plants 355,576 ... Hassler, Michael (1994 - 2024): World Plants. Synonymic Checklist and Distribution of the World Flora. Version 24.11; last update November 5th, 2024.]
[Leipzig Plant Catalogue (LCVP) vascular plants 351,180 (+6,160 hybrids) ... Freiberg M (2020). The Leipzig catalogue of vascular plants. German Centre for Integrative Biodiversity Research (iDiv) Halle-Jena-Leipzig. Checklist dataset https://doi.org/10.15468/9qxmn3 accessed via GBIF.org on 2024-11-25.]
[TreeFam (TF) animal gene trees ... ... Jue Ruan, Heng Li, et al. Nucleic Acids Research (2008) doi: 10.1093/nar/gkm1005]
[BirdTree (BT) birds 9,993 ... Jetz, W., G. H. Thomas, J. B. Joy, K. Hartmann, and A. O. Mooers. 2012. The global diversity of birds in space and time. Nature 491:444-448 ]
Development Plan
-----------------
Expand Down
Loading

0 comments on commit 4847a1d

Please sign in to comment.