Description Usage Arguments Details Value Author(s) See Also Examples
This function allows users to replace vertex ids with another attribute, calculating connectivities based on the new attribute.
1 | reindexNetwork(graph, v.attr)
|
graph |
An annotated igraph object. |
v.attr |
Name of the attribute to use as vertex ids. |
This functions can be very useful when merging networks constructed from different databases. For example, to match a network created from Reactome to a KEGG network, you can reindex the vertices by "miriam.kegg.compound" attribute. Another usage is to remove duplicated vertices (in case of different subcellular compartments, for example). if a network has ATP_membrane & ATP_cytoplasm vertices, reindexing by chemical name will collapse them into one 'ATP' vertex.
A new graph with vertices expanded.
Ahmed Mohamed
Other Network processing methods: expandComplexes
,
makeMetaboliteNetwork
,
makeReactionNetwork
,
rmSmallCompounds
,
simplifyReactionNetwork
,
vertexDeleteReconnect
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Make a gene network from a reaction network.
data(ex_sbml) # A bipartite metbaolic network.
rgraph <- makeReactionNetwork(ex_sbml, simplify=TRUE)
ggraph <- makeGeneNetwork(rgraph)
## Expand vertices into their contituent genes.
data(ex_kgml_sig) # Ras and chemokine signaling pathways in human
ggraph <- expandComplexes(ex_kgml_sig, v.attr = "miriam.ncbigene",
keep.parent.attr= c("^pathway", "^compartment"))
## Create a separate vertex for each compartment. This is useful in duplicating
## metabolite vertices in a network.
## Not run:
graph <- expandComplexes(graph, v.attr = "compartment",
keep.parent.attr = "all",
expansion.method = "duplicate",
missing.method = "keep")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.