Genome scale network model
From CSBLwiki
(Difference between revisions)
Line 7: | Line 7: | ||
:[http://www.bioconductor.org/packages/release/bioc/html/rsbml.html rsbml] | :[http://www.bioconductor.org/packages/release/bioc/html/rsbml.html rsbml] | ||
:[http://cran.r-project.org/web/packages/BiGGR/index.html BiGGR] | :[http://cran.r-project.org/web/packages/BiGGR/index.html BiGGR] | ||
+ | :Drawing network graphs (nodes and edges) with R/BioConductor [http://www2.warwick.ac.uk/fac/sci/moac/students/peter_cock/r/rgraphviz/] | ||
<pre> | <pre> | ||
source("http://bioconductor.org/biocLite.R") | source("http://bioconductor.org/biocLite.R") |
Revision as of 16:22, 21 July 2011
- Graph Visualization
- Bioconductor Install
- Rgraphviz
- rsbml
- BiGGR
- Drawing network graphs (nodes and edges) with R/BioConductor [1]
source("http://bioconductor.org/biocLite.R") ## requirement: libsbml, graphviz library biocLite("rsbml","Rgraphviz","BiGGR",type="source") # compiling from source code ### ### visualization of stoichiometric matrix ### library("BiGGR") # <- related packages automatically ON (graph, igraph,...) load("shewanella.rdata") #sm # stoichiometric matrix metabo = rownames(sm) # metabolites fluxname = colnames(sm) # reactions dim(sm) am = matrix(0,729,729) # null adj. matrix dimnames(am) = list(metabo,metabo); am[1:5,1:5] ## converting sm to am for(i in 1:ncol(sm)) { # i = 1 ind = names(sm[which(sm[,i]!=0),i]) am[ind,ind] = 1 # print(i) } diag(am) = 0 # set digonal '0' ## Too many edges such as ATP, H2O, PPi.... cofact = sort(rowSums(am),decreasing=T)[1:100] cofact # top 100; mostly cofactors, tRNA... cof.ind = which(metabo %in% names(cof)) am.m = am[-cof.ind,-cof.ind] dim(am.m) # 629 629 ## adjacency matrix to graph obj. gl = new("graphAM",adjMat=am.m)