biotaphy.client.ot_service_wrapper package
Submodules
biotaphy.client.ot_service_wrapper.open_tree module
Module for Open Tree of Life client.
- class biotaphy.client.ot_service_wrapper.open_tree.LABEL_FORMAT[source]
Bases:
object
Represents the label format constants used when calling induced subtree.
- biotaphy.client.ot_service_wrapper.open_tree.induced_subtree(ott_ids, label_format='name')[source]
Retrieves a Newick tree containing the nodes represented by the ids.
Calls the Open Tree ‘induced_subtree’ service to retrieve a tree, in Newick format, containing the nodes represented by the provided Open Tree IDs.
- Parameters
ott_ids (list) – A list of Open Tree IDs. These will be converted to integers in the request.
label_format (str) – The label string format to use when creating the tree on the server. (see: LABEL_FORMAT)
- Returns
A dictionary of the subtree response after JSON processing.
- Return type
dict
- biotaphy.client.ot_service_wrapper.open_tree.resolve_names_otol(names_list)[source]
Get information from the OTL taxon match service for a list of names.
- Parameters
names_list (
list
ofstr
) – A list of taxon names to get information for.- Returns
- A dictionary where keys are the searched taxon names and the values are
dictionaries of values from Open Tree.
- Return type
dict
Module contents
Open Tree service wrapper module __init__.