CalcTopoSig: Calculate spectral decomposition of a pathway topology

Description Usage Arguments Value Examples

View source: R/CalcTopoSig.R

Description

Calculate eigenvalues and eigenvectors of a signed undirected adjacency matrix

Usage

1
CalcTopoSig(EdgeFrom,EdgeTo,interaction,AdjMat=NULL)

Arguments

EdgeFrom

A character vector of gene symbols of one end of the edges. This parameter is ignored if AdjMat is specified.

EdgeTo

A character vector of gene symbols of the other end of the edges. This parameter is ignored if AdjMat is specified.

interaction

A numeric vector with components of 1 and -1 to denote activation and inhibition for the edges. This parameter is ignored if AdjMat is specified.

AdjMat

The signed undirected adjacency matrix for the pathway topology.

Value

If the pathway topology is a balanced signed undirected graph (no conflict in the interactions), the returned value is a list of eigenvalues and eigenvectors of the signed undirected adjacency matrix of the graph, otherwise, NULL is returned.

Examples

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

# calculate the eigenvalues and eigenvectors by specifying edge information
CalcTopoSig(EdgeFrom=Edges$GeneSymbol_a,EdgeTo=Edges$GeneSymbol_b,interaction=Edges$Interaction)

# calculate the eigenvalues and eigenvectors by specifying adjacency matrix
AdjMat <- CalcAdj(EdgeFrom=Edges$GeneSymbol_a,EdgeTo=Edges$GeneSymbol_b,interaction=Edges$Interaction)
CalcTopoSig(AdjMat=AdjMat)

uc-bd2k/paslincs documentation built on Nov. 25, 2019, 8:38 p.m.