setEdgeWeights: Set gene weights based on edge type

Description Usage Arguments Value Author(s) Examples

View source: R/graphWeights.R

Description

setEdgeWeights

Usage

1
2
3
4
setEdgeWeights(graphList, edgeTypeAttr = "subtype",
  edgeWeightByType = list(activation = 1, inhibition = -1, expression = 1,
  repression = -1), defaultWeight = 0, combineWeights = sum,
  nodeOnlyGraphs = FALSE)

Arguments

graphList

a list of graphNEL objects

edgeTypeAttr

edge attribute to be considered as the edge type. If the edge has multiple types, the edge type attribute is considered as a comma separeted list of types

edgeWeightByType

named list of weigths, where the names of the list are the edge type (values of the attribute defined by edgeTypeAttr)

defaultWeight

default value for an edge with a type not defined in edgeWeightByType

combineWeights

for the edges with multiple types, the function to be applied on the vector of weights

nodeOnlyGraphs

boolean value marking if graphs with no edges should be returned or not; note that graphs with all edge weights equal to 0 are considered node only graphs

Value

The graphList with the edge weights set.

Author(s)

Calin Voichita and Sorin Draghici

Examples

1
2
3
4
5
6
# load the set of pathways
kpg <- keggPathwayGraphs("hsa")

kpg <- setEdgeWeights(kpg)

edgeWeights(kpg[["path:hsa04110"]])

ROntoTools documentation built on Nov. 8, 2020, 7:41 p.m.