Calculate LBI for a given tree and one or more sets of parameters.
- augur.lbi.calculate_LBI(tree, attr='lbi', tau=0.4, transform=<function <lambda>>, normalize=True)
traverses the tree in postorder and preorder to calculate the up and downstream tree length exponentially weighted by distance. then adds them as LBI tree – biopython tree for whose node the LBI is being computed attr – the attribute name used to store the result
- augur.lbi.select_nodes_in_season(tree, timepoint, time_window=0.6)
Annotate a boolean to each node in the tree if it is alive at the given timepoint or prior to the timepoint by the given time window preceding.
This annotation is used by the LBI and epitope cross-immunity predictors.