setEdgeWeights {ROntoTools} | R Documentation |
setEdgeWeights
setEdgeWeights(graphList, edgeTypeAttr = "subtype", edgeWeightByType = list(activation = 1, inhibition = -1, expression = 1, repression = -1), defaultWeight = 0, combineWeights = sum, nodeOnlyGraphs = FALSE)
graphList |
a list of |
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 |
defaultWeight |
default value for an edge with a type not defined in |
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 |
The graphList
with the edge weights set.
Calin Voichita and Sorin Draghici
# load the set of pathways kpg <- keggPathwayGraphs("hsa") kpg <- setEdgeWeights(kpg) edgeWeights(kpg[["path:hsa04110"]])