An R-package for finding active metabolic modules in atom transition network.
Full vignette can be found here.
library(devtools)
install_github("ctlab/gatom")
library(gatom)
library(data.table)
library(igraph)
First let's load data with atom mappings (network
object),
enzyme annotations for mouse (org.Mm.eg.gatom
)
and metabolite annotations (met.kegg.db.rda
):
data("networkEx")
data("org.Mm.eg.gatom.annoEx")
data("met.kegg.dbEx")
Loading input data:
data("met.de.rawEx")
data("gene.de.rawEx")
Getting atom graph:
g <- makeAtomGraph(network=networkEx,
org.gatom.anno=org.Mm.eg.gatom.annoEx,
gene.de=gene.de.rawEx,
met.db=met.kegg.dbEx,
met.de=met.de.rawEx)
print(g)
Scoring graph:
gs <- scoreGraph(g, k.gene = 25, k.met=25)
Finding a module:
set.seed(42)
m <- solveSgmwcsRandHeur(gs, max.iterations = 2000)
print(m)
E(m)$label
V(m)$label
We can save the module to different formats (dot, xgmml, svg, pdf):
saveModuleToPdf(m, file="M0.vs.M1.pdf", name="M0.vs.M1", n_iter=100, force=1e-5, seed=1)