Description Usage Arguments Value Author(s) See Also Examples
View source: R/sbml2hyperdraw.R
Convert an SBML model to a RagraphBPH
using
hypergraph
. Metabolites are displayed as nodes and reactions are
displayed as directed edges connecting the nodes. If a vector of rates
is given, edge widths are weighted according to the rates. For
negative rates, edges are drawn in red and the arrow between the
metabolites is reversed to represent the correct direction of the flux.
1 2 | sbml2hyperdraw(sbml.model, rates ,relevant.species,
relevant.reactions,layoutType, lwd.max, lwd.min, plt.margins)
|
sbml.model |
an rsbml |
rates |
a named |
relevant.species |
a |
relevant.reactions |
a |
layoutType |
is a character string representing the layout engine to
be used for visualization. Current supported layouts are
"dot", "twopi","neato","fdp","sfdp" and "circo". Defaults to
"dot". See |
lwd.max |
a |
lwd.min |
a |
plt.margins |
A numerical vector of the form c(bottom, left, top, right) giving additional white space around the graph (in case long node or edge labels fall outside the plotting region). Defaults to c(150,150,150,150). |
Object of class RagraphBPH
with the hypergraph representation of the SBML object.
Hannes Hettling <j.hettling@vu.nl>, Anand K. Gavai <anand.gavai@bioinformatics.nl>
RagraphBPH hyperdraw
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ##Generate an example model
path <- system.file("extdata", "Glycolysis_TCA_recon2_reactionIDs.txt", package="BiGGR")
reaction.ids <- scan(path, what=" ")
data("Recon2")
model <- buildSBMLFromReactionIDs(reaction.ids, Recon2)
##Plot ATP and ADP in cytosol and mitochondrion in model without rates
rel.sp <- c("M_adp_c", "M_atp_c", "M_adp_m", "M_atp_m")
hd <- sbml2hyperdraw(model, relevant.species=rel.sp)
plot(hd)
##Plot model with random rates
rates <- rnorm(length(model@reactions))
names(rates) <- sapply(model@reactions, id)
hd <- sbml2hyperdraw(model, rates=rates, relevant.species=rel.sp, lwd.max=4)
plot(hd)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.