proximity_average: Proximity from target to source

Description Usage Arguments Value Examples

View source: R/proximity_avr.R

Description

Calculates the proximity (average or closest) from source to targets.

Usage

1

Arguments

G

The original graph (often an interactome).

source

nodes from the network (in a drug repurpusing set-up those are the disease genes)

targets

targets in the network (in a drug repurpusing set-up those are the drug-targets)

Value

the proximity value for the source-targets

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#' set.seed(666)
net  = data.frame(
Node.1 = sample(LETTERS[1:15], 15, replace = TRUE),
Node.2 = sample(LETTERS[1:10], 15, replace = TRUE))
net$value = 1
net =  CoDiNA::OrderNames(net)
net = unique(net)

g <- igraph::graph_from_data_frame(net, directed = FALSE )
T = c("G", "A", "D")
S = c("C", "M")
proximity_average(g, source = S, targets = T)

NetSci documentation built on Dec. 11, 2021, 9:21 a.m.