bp2.minimum.spanning.tree: Solve minimum spanning trees for follower lists

Description Usage Arguments Value Note Author(s) Examples

Description

Solves minimum spanning tree for a graph of BioPAX classes based on follower list returned by bp2.find.followers. This is useful for solving minimum distances between model objects. The types of relations that are considered are selected

Usage

1
2
tree <- bp2.minimum.spanning.tree(follower.list, root, max.depth=length(follower.list))
bp2.print.tree(tree)

Arguments

follower.list

Follower list representation of bp2 model object ids as returned by bp2.follower.list objects.

root

Index of root vertex in follower.list

max.depth

Maximum distance from root, after which the algorithm is terminated.

tree

Spanning tree data.frame returned by bp2.minimum.spanning.tree

Value

Returns data.frame that contains columns of same length than follower.list: id, parent and distance. id is the index in the follower.list, parent is the id of parent vertex for the given id and dist is the distance from root.

Note

This function is not very useful for general use until bp2.find.followers supports configuration of include.slots argument separately for different class types. Use bp2.find.nodes for constructing interesting graphs based on BioPAX data.

Author(s)

Ossi Koivistoinen

Examples

1
2
3
4
5
my.bp2 <- bp2.create.model(...)
complexes <- bp2.get.instances.of(my.bp2@all.objects, "bp2.complex")
followers <- bp2.find.followers(pathways, include.slots=''components,physicalEntity'') 
tree <- bp2.minimum.spanning.tree(followers, 1)
bp2.print.tree(tree)

microbiome/biopax2 documentation built on May 22, 2019, 9:56 p.m.