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: PATHLEGNTH normalized by the largest subtree pathlength (the germline).
PATHLENGTH_NORM
PATHLEGNTH
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.
# Summarize a tree graph <- ExampleTrees[[23]] summarizeSubtrees(graph, fields="ISOTYPE", root="Germline")
Run the code above in your browser using DataLab