Skip to content

Commit

Permalink
cleanup parse network
Browse files Browse the repository at this point in the history
  • Loading branch information
eaton-lab committed Dec 8, 2024
1 parent 84118bb commit 1481a26
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions toytree/network/src/parse_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,13 @@ def get_major_tree_and_admix_edges(self) -> Tuple:


# USER FUNCTION
def parse_network_to_tree_and_admix(
net: Union[str, Path],
) -> Tuple[toytree.ToyTree, List[Tuple]]:
def parse_network_to_tree_and_admix(net: Union[str, Path]) -> Tuple[toytree.ToyTree, List[Tuple]]:
"""..."""
parse = NetworkToMajorTree(net)
tree, admix = parse.get_major_tree_and_admix_edges()
return tree, admix
'''


# Possible Implementation of Network Parse WITHOUT using class NetworkToMajorTree:
def parse_network(net: Union[str, Path], disconnect=True):
"""Parse a network file to extract a major topology and admix dict.
Expand Down Expand Up @@ -303,7 +302,6 @@ def parse_network(net: Union[str, Path], disconnect=True):
net = net.mod.ladderize()
return net, admix

'''
# def test3A():
# net = "(((r0,#H1:::0.9),r2),(r3,(r4,#H1:::0.1)));"
# return parse_network(net)
Expand Down

0 comments on commit 1481a26

Please sign in to comment.