powered by
summarizeSubtrees calculates summary statistics for each node of a tree. Includes both node properties and subtree properties.
summarizeSubtrees
summarizeSubtrees(graph, fields = NULL, root = "Germline")
igraph object containing an annotated lineage tree.
annotation fields to add to the output.
name of the root (germline) node.
A data.frame with columns:
name: node name.
name
parent: name of the parent node.
parent
outdegree: number of edges leading from the node.
outdegree
size: total number of nodes within the subtree rooted at the node.
size
depth: the depth of the subtree that is rooted at the node.
depth
pathlength: the maximum pathlength beneath the node.
pathlength
outdegree_norm: outdegree normalized by the total number of edges.
outdegree_norm
size_norm: size normalized by the largest subtree size (the germline).
size_norm
depth_norm: depth normalized by the largest subtree depth (the germline).
depth_norm
pathlength_norm: pathlength normalized by the largest subtree pathlength (the germline).
pathlength_norm
An additional column corresponding to the value of field is added when specified.
field
See buildPhylipLineage for generating input trees. See getPathLengths for calculating path length to nodes.
# NOT RUN { # Summarize a tree graph <- ExampleTrees[[23]] summarizeSubtrees(graph, fields="c_call", root="Germline") # }
Run the code above in your browser using DataLab