CalcAdj: Calculate the adjacency matrix

Description Usage Arguments Value Examples

View source: R/CalcAdj.R

Description

Calculate the adjacency matrix of the signed undirected graph of the pathway topology

Usage

1
CalcAdj(EdgeFrom,EdgeTo,interaction)

Arguments

EdgeFrom

A character vector of gene symbols of one end of the edges.

EdgeTo

A character vector of gene symbols of the other end of the edges.

interaction

A numeric vector with components of 1 and -1 to denote activation and inhibition for the edges.

Value

If the graph of the pathway topology is balanced (no conflict in the interactions), then a numeric adjacency matrix is returned. The row names and column names are the nodes in the pathway.

Examples

1
2
3
4
5
# obtain edge information of a pathway
Edges <- AllEdges[AllEdges$Pathway=="hsa04150",]

# calculate the signed adjacency matrix of the pathway topology
CalcAdj(EdgeFrom=Edges$GeneSymbol_a,EdgeTo=Edges$GeneSymbol_b,interaction=Edges$Interaction)

uc-bd2k/paslincs documentation built on May 28, 2020, 8:20 a.m.