brokilon.ccd.domain.transmission.find_infectors module¶
Module contains functions regarding the computation and plotting of WIW networks for transmission trees and transmission CCDs.
- brokilon.ccd.domain.transmission.find_infectors.find_infector(node, indirect: bool = False)[source]¶
Takes a node in a transmission annotated phylogenetic tree and returns its infector.
- Parameters:
indirect – Infer indirect transmissions, i.e. find last known infector
node – Node of which to find the infector.
- Returns:
Infector of node
- brokilon.ccd.domain.transmission.find_infectors.find_infector_unknown(cur_u_node, root_node)[source]¶
Finds the infector of nodes that are unknown, not leafs
- Parameters:
cur_u_node – A node whose transm_ancest is unknown
root_node – The root node of a tree (tree.get_tree_root())
- Returns:
- brokilon.ccd.domain.transmission.find_infectors.find_infector_with_data(node, root_node, indirect: bool = False)[source]¶
Finds the infector with extra data: distance to root of start and end of infection
- Parameters:
node – The node to find the infector of, in this case assumes to be a leaf
root_node – The root node object of a tree (tree.get_tree_root())
indirect – Currently not supported?
- Returns: