Tree.read_distance_matrix

Read distance matrix of the same format outputed by folder.distance_matrix. [source]
Parameters:
path : string
  Path to where the dictionary is saved.

dict_type :
{'inner_node_dict', 'leaf_dict'} default = '.txt'
  Dictionary type. The dictionary may describe inner node connections or leaf connections.
Returns:
dict : dictionary
  Dictionary describing the tree structure.
See also:
tree.make_tree
 Search for the best tree of a given distance matrix.

tree.read_distance_matrix
 Read distance matrix of the same format outputed by folder.distance_matrix.

Example:

# Imports
from zgli.tree import load_dict

# Load dicts
inner_node_dict = load_dict('dicts/inner_node_dict.txt', 'inner_node_dict')
leaf_dict = load_dict('dicts/leaf_dict.txt', 'leaf_dict')