getSignedGraph: Given a graph, builds a signed version of the adjacency...

Description Usage Arguments Value Author(s) Examples

View source: R/getSignedGraph.R

Description

Given a graph, builds a signed version of the adjacency matrix taking into account the type of interaction (e.g., activation or inhibition).

Usage

1
getSignedGraph(graph, positiveInteractionLabels=c("activation", "expression"), negativeInteractionLabels=c("inhibition", "repression"), verbose=FALSE)

Arguments

graph

A graph object.

positiveInteractionLabels

A character vector specifying which interaction labels correspond to positive interactions. Defaults to 'c("activation", "expression")'.

negativeInteractionLabels

A character vector specifying which interaction labels correspond to negative interactions. Defaults to 'c("inhibition", "repression")'.

verbose

If TRUE, extra information is output.

Value

This function returns a squared matrix whose (i,j) entry is:

0

if edges i and j are not connected

1

if edges i and j are connected by a positive interaction

-1

if edges i and j are connected by a negative interaction.

By construction, the absolute value of this matrix is the adjacency matrix of the graph. Edges which cannot interpreted as corresponding to a positive or a negative interaction are marked as not connected.

Author(s)

Laurent Jacob, Pierre Neuvial and Sandrine Dudoit

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data("Loi2008_DEGraphVignette")
exprData <- exprLoi2008
rn <- rownames(exprData)

## Retrieve expression levels data for genes from one KEGG pathway
graph <- grListKEGG[[1]]
pname <- attr(graph, "label")
cat(verbose, "Pathway name: ", pname)

sgraph <- getSignedGraph(graph, verbose=TRUE)
print(sgraph)

graphList <- getConnectedComponentList(graph, verbose=TRUE)
print(graphList)

DEGraph documentation built on Nov. 8, 2020, 5:52 p.m.