Learn R Programming

ROntoTools (version 2.0.0)

setEdgeWeights: Set gene weights based on edge type

Description

setEdgeWeights

Usage

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.

Examples

Run this code

# load the set of pathways
kpg <- keggPathwayGraphs("hsa")

kpg <- setEdgeWeights(kpg)

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

Run the code above in your browser using DataLab