:py:mod:`biotaphy.analyses.site_statistics` =========================================== .. py:module:: biotaphy.analyses.site_statistics .. autoapi-nested-parse:: Module containing functions for computing site statistics. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: biotaphy.analyses.site_statistics.calculate_tree_site_statistics biotaphy.analyses.site_statistics.get_tip_lengths biotaphy.analyses.site_statistics.mean_node_height biotaphy.analyses.site_statistics.mean_tip_length biotaphy.analyses.site_statistics.median_node_height biotaphy.analyses.site_statistics.median_tip_length biotaphy.analyses.site_statistics.node_height_percentile_25 biotaphy.analyses.site_statistics.node_height_percentile_2_5 biotaphy.analyses.site_statistics.node_height_percentile_75 biotaphy.analyses.site_statistics.node_height_percentile_97_5 biotaphy.analyses.site_statistics.tip_length_percentile_25 biotaphy.analyses.site_statistics.tip_length_percentile_2_5 biotaphy.analyses.site_statistics.tip_length_percentile_75 biotaphy.analyses.site_statistics.tip_length_percentile_97_5 Attributes ~~~~~~~~~~ .. autoapisummary:: biotaphy.analyses.site_statistics.TOLERANCE .. py:data:: TOLERANCE :annotation: = 0.005 .. py:function:: calculate_tree_site_statistics(pam, tree) Calculate tree statistics for each site in a PAM. :param pam: A PAM to compute statistics for. :type pam: Matrix :param tree: A corresponding tree to use for statistics. :type tree: TreeWrapper :returns: Matrix - A site by statistic matrix of tree pam statistics. .. py:function:: get_tip_lengths(tree) Get the tip lengths in a tree. :param tree: A tree object to get tip lengths from. :type tree: Tree :returns: A list of tip lengths in the tree. :rtype: list .. py:function:: mean_node_height(tree) Get the mean node height for the tree. :param tree: A tree object used to measure node heights. :type tree: Tree :returns: The mean height of the nodes in the tree. :rtype: float .. py:function:: mean_tip_length(tree) Determine the mean tip length for the tips in a tree. :param tree: A tree object used to retrieve tip lengths. :type tree: Tree :returns: The mean tip length for the tips in the tree. :rtype: float .. py:function:: median_node_height(tree) Get the median node height for the tree. :param tree: A tree object used to measure node heights. :type tree: Tree :returns: The median height of the nodes in the tree. :rtype: float .. py:function:: median_tip_length(tree) Determine the median tip length for the tips in a tree. :param tree: A tree object used to retrieve tip lengths. :type tree: Tree :returns: The median tip length for the tips in the tree. :rtype: float .. py:function:: node_height_percentile_25(tree) Determine the 25 percentile node height for a tree. :param tree: A tree object used to measure node heights. :type tree: Tree :returns: The 25 percentile node height for the tree. :rtype: float .. py:function:: node_height_percentile_2_5(tree) Determine the 2.5 percentile node height for a tree. :param tree: A tree object used to measure node heights. :type tree: Tree :returns: The 2.5 percentile node height for the tree. :rtype: float .. py:function:: node_height_percentile_75(tree) Determine the 75 percentile node height for a tree. :param tree: A tree object used to measure node heights. :type tree: Tree :returns: The 75 percentile node height for the tree. :rtype: float .. py:function:: node_height_percentile_97_5(tree) Determine the 97.5 percentile node height for a tree. :param tree: A tree object used to measure node heights. :type tree: Tree :returns: The 97.5 percentile node height for the tree. :rtype: float .. py:function:: tip_length_percentile_25(tree) Determine the 25 percentile for tip length for the tips of the tree. :param tree: A tree object used to retrieve tip lengths. :type tree: Tree :returns: The 25 percentile tip length for the tips in the tree. :rtype: float .. py:function:: tip_length_percentile_2_5(tree) Determine the 2.5 percentile for tip length for the tips of the tree. :param tree: A tree object used to retrieve tip lengths. :type tree: Tree :returns: The 2.5 percentile tip length for the tips in the tree. :rtype: float .. py:function:: tip_length_percentile_75(tree) Determine the 75 percentile for tip length for the tips of the tree. :param tree: A tree object used to retrieve tip lengths. :type tree: Tree :returns: The 75 percentile tip length for the tips in the tree. :rtype: float .. py:function:: tip_length_percentile_97_5(tree) Determine the 97.5 percentile for tip length for the tips of the tree. :param tree: A tree object used to retrieve tip lengths. :type tree: Tree :returns: The 97.5 percentile tip length for the tips in the tree. :rtype: float