Learn R Programming

rTRM (version 1.10.2)

findTRM: Indentifies a TRM associated with a target node and one or more query nodes.

Description

This the main function used to identify TRMs. It takes a graph object and use it to search in the neighborhood of a target node for query nodes that are separated a maximum distance (controlled by max.bridge parameter).

Usage

findTRM(g, target, query, method = "nsa", max.bridge = 1, extended = FALSE, strict = FALSE, type = "igraph")

Arguments

g
the network used to identify TRMs (tipically a PPI network)
target
character variable with the name of a target node.
query
character vector with the list of query nodes.
method
method to use.
max.bridge
maximum number of nodes allowed between the target and query nodes.
extended
whether to allow distance restrictions to include both target and query nodes.
strict
whether to return a single component (using decompose.graph())
type
type of graph object to return, either an "igraph" (the default) or a "graphNEL"

Value

  • A network in igraph format or NULL.

Details

Currently only "first" and "nsa" methods are available. First is used for tests and returns the first neighborhood of the target node. Method "nsa" implements the TRM finding algorithm.

Examples

Run this code
# load example network.
load(system.file(package = "rTRM", "extra/example.rda"))

# define target and query nodes.
target = "N6"
query = c("N7", "N12", "N28")

# find TRM:
s = findTRM(g, target = target, query = query, method = "nsa", max.bridge = 1)

Run the code above in your browser using DataLab