From 8fde1e9e033c3aa488314842f9529786686b375a Mon Sep 17 00:00:00 2001 From: Claus Jonathan Fritzemeier <clausjonathan.fritzemeier@hhu.de> Date: Wed, 17 Dec 2014 16:16:59 +0100 Subject: [PATCH] initial commit of version 2.0.8 --- DESCRIPTION | 21 + NAMESPACE | 52 + R/generics.R | 84 + R/readSBMLmod.R | 1045 +++++++ R/sbmlErrorClass.R | 187 ++ R/sbmlPtrClass.R | 187 ++ R/sybilSBML.R | 280 ++ R/uglyHack.R | 222 ++ R/zzz.R | 37 + cleanup | 4 + configure | 4694 +++++++++++++++++++++++++++++ configure.ac | 249 ++ configure.win | 0 inst/CITATION | 20 + inst/INSTALL | 70 + inst/NEWS.Rd | 356 +++ inst/README | 4 + inst/extdata/ecoli_core_model.xml | 2685 +++++++++++++++++ man/closeSBMLfile.Rd | 39 + man/delSBMLmodel.Rd | 39 + man/getSBMLCompartList.Rd | 55 + man/getSBMLReactionsList.Rd | 129 + man/getSBMLSpeciesList.Rd | 64 + man/getSBMLerrors.Rd | 70 + man/getSBMLlevel.Rd | 37 + man/getSBMLmodId.Rd | 39 + man/getSBMLmodName.Rd | 39 + man/getSBMLmodel.Rd | 40 + man/getSBMLnumCompart.Rd | 39 + man/getSBMLnumReactions.Rd | 39 + man/getSBMLnumSpecies.Rd | 39 + man/getSBMLunitDefinitionsList.Rd | 70 + man/getSBMLversion.Rd | 39 + man/openSBMLfile.Rd | 41 + man/readSBMLmod.Rd | 214 ++ man/sbmlError-class.Rd | 122 + man/sbmlPtr-class.Rd | 117 + man/validateSBMLdocument.Rd | 65 + man/versionLibSBML.Rd | 29 + src/Makevars.in | 3 + src/Makevars.win | 7 + src/init.c | 66 + src/sbml.c | 131 + src/sbml.h | 84 + src/sybilSBML.c | 1047 +++++++ src/sybilSBML.h | 100 + vignettes/sybilSBML.Rnw | 132 + vignettes/sybilSBML.bib | 97 + 48 files changed, 13229 insertions(+) create mode 100644 DESCRIPTION create mode 100644 NAMESPACE create mode 100644 R/generics.R create mode 100644 R/readSBMLmod.R create mode 100644 R/sbmlErrorClass.R create mode 100644 R/sbmlPtrClass.R create mode 100644 R/sybilSBML.R create mode 100644 R/uglyHack.R create mode 100644 R/zzz.R create mode 100755 cleanup create mode 100755 configure create mode 100644 configure.ac create mode 100644 configure.win create mode 100644 inst/CITATION create mode 100644 inst/INSTALL create mode 100644 inst/NEWS.Rd create mode 100644 inst/README create mode 100644 inst/extdata/ecoli_core_model.xml create mode 100644 man/closeSBMLfile.Rd create mode 100644 man/delSBMLmodel.Rd create mode 100644 man/getSBMLCompartList.Rd create mode 100644 man/getSBMLReactionsList.Rd create mode 100644 man/getSBMLSpeciesList.Rd create mode 100644 man/getSBMLerrors.Rd create mode 100644 man/getSBMLlevel.Rd create mode 100644 man/getSBMLmodId.Rd create mode 100644 man/getSBMLmodName.Rd create mode 100644 man/getSBMLmodel.Rd create mode 100644 man/getSBMLnumCompart.Rd create mode 100644 man/getSBMLnumReactions.Rd create mode 100644 man/getSBMLnumSpecies.Rd create mode 100644 man/getSBMLunitDefinitionsList.Rd create mode 100644 man/getSBMLversion.Rd create mode 100644 man/openSBMLfile.Rd create mode 100644 man/readSBMLmod.Rd create mode 100644 man/sbmlError-class.Rd create mode 100644 man/sbmlPtr-class.Rd create mode 100644 man/validateSBMLdocument.Rd create mode 100644 man/versionLibSBML.Rd create mode 100644 src/Makevars.in create mode 100644 src/Makevars.win create mode 100644 src/init.c create mode 100644 src/sbml.c create mode 100644 src/sbml.h create mode 100644 src/sybilSBML.c create mode 100644 src/sybilSBML.h create mode 100644 vignettes/sybilSBML.Rnw create mode 100644 vignettes/sybilSBML.bib diff --git a/DESCRIPTION b/DESCRIPTION new file mode 100644 index 0000000..92cddf1 --- /dev/null +++ b/DESCRIPTION @@ -0,0 +1,21 @@ +Package: sybilSBML +Type: Package +Title: SBML Integration in Package sybil +Version: 2.0.8 +Date: 2014-05-21 +Authors@R: c(person("Gabriel", "Gelius-Dietrich", role = c("aut", "cre"), email = "geliudie@uni-duesseldorf.de"), + person("Deya", "Alzoubi", role = "ctb")) +Maintainer: Gabriel Gelius-Dietrich <geliudie@uni-duesseldorf.de> +Depends: R (>= 2.14.2), Matrix, sybil (>= 1.2.4) +Imports: methods +Description: SBML (Systems Biology Markup Language) integration in sybil +License: GPL-3 +LazyLoad: yes +Collate: generics.R sbmlPtrClass.R sbmlErrorClass.R sybilSBML.R + uglyHack.R readSBMLmod.R zzz.R +Packaged: 2014-05-21 07:11:55 UTC; gabriel +Author: Gabriel Gelius-Dietrich [aut, cre], + Deya Alzoubi [ctb] +NeedsCompilation: yes +Repository: CRAN +Date/Publication: 2014-05-21 10:15:25 diff --git a/NAMESPACE b/NAMESPACE new file mode 100644 index 0000000..26d265c --- /dev/null +++ b/NAMESPACE @@ -0,0 +1,52 @@ +useDynLib(sybilSBML) + +import(methods) +import(Matrix) +import(sybil) + +exportClass( +sbmlPtr, +sbmlError +) + +export( +# methods +sbmlPtrType, +sbmlPointer, +sbmlDocKey, +sbmlFileName, +isNULLpointerSBML, +isSBMLdocpointer, +isSBMLmodpointer, +sbmlInfos, +sbmlWarnings, +sbmlErrors, +sbmlFatals, +sbmlDocKey, +sbmlFileName, +getNumErrors, +printSlot, +# function names +sbmlDocPointer, +sbmlModPointer, +sbmlError, +versionLibSBML, +openSBMLfile, +closeSBMLfile, +getSBMLmodel, +delSBMLmodel, +getSBMLlevel, +getSBMLversion, +validateSBMLdocument, +getSBMLerrors, +getSBMLmodId, +getSBMLmodName, +getSBMLnumCompart, +getSBMLnumSpecies, +getSBMLnumReactions, +getSBMLunitDefinitionsList, +getSBMLCompartList, +getSBMLSpeciesList, +getSBMLReactionsList, +readSBMLmod +) diff --git a/R/generics.R b/R/generics.R new file mode 100644 index 0000000..3368d67 --- /dev/null +++ b/R/generics.R @@ -0,0 +1,84 @@ +#------------------------------------------------------------------------------# +# Link to libSBML for sybil # +#------------------------------------------------------------------------------# + +# generics.R +# Link to libSBML for sybil. +# +# Copyright (C) 2010-2013 Gabriel Gelius-Dietrich, Dpt. for Bioinformatics, +# Institute for Informatics, Heinrich-Heine-University, Duesseldorf, Germany. +# All right reserved. +# Email: geliudie@uni-duesseldorf.de +# +# This file is part of sybilSBML. +# +# SybilSBML is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# SybilSBML is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with SybilSBML. If not, see <http://www.gnu.org/licenses/>. + + +#------------------------------------------------------------------------------# +# generics # +#------------------------------------------------------------------------------# + +setGeneric(name = "sbmlPtrType", + def = function(object) { standardGeneric("sbmlPtrType") } +) + +setGeneric(name = "sbmlPointer", + def = function(object) { standardGeneric("sbmlPointer") } +) + +setGeneric(name = "sbmlDocKey", + def = function(object) { standardGeneric("sbmlDocKey") } +) + +setGeneric(name = "sbmlFileName", + def = function(object) { standardGeneric("sbmlFileName") } +) + +setGeneric(name = "isNULLpointerSBML", + def = function(object) { standardGeneric("isNULLpointerSBML") } +) + +setGeneric(name = "isSBMLdocpointer", + def = function(object) { standardGeneric("isSBMLdocpointer") } +) + +setGeneric(name = "isSBMLmodpointer", + def = function(object) { standardGeneric("isSBMLmodpointer") } +) + +setGeneric(name = "sbmlInfos", + def = function(object) { standardGeneric("sbmlInfos") } +) + +setGeneric(name = "sbmlWarnings", + def = function(object) { standardGeneric("sbmlWarnings") } +) + +setGeneric(name = "sbmlErrors", + def = function(object) { standardGeneric("sbmlErrors") } +) + +setGeneric(name = "sbmlFatals", + def = function(object) { standardGeneric("sbmlFatals") } +) + +setGeneric(name = "getNumErrors", + def = function(object) { standardGeneric("getNumErrors") } +) + +setGeneric(name = "printSlot", + def = function(object, ws) { standardGeneric("printSlot") } +) + diff --git a/R/readSBMLmod.R b/R/readSBMLmod.R new file mode 100644 index 0000000..e55f7e8 --- /dev/null +++ b/R/readSBMLmod.R @@ -0,0 +1,1045 @@ +#------------------------------------------------------------------------------# +# Link to libSBML for sybil # +#------------------------------------------------------------------------------# + +# readSBMLmod.R +# Link to libSBML for sybil. +# +# Copyright (C) 2010-2013 Gabriel Gelius-Dietrich, Dpt. for Bioinformatics, +# Institute for Informatics, Heinrich-Heine-University, Duesseldorf, Germany. +# All right reserved. +# Email: geliudie@uni-duesseldorf.de +# +# This file is part of sybilSBML. +# +# SybilSBML is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# SybilSBML is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with sybilSBML. If not, see <http://www.gnu.org/licenses/>. + + +################################################ +# Function: readSBMLmod +# +# +# The function readSBMLmod() is inspired by the function +# readCbModel() contained in the COBRA Toolbox. +# The algorithm is basically the same. + + +readSBMLmod <- function(filename, description, + def_bnd = SYBIL_SETTINGS("MAXIMUM"), + validateSBML = FALSE, + extMetFlag = "b", + bndCond = TRUE, + ignoreNoAn = FALSE, + mergeMet = TRUE, + balanceReact = TRUE, + remUnusedMetReact = TRUE, + singletonMet = FALSE, + deadEndMet = FALSE, + remMet = FALSE, + constrMet = FALSE, + tol = SYBIL_SETTINGS("TOLERANCE")) { + +on.exit(expr = { + if ( (exists("sbmldoc")) && (!isNULLpointerSBML(sbmldoc)) ) { + closeSBMLfile(sbmldoc) + } +} ) + +#------------------------------------------------------------------------------# +# open the model file + +if ( file.exists(filename) == FALSE ) { + stop("failed to open file ", sQuote(filename)) +} + +if (missing(description)) { + mdesc <- filename +} +else { + mdesc <- description +} + + +#------------------------------------------------------------------------------# +# some functions we use to create the model # +#------------------------------------------------------------------------------# + + + +#------------------------------------------------------------------------------# +# X containes metabolite id's (an object of class "SpeciesReference"). The slot +# "species" contains metabolite id. The function entryforS() gets the array +# index of X from the vector "sybil::met_id(sbml)", which is the line number in +# the stoichiometric matrix S. +#------------------------------------------------------------------------------# + +entryforS <- function(X) { + + n <- length(X[["species"]]) # number of metabolites in X + si <- rep(i, n) # the current column (reaction) + sj <- integer(n) # the row (metabolite) + s_ji <- numeric(n) # the stoichiometric coefficient + + remMet <- logical(n) # metabolite removed from the initial metabolite list? + + CURR_MET <- character(n) # metabolites in X + + t <- 0 + for (i in seq(along = X[["species"]])) { + t <- t + 1 + + # This is possible, because the metabolite id's are unique. + # Keep in mind! + # The metabolite id's are removed from the metabolites list, + # but not from the reactions list. + + CURR_MET[t] <- X[["species"]][i] + if (isTRUE(mergeMet)) { + met_indCURR <- match(CURR_MET[t], CURR_MET[-t]) + } + else { + met_indCURR <- NA + } + + if (is.na(met_indCURR)) { + sj[t] <- match(X[["species"]][i], met_id_tmp) # the row number + s_ji[t] <- X[["stoichiometry"]][i] + remMet[t] <- ifelse(is.na(sj[t]), FALSE, TRUE) + + } + else { + remMet[t] <- FALSE + s_ji[met_indCURR] <- s_ji[met_indCURR] + X[["stoichiometry"]][i] + msg <- paste("reaction no.", i, dQuote(react_id_tmp[i]), + "metabolite no.", t, dQuote(CURR_MET[t]), + "was merged") + warning(msg, call. = FALSE) + } + +# if (is.na(sj[t])) { # if the current reaction is an +# return(FALSE) # exchange reaction, sj[t] will +# } # be NA. So we'll leave s_ij[t] +# else { # at zero. +# s_ji[t] <- el@stoichiometry # the stoichiometric coefficient +# } + } + + #metUnq <- unique(sj[remMet]) + + return(list(sj = sj[remMet], si = si[remMet], s_ji = s_ji[remMet])) + +} + + +#------------------------------------------------------------------------------# +# Check the absolute value of a reaction bound (vmin, vmax). If it is larger +# than def_bnd, it will be replaced by def_bnd. +#------------------------------------------------------------------------------# + +checkupplowbnd <- function(x) { + + if (abs(x) > def_bnd) { + bound <- def_bnd + if (x < 0) { + bound <- bound * -1 + } + } + else { + bound <- x + } + return(bound) + +} + + +#------------------------------------------------------------------------------# +# A control function. For every part in the SBML file, the Id's are a mandatory +# argument. Here we check, if they are all brave and there. +#------------------------------------------------------------------------------# + +missingId <- function(x) { + + mid <- which(x[["id"]] == "no_id") + if (length(mid) > 0) { + warning("id is missing in ", is(x)[1], ": ", paste(mid, collapse = ", ")) + } + + return(TRUE) + +} + + +#------------------------------------------------------------------------------# +# beautify SBML id's +#------------------------------------------------------------------------------# + +formatSBMLid <- function(idstr) { + + + idstr <- gsub("-DASH-", "-", idstr, fixed = TRUE) + idstr <- gsub("_DASH_", "-", idstr, fixed = TRUE) + #idstr <- gsub("_FSLASH_", "/", idstr, fixed = TRUE) + #idstr <- gsub("_BSLASH_", "\\", idstr, fixed = TRUE) + idstr <- gsub("_LPAREN_", "(", idstr, fixed = TRUE) + idstr <- gsub("_RPAREN_", ")", idstr, fixed = TRUE) + idstr <- gsub("_LSQBKT_", "[", idstr, fixed = TRUE) + idstr <- gsub("_RSQBKT_", "]", idstr, fixed = TRUE) + idstr <- gsub("_COMMA_", ",", idstr, fixed = TRUE) + idstr <- gsub("_PERIOD_", ".", idstr, fixed = TRUE) + idstr <- gsub("_APOS_", "'", idstr, fixed = TRUE) + idstr <- sub( "_e_?$", "(e)", idstr) # nicer formatting of exchange reactions + idstr <- gsub("-", "_", idstr, fixed = TRUE) + #idstr <- gsub("&", "&", idstr, fixed = TRUE) + #idstr <- gsub("<", "<", idstr, fixed = TRUE) + #idstr <- gsub(">", ">", idstr, fixed = TRUE) + #idstr <- gsub(""", "\"", idstr, fixed = TRUE) + + return(idstr) +} + + +#------------------------------------------------------------------------------# +# parse the notes field of the reactions +#------------------------------------------------------------------------------# + +parseNotesReact <- function(notes) { + + if (regexpr("html:p", notes, fixed = TRUE) == -1) { + tag <- "p" + } + else { + tag <- "html:p" + } + + split <- paste("<", tag, ">", sep = "") + #split <- "\n" + + fields <- strsplit(notes, split, fixed = TRUE) + # print(fields) + + start_tag <- paste("<", tag, ">", sep = "") + end_tag <- paste("</", tag, ">", sep = "") + regex <- paste("^(?:[\\t]*\\Q", start_tag, "\\E)?", "(.*)", "\\Q", end_tag, "\\E", "(?s).*$", sep = "") +# regex <- paste("(.*)", end_tag, "(?s).*$", sep = "") + #print(regex) + + fields_str <- sub(regex, "\\1", fields[[1]], perl = TRUE) + #print(fields_str) + + subSyst <- "" + gpr <- "" + gene_rule <- NA + + for (j in 1:length(fields_str)) { + if (grepl("GENE[_ ]?ASSOCIATION", fields_str[j])) { + #if (charmatch("GENE", fields_str[j], nomatch = -1) != -1) { + gpr <- sub("GENE[_ ]?ASSOCIATION: *", "", fields_str[j]) + gene_rule <- sybil:::.parseBoolean(gpr) + #print(gene_rule) + } + if (charmatch("SUBSYSTEM", fields_str[j], nomatch = -1) != -1) { + subSyst <- sub("SUBSYSTEM: *", "", fields_str[j]) + subSyst <- sub("^S_", "", subSyst, perl = TRUE) + subSyst <- gsub("[_]+", " ", subSyst) + if (nchar(subSyst) == 0) { + subSyst <- "Exchange" + } + #print(subSyst) + } + } + if (!is.list(gene_rule)) { + gene_rule <- sybil:::.parseBoolean("") + } + + return(list(sub_system = subSyst, genes = gene_rule$gene, rules = gene_rule$rule, gpr = gpr)) + +} + + + +#------------------------------------------------------------------------------# +# main part of the script # +#------------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------# +# reading the model # +#------------------------------------------------------------------------------# + +message("reading SBML file ... ", appendLF = FALSE) + +sbmldoc <- openSBMLfile(filename) + +message("OK") + + +#------------------------------------------------------------------------------# +# check the model # +#------------------------------------------------------------------------------# + +if (isTRUE(validateSBML)) { + message("validating SBML file ... ", appendLF = FALSE) + check <- validateSBMLdocument(sbmldoc) # check for errors + + if (!isTRUE(check)) { + + err <- getSBMLerrors(sbmldoc) + + nerr <- getNumErrors(err) + if (nerr["Errors"] > 0) { + + message("found errors, trying to fix ... ", appendLF = FALSE) + + closeSBMLfile(sbmldoc) + hackedModel <- .uglyHack(filename) + sbmldoc <- openSBMLfile(hackedModel) + unlink(hackedModel) + remove(hackedModel) + check <- validateSBMLdocument(sbmldoc) + + if (!isTRUE(check)) { + + sbmlerr <- getSBMLerrors(sbmldoc) + nerr <- getNumErrors(sbmlerr) + if ((nerr["Errors"] > 0) || + (nerr["Fatals"] > 0)) { + msg <- paste("FAILED: review file", dQuote(filename), + "carefully, returning sbmlError object") + warning(msg) + return(sbmlerr) + } + else { + msg <- paste("found warnings and/or infos concerning SBML,", + "you may want to check them with the command", + sQuote(paste("validateSBMLdocument('", filename, "')", sep = "")), "... ") + message(msg, appendLF = FALSE) + #printSlot(sbmlerr, "Warnings") + } + } + + } + else if (nerr["Fatals"] > 0) { + msg <- paste("FAILED review file", dQuote(filename), + "carefully, returning sbmlError object") + warning(msg) + return(sbmlerr) + } + else { + msg <- paste("found warnings and/or infos concerning SBML,", + "you may want to check them with the command", + sQuote(paste("validateSBMLdocument('", filename, "')", sep = "")), "... ") + message(msg, appendLF = FALSE) + } + + } + message("OK") +} + + +#------------------------------------------------------------------------------# +# generate modelorg object # +#------------------------------------------------------------------------------# + +message("getting the model ... ", appendLF = FALSE) + +sbmlmod <- getSBMLmodel(sbmldoc) + +if (is.null(sbmlmod)) { + message("FAILED") + stop("Could not get the SBML model. Run SBML validation by ", + "validateSBMLdocument('", filename, "').") +} + +mid <- ifelse(length(getSBMLmodId(sbmlmod)) == 0, filename, getSBMLmodId(sbmlmod)) +mname <- ifelse(length(getSBMLmodName(sbmlmod)) == 0, filename, getSBMLmodName(sbmlmod)) + +mod <- sybil::modelorg(mid, mname) # S4 object of class modelorg + +message("OK") + + +#------------------------------------------------------------------------------# +# model description # +#------------------------------------------------------------------------------# + +if (mdesc == filename) { + mdesc <- sub("\\.xml$", "", basename(filename)) +} + +sybil::mod_desc(mod) <- mdesc + + +#------------------------------------------------------------------------------# +# units # +#------------------------------------------------------------------------------# + +# I have to do this, but later (2007-08-14) + + +#------------------------------------------------------------------------------# +# compartments # +#------------------------------------------------------------------------------# + +compartmentsList <- getSBMLCompartList(sbmlmod) + +if (is.null(compartmentsList)) { + stop("file '", filename, "' has an empty listOfCompartments section") +} + +missingId(compartmentsList) +sybil::mod_compart(mod) <- compartmentsList[["id"]] + + +#------------------------------------------------------------------------------# +# initial reactions list # +#------------------------------------------------------------------------------# + +reactionsList <- getSBMLReactionsList(sbmlmod) + +if (is.null(reactionsList)) { + stop("file '", filename, "' has an empty listOfReactions section") +} + +missingId(reactionsList) +react_id_tmp <- reactionsList[["id"]] +numreact <- getSBMLnumReactions(sbmlmod) + + +#------------------------------------------------------------------------------# +# initial metabolites list # +#------------------------------------------------------------------------------# + +metabolitesList <- getSBMLSpeciesList(sbmlmod) + +if (is.null(metabolitesList)) { + stop("file '", filename, "' has an empty listOfSpecies section") +} + +missingId(metabolitesList) +metSpIds <- metabolitesList[["id"]] +#nummet <- getSBMLnumSpecies(sbmlmod) + +if (isTRUE(bndCond)) { + metSpBnd <- metabolitesList[["boundaryCondition"]] + met_id_pos <- !metSpBnd +} +else { + # regular expression to identify external metabolites + extMetRegEx <- paste("_", extMetFlag, "$", sep = "") + met_id_pos <- grep(extMetRegEx, metSpIds, invert = TRUE) +} + +met_id_tmp <- metSpIds[met_id_pos] + +# number of metabolites +nummet <- length(met_id_tmp) + + +#------------------------------------------------------------------------------# +# reversibilities # +#------------------------------------------------------------------------------# + +react_rev_tmp <- reactionsList[["reversible"]] + + +#------------------------------------------------------------------------------# +# data structures # +#------------------------------------------------------------------------------# + + +#S <- matrix(0, nummet, numreact) +St <- Matrix::Matrix(0, nrow = nummet, ncol = numreact, sparse = TRUE) + +lbnd <- numeric(numreact) # v min +ubnd <- numeric(numreact) # v max +ocof <- numeric(numreact) # objective coefficients + + +#------------------------------------------------------------------------------# +# S matrix and constraints, gpr # +#------------------------------------------------------------------------------# + +message("creating S and parsing constraints ... ", appendLF = FALSE) + +# for the gpr stuff +subSys <- character(numreact) +genes <- list(numreact) +rules <- character(numreact) +gpr <- character(numreact) +#allGenes <- character(0) + +# Only one entry, because if one reaction has a notes +# field, all others are supposed to have one. Otherwise +# the gpr stuff does not make sense. +hasNotes <- FALSE +hasAnnot <- FALSE + +for (i in 1 : numreact) { + + # the notes/annotations field + notes <- reactionsList[["notes"]][i] + annot <- reactionsList[["annotation"]][i] + + if (nchar(notes) > 0) { + + hasNotes <- TRUE + notes_field <- parseNotesReact(notes) + #print(notes_field) + subSys[i] <- notes_field$sub_system # the reaction's sub system: glykolysis, TCA, ... + genes[[i]] <- notes_field$genes # list of genes + rules[i] <- notes_field$rules # rules + gpr[i] <- notes_field$gpr # original gpr association + #allGenes <- c(allGenes, genes[[i]]) + + } + else { + + if (nchar(annot) > 0) { + hasAnnot <- TRUE + pn <- regexpr("Pathway Name: [^<]+", annot, perl = TRUE) + subSys[i] <- substr(annot, (pn+14), pn + ((attr(pn, "match.length"))-1)) + } + + } + + + # Check here if reactants and products lists exist, same for the stoichiometry slot + + # Entries for S -- the reactants + S_tmp <- entryforS(reactionsList[["reactants"]][[i]]) + #print(S_tmp) + if (is.list(S_tmp) == TRUE) { + St[S_tmp$sj, i] <- (S_tmp$s_ji * -1) + #St[S_tmp$sj, S_tmp$si] <- (S_tmp$s_ji * -1) + } + +# Check here if S_tmp is FALSE. Should only be the case in +# the products slot due to the exclusion of external metabolites. +# In that case, the current reaction must be an exchange reaction. + +# else { +# print(rsbml::reactions(rsbml::model(Mod))[[i]]@id) +# print(S_tmp) +# stop("something is wrong here") +# } + + # Entries for S -- the products + S_tmp <- entryforS(reactionsList[["products"]][[i]]) + if (length(S_tmp[["s_ji"]]) > 0) { + #print(S_tmp) + if (isTRUE(balanceReact)) { + nnull <- St[S_tmp$sj, i] == 0 + St[S_tmp$sj, i] <- St[S_tmp$sj, i] + S_tmp$s_ji + + if ( any(nnull == FALSE) ) { + msg <- paste("reaction no.", i, + dQuote(react_id_tmp[i]), sum(!nnull), + ngettext(sum(!nnull), + "metabolite was balanced", + "metabolites were balanced:\n\t"), + paste(dQuote(met_id_tmp[S_tmp$sj[!nnull]]), + collapse = "\n\t ")) + warning(msg, call. = FALSE) + } + + } + else { + St[S_tmp$sj, i] <- S_tmp$s_ji + } + } +# else { +# print(rsbml::reactions(rsbml::model(Mod))[[i]]@id) +# print(S_tmp) +# stop("something is wrong here") +# } + + # the constraints + parm <- reactionsList[["kinetic_law"]][[i]] + if (is.null(parm)) { + ubnd[i] <- def_bnd + if (isTRUE(react_rev_tmp[i])) { + lbnd[i] <- -1 * def_bnd + } + else { + lbnd[i] <- 0 + } + ocof[i] <- 0 + } + else { + for (j in seq(along = parm[["id"]])) { + if (parm[["id"]][j] == "LOWER_BOUND") { + lbnd[i] <- checkupplowbnd(parm[["value"]][j]) + } + if (parm[["id"]][j] == "UPPER_BOUND") { + ubnd[i] <- checkupplowbnd(parm[["value"]][j]) + } + if (parm[["id"]][j] == "OBJECTIVE_COEFFICIENT") { + ocof[i] <- parm[["value"]][j] + } + # flux value? (sbml file) + # reduced cost? (sbml file) + } + } + +} + + +# ---------------------------------------------------------------------------- # +# search for unused metabolites and unused reactions + +# binary version of stoichiometric matrix +#Stb <- St != 0 +Stb <- abs(St) > tol + +SKIP_METABOLITE <- rowSums(Stb) != 0 +SKIP_REACTION <- colSums(Stb) != 0 + + +if (isTRUE(remUnusedMetReact)) { + did <- "and therefore removed from S:" +} +else { + did <- "in S:" +} + + +# ---------------------------------------------------------------------------- # +# empty rows + +if ( any(SKIP_METABOLITE == FALSE) ) { + met_list <- paste(dQuote(met_id_tmp[!SKIP_METABOLITE]), + collapse = "\n\t") + nmet_list <- sum(!SKIP_METABOLITE) + msg_part <- paste("not used in any reaction", did) + msg <- sprintf(ngettext(nmet_list, + "%d metabolite is %s %s", + "%d metabolites are %s\n\t%s"), + nmet_list, msg_part, met_list) + warning(msg, call. = FALSE) +} + + +# ---------------------------------------------------------------------------- # +# empty columns + +if ( any(SKIP_REACTION == FALSE) ) { + react_list <- paste(dQuote(react_id_tmp[!SKIP_REACTION]), + collapse = "\n\t") + nreact_list <- sum(!SKIP_REACTION) + msg_part <- paste("not used", did) + msg <- sprintf(ngettext(nreact_list, + "%d reaction is %s %s", + "%d reactions are %s\n\t%s"), + nreact_list, msg_part, react_list) + warning(msg, call. = FALSE) +} + +if (!isTRUE(remUnusedMetReact)) { + SKIP_METABOLITE[!SKIP_METABOLITE] <- TRUE + SKIP_REACTION[!SKIP_REACTION] <- TRUE +} + + +# ---------------------------------------------------------------------------- # +# single metabolites + +sing_met <- rep(NA, nrow(St)) +sing_react <- rep(NA, ncol(St)) + +if (isTRUE(singletonMet)) { + + message("identifying reactions containing single metabolites ... ", appendLF = FALSE) + + singleton <- sybil:::.singletonMetabolite(mat = Stb) + + sing_met[!singleton$smet] <- FALSE + sing_react[!singleton$sreact] <- FALSE + sing_met[singleton$smet] <- TRUE + sing_react[singleton$sreact] <- TRUE + + # singleton metabolites found? + if (sum(singleton$smet) > 0) { + + if ( xor(isTRUE(constrMet), isTRUE(remMet)) ) { + + if (isTRUE(constrMet)) { + # set to zero + did_watm <- "identified" + did_watr <- "constrained" + } + else { + # remove + SKIP_METABOLITE[singleton$smet] <- FALSE + SKIP_REACTION[singleton$sreact] <- FALSE + did_watm <- "removed" + did_watr <- "removed" + } + + met_list <- paste(dQuote(met_id_tmp[singleton$smet]), + collapse = "\n\t") + nmet_list <- sum(singleton$smet) + react_list <- paste(dQuote(react_id_tmp[singleton$sreact]), + collapse = "\n\t") + nreact_list <- sum(singleton$sreact) + + msgm <- sprintf(ngettext(nmet_list, + "%s %d singleton metabolite: %s", + "%s %d singleton metabolites:\n\t%s"), + did_watm, nmet_list, met_list) + + msgr <- sprintf(ngettext(nreact_list, + "%s %d reaction containing singleton metabolites: %s", + "%s %d reactions containing singleton metabolites:\n\t%s"), + did_watr, nreact_list, react_list) + + #warning(paste(msgm, msgr, sep = "\n\t ")) + warning(msgm, call. = FALSE) + warning(msgr, call. = FALSE) + + } + else { + + met_list <- paste(dQuote(met_id_tmp[singleton$smet]), + collapse = "\n\t") + nmet_list <- sum(singleton$smet) + msg <- sprintf(ngettext(nmet_list, + "%d metabolite is singleton in S: %s", + "%d metabolites are singletons in S:\n\t%s"), + nmet_list, met_list) + warning(msg, call. = FALSE) + } + + } + else { + message("nothing found ... ", appendLF = FALSE) + sing_met <- logical(nrow(St)) + sing_react <- logical(ncol(St)) + } +} + + +# ---------------------------------------------------------------------------- # +# dead end metabolites + +de_met <- rep(NA, nrow(St)) +de_react <- rep(NA, ncol(St)) + +if (isTRUE(deadEndMet)) { + + message("identifying reactions containing dead end metabolites ... ", appendLF = FALSE) + + demr <- sybil:::.deadEndMetabolite(mat = St, + lb = lbnd, + exclM = sing_met, + exclR = sing_react, + tol = tol) + + de_met[!demr$dem] <- FALSE + de_react[!demr$der] <- FALSE + de_met[demr$dem] <- TRUE + de_react[demr$der] <- TRUE + + # dead end metabolites found? + if (sum(demr$dem) > 0) { + + if ( xor(isTRUE(constrMet), isTRUE(remMet)) ) { + + if (isTRUE(constrMet)) { + # set to zero + did_watm <- "identified" + did_watr <- "constrained" + } + else { + # remove + SKIP_METABOLITE[demr$dem] <- FALSE + SKIP_REACTION[demr$der] <- FALSE + did_watm <- "removed" + did_watr <- "removed" + } + + met_list <- paste(dQuote(met_id_tmp[demr$dem]), + collapse = "\n\t") + nmet_list <- sum(demr$dem) + react_list <- paste(dQuote(react_id_tmp[demr$der]), + collapse = "\n\t") + nreact_list <- sum(demr$der) + + msgm <- sprintf(ngettext(nmet_list, + "%s %d dead end metabolite: %s", + "%s %d dead end metabolites:\n\t%s"), + did_watm, nmet_list, met_list) + + msgr <- sprintf(ngettext(nreact_list, + "%s %d reaction containing dead end metabolites: %s", + "%s %d reactions containing dead end metabolites:\n\t%s"), + did_watr, nreact_list, react_list) + + warning(msgm, call. = FALSE) + warning(msgr, call. = FALSE) + + } + else { + + met_list <- paste(dQuote(met_id_tmp[demr$dem]), + collapse = "\n\t") + nmet_list <- sum(demr$dem) + msg <- sprintf(ngettext(nmet_list, + "%d dead end metabolite in S: %s", + "%d dead end metabolites in S:\n\t%s"), + nmet_list, met_list) + warning(msg, call. = FALSE) + } + + } + else { + message("nothing found ... ", appendLF = FALSE) + de_met <- logical(nrow(St)) + de_react <- logical(ncol(St)) + } +} + + +# ---------------------------------------------------------------------------- # +# S + +St <- St[SKIP_METABOLITE, , drop = FALSE] +St <- St[ , SKIP_REACTION, drop = FALSE] + +sybil::S(mod) <- St +#remove(St) + +#sbml@S <- S +#remove(S) + +# NNZ <- nonZeroElements(S(sbml)) +# +# Sne(sbml) <- NNZ$ne +# Sia(sbml) <- NNZ$ia +# Sja(sbml) <- NNZ$ja +# Sar(sbml) <- NNZ$ar + + +numreact <- sum(SKIP_REACTION) + +sybil::met_num(mod) <- sum(SKIP_METABOLITE) +sybil::react_num(mod) <- numreact + +sybil::met_single(mod) <- sing_met[SKIP_METABOLITE] +sybil::react_single(mod) <- sing_react[SKIP_REACTION] + +sybil::met_de(mod) <- de_met[SKIP_METABOLITE] +sybil::react_de(mod) <- de_react[SKIP_REACTION] + +if (isTRUE(constrMet)) { + lbnd[sing_react] <- 0 + ubnd[sing_react] <- 0 + lbnd[de_react] <- 0 + ubnd[de_react] <- 0 +} +else {} + + +sybil::lowbnd(mod) <- lbnd[SKIP_REACTION] +sybil::uppbnd(mod) <- ubnd[SKIP_REACTION] +sybil::obj_coef(mod) <- ocof[SKIP_REACTION] + + +message("OK") + + +#------------------------------------------------------------------------------# +# gene to reaction mapping # +#------------------------------------------------------------------------------# + +if (isTRUE(ignoreNoAn)) { + sybil::gprRules(mod) <- character(numreact) + sybil::genes(mod) <- vector(mode = "list", length = numreact) + sybil::gpr(mod) <- character(numreact) + sybil::allGenes(mod) <- character(numreact) + sybil::rxnGeneMat(mod) <- Matrix::Matrix(FALSE, nrow = numreact, ncol = numreact, sparse = TRUE) + sybil::subSys(mod) <- Matrix::Matrix(FALSE, nrow = numreact, ncol = 1, sparse = TRUE) +} +else { + + subSys <- subSys[SKIP_REACTION] + genes <- genes[SKIP_REACTION] + rules <- rules[SKIP_REACTION] + gpr <- gpr[SKIP_REACTION] + + if (isTRUE(hasNotes)) { + message("GPR mapping ... ", appendLF = FALSE) + + #allGenes <- unique(allGenes) + #allGenesTMP <- unique(allGenes) + allGenesTMP <- unique(unlist(genes)) + temp <- nchar(allGenesTMP) + allGenes <- allGenesTMP[which(temp != 0)] + + + rxnGeneMat <- Matrix::Matrix(FALSE, + nrow = numreact, + ncol = length(allGenes), + sparse = TRUE) + + for (i in 1 : numreact) { + + if ( (length(genes[[i]] == 1)) && (genes[[i]] != "") ) { + geneInd <- match(genes[[i]], allGenes) + rxnGeneMat[i, geneInd] <- TRUE + + for (j in 1 : length(geneInd)) { + pat <- paste("x(", j, ")", sep = "") + repl <- paste("x[", geneInd[j], "]", sep = "") + + rules[i] <- gsub(pat, repl, rules[i], fixed = TRUE) + } + } + } + + sybil::genes(mod) <- genes + sybil::gpr(mod) <- gpr + sybil::allGenes(mod) <- allGenes + sybil::gprRules(mod) <- rules + sybil::rxnGeneMat(mod) <- rxnGeneMat + #sybil::subSys(mod) <- subSys + sybil::subSys(mod) <- sybil:::.prepareSubSysMatrix(subSys, numreact) + + #sbml@gprRules <- rules + #sbml@genes <- genes + #sbml@gpr <- gpr + #sbml@allGenes <- allGenes + #sbml@subSys <- subSys + + message("OK") + } + else { + sybil::rxnGeneMat(mod) <- Matrix::Matrix(NA, nrow = 0, ncol = 0) + if (isTRUE(hasAnnot)) { + #subSys(sbml) <- subSys + sybil::subSys(mod) <- sybil:::.prepareSubSysMatrix(subSys, numreact) + } + else { + sybil::subSys(mod) <- Matrix::Matrix(FALSE, + nrow = numreact, + ncol = 1, + sparse = TRUE) + } + } + +} + + +#------------------------------------------------------------------------------# +# reaction id's # +#------------------------------------------------------------------------------# +message("cleaning up ... ", appendLF = FALSE) + +react_id_tmp <- sub( "^R[_]+", "", react_id_tmp[SKIP_REACTION]) # remove the leading R_ +#react_id_tmp <- gsub("_LPAREN_", "(", react_id_tmp, fixed = TRUE) +#react_id_tmp <- gsub("_RPAREN_", ")", react_id_tmp, fixed = TRUE) +#react_id_tmp <- gsub("_LSQBKT_", "[", react_id_tmp, fixed = TRUE) +#react_id_tmp <- gsub("_RSQBKT_", "]", react_id_tmp, fixed = TRUE) +#react_id_tmp <- gsub("_COMMA_", ",", react_id_tmp, fixed = TRUE) +#react_id_tmp <- gsub("_APOS_", "'", react_id_tmp, fixed = TRUE) +#react_id_tmp <- gsub("_DASH_", "-", react_id_tmp, fixed = TRUE) +#react_id_tmp <- sub( "_e_?$", "(e)", react_id_tmp) # nicer formatting of exchange reactions +#sybil::react_id(mod) <- gsub("-", "_", react_id_tmp, fixed = TRUE) +sybil::react_id(mod) <- formatSBMLid(react_id_tmp) + + +#------------------------------------------------------------------------------# +# reaction names # +#------------------------------------------------------------------------------# + +react_name_tmp <- reactionsList[["name"]][SKIP_REACTION] +react_name_tmp <- sub( "^R[_]+", "", react_name_tmp) +react_name_tmp <- gsub("[_]+", " ", react_name_tmp) +react_name_tmp <- sub( "\\s+$", "", react_name_tmp, perl = TRUE) +sybil::react_name(mod) <- react_name_tmp + + +#------------------------------------------------------------------------------# +# metabolite id's # +#------------------------------------------------------------------------------# + +met_id_tmp <- sub( "^[MSms]_+", "", met_id_tmp[SKIP_METABOLITE]) # remove the leading M_ or S_ +#met_id_tmp <- gsub( "[_]+", "_", met_id_tmp) +met_id_tmp <- sub( "_([A-Za-z0-9]+)$", "[\\1]", met_id_tmp) # put the compartment id into square brackets +sybil::met_id(mod) <- gsub("-", "_", met_id_tmp, fixed = TRUE) +#sybil::met_id(mod) <- gsub("[-_]+", "_", met_id_tmp) + + +#------------------------------------------------------------------------------# +# metabolite compartments # +#------------------------------------------------------------------------------# + +met_comp_tmp <- metabolitesList[["compartment"]][met_id_pos][SKIP_METABOLITE] + +sybil::met_comp(mod) <- match(met_comp_tmp, sybil::mod_compart(mod)) + + +#------------------------------------------------------------------------------# +# metabolite names # +#------------------------------------------------------------------------------# + +met_name_tmp <- metabolitesList[["name"]][met_id_pos][SKIP_METABOLITE] +met_name_tmp <- sub( "^[MS]?[_]+", "", met_name_tmp) +met_name_tmp <- gsub("[-_]+", "-", met_name_tmp) +met_name_tmp <- sub("-$", "", met_name_tmp) +met_name_tmp <- sub( "\\s+$", "", met_name_tmp, perl = TRUE) +sybil::met_name(mod) <- met_name_tmp + + +#------------------------------------------------------------------------------# +# check reversibilities # +#------------------------------------------------------------------------------# + +# check up with the matlab version +# check the reversibilities +react_rev_tmp <- react_rev_tmp[SKIP_REACTION] +isrev <- which(sybil::lowbnd(mod) < 0 & sybil::uppbnd(mod) > 0) +#print(isrev) +react_rev_tmp[isrev] <- TRUE +sybil::react_rev(mod) <- react_rev_tmp + +message("OK") + + +#------------------------------------------------------------------------------# +# validate the model # +#------------------------------------------------------------------------------# + +message("validating object ... ", appendLF = FALSE) + +check <- validObject(mod, test = TRUE) + +if (check != TRUE) { + msg <- paste("Validity check failed:", check, sep = "\n ") + warning(msg) +} + +message("OK") + + +#------------------------------------------------------------------------------# +# return the model # +#------------------------------------------------------------------------------# + +delSBMLmodel(sbmlmod) +closeSBMLfile(sbmldoc) + +# Returns sbml, an object of the class modelorg +return(mod) + +} diff --git a/R/sbmlErrorClass.R b/R/sbmlErrorClass.R new file mode 100644 index 0000000..10d335a --- /dev/null +++ b/R/sbmlErrorClass.R @@ -0,0 +1,187 @@ +#------------------------------------------------------------------------------# +# Link to libSBML for sybil # +#------------------------------------------------------------------------------# + +# sbmlErrorClass.R +# Link to libSBML for sybil. +# +# Copyright (C) 2010-2013 Gabriel Gelius-Dietrich, Dpt. for Bioinformatics, +# Institute for Informatics, Heinrich-Heine-University, Duesseldorf, Germany. +# All right reserved. +# Email: geliudie@uni-duesseldorf.de +# +# This file is part of sybilSBML. +# +# SybilSBML is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# SybilSBML is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with SybilSBML. If not, see <http://www.gnu.org/licenses/>. + + +#------------------------------------------------------------------------------# +# definition of class sbmlError # +#------------------------------------------------------------------------------# + + +# representation of class sbmlError +setClass(Class = "sbmlError", + representation( + sbmlInfos = "list", + sbmlWarnings = "list", + sbmlErrors = "list", + sbmlFatals = "list", + sbmlFileName = "character", + sbmlDocKey = "character" + ) +) + + +#------------------------------------------------------------------------------# + + +# contructor function for class sbmlError +sbmlError <- function(err, sbmlf) { + + stopifnot(is(sbmlf, "sbmlPtr")) + + if (is(err, "sbml_error")) { + pObj <- new("sbmlError", + sbmlInfos = err[["infos"]], + sbmlWarnings = err[["warnings"]], + sbmlErrors = err[["errors"]], + sbmlFatals = err[["fatals"]], + sbmlFileName = sbmlFileName(sbmlf), + sbmlDocKey = sbmlDocKey(sbmlf)) + } + else { + pObj <- err + } + + return(pObj) +} + + +#------------------------------------------------------------------------------# + +# sbmlInfos +setMethod("sbmlInfos", signature(object = "sbmlError"), + function(object) { + return(object@sbmlInfos) + } +) + +# sbmlWarnings +setMethod("sbmlWarnings", signature(object = "sbmlError"), + function(object) { + return(object@sbmlWarnings) + } +) + +# sbmlErrors +setMethod("sbmlErrors", signature(object = "sbmlError"), + function(object) { + return(object@sbmlErrors) + } +) + +# sbmlFatals +setMethod("sbmlFatals", signature(object = "sbmlError"), + function(object) { + return(object@sbmlFatals) + } +) + +# sbmlDocKey +setMethod("sbmlDocKey", signature(object = "sbmlError"), + function(object) { + return(object@sbmlDocKey) + } +) + +# sbmlFileName +setMethod("sbmlFileName", signature(object = "sbmlError"), + function(object) { + return(object@sbmlFileName) + } +) + + +# getNumErrors +setMethod("getNumErrors", signature(object = "sbmlError"), + function(object) { + + num <- integer(5) + num[1] <- length(sbmlInfos(object)) + num[2] <- length(sbmlWarnings(object)) + num[3] <- length(sbmlErrors(object)) + num[4] <- length(sbmlFatals(object)) + num[5] <- sum(num[1:4]) + names(num) <- c("Infos", "Warnings", "Errors", "Fatals", "Total") + + #cmd <- paste("length(sbml", ws, "(object))", sep = "") + #num <- eval(parse(text = cmd)) + #names(num) <- ws + + return(num) + } +) + +#------------------------------------------------------------------------------# + +# show +setMethod("show", signature(object = "sbmlError"), + function(object) { + + cat("validation of SBML file ", sbmlFileName(object), "\n\n", sep = "") + + .printErrors(sbmlInfos(object), "Infos") + .printErrors(sbmlWarnings(object), "Warnings") + .printErrors(sbmlErrors(object), "Errors") + .printErrors(sbmlFatals(object), "Fatals") + + } +) + + +# length +setMethod("length", signature(x = "sbmlError"), + function(x) { + num <- getNumErrors(x) + names(num) <- NULL + return(num[length(num)]) + } +) + + +setMethod("printSlot", signature(object = "sbmlError", ws = "character"), + function(object, ws) { + + cmd <- paste(".printErrors(sbml", ws, "(object), '", ws, "')", sep = "") + eval(parse(text = cmd)) + + } +) + + +.printErrors <- function(err, type) { + if (length(err) > 0) { + cat(type, " (", length(err), "):\n", sep = "") + i <- 0 + for (e in err) { + i <- i + 1 + cat(sub("s$", "", type), " number ", i, ":\n", sep = "") + cat("Id: ", e[["id"]], "\n", sep = "") + cat("line: ", e[["line"]], ", column: ", e[["column"]], "\n", sep = "") + cat("message:\n") + cat(e[["message"]], "\n") + } + } +} diff --git a/R/sbmlPtrClass.R b/R/sbmlPtrClass.R new file mode 100644 index 0000000..81931e8 --- /dev/null +++ b/R/sbmlPtrClass.R @@ -0,0 +1,187 @@ +#------------------------------------------------------------------------------# +# Link to libSBML for sybil # +#------------------------------------------------------------------------------# + +# sbmlPtrClass.R +# Link to libSBML for sybil. +# +# Copyright (C) 2010-2013 Gabriel Gelius-Dietrich, Dpt. for Bioinformatics, +# Institute for Informatics, Heinrich-Heine-University, Duesseldorf, Germany. +# All right reserved. +# Email: geliudie@uni-duesseldorf.de +# +# This file is part of sybilSBML. +# +# SybilSBML is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# SybilSBML is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with SybilSBML. If not, see <http://www.gnu.org/licenses/>. + + +#------------------------------------------------------------------------------# +# definition of class sbmlPtr # +#------------------------------------------------------------------------------# + + +# representation of class sbmlPtr +setClass(Class = "sbmlPtr", + representation( + sbmlPtrType = "character", + sbmlPointer = "externalptr", + sbmlDocKey = "character", + sbmlFileName = "character" + ) +) + + +#------------------------------------------------------------------------------# + +# contructor for class sbmlPtr +setMethod(f = "initialize", + signature = "sbmlPtr", + definition = function(.Object, p, w, key, fname) { + + .Object@sbmlPointer <- attr(p, which = w, exact = TRUE) + .Object@sbmlPtrType <- as.character(p) + .Object@sbmlDocKey <- as.character(key) + .Object@sbmlFileName <- as.character(fname) + + return(.Object) + + } +) + + +# contructor for pointers to sbml documents +sbmlDocPointer <- function(pointer) { + + if (is(pointer, "sbml_doc_ptr")) { + pObj <- new("sbmlPtr", + p = pointer, + w = as.character("sbml_doc_ptr"), + key = as.character(sybil:::.generateModKey()), + fname = as.character(attr(pointer, which = "file_name", exact = TRUE))) + } + else { + pObj <- pointer + } + + return(pObj) +} + + +# contructor for pointers to sbml models +sbmlModPointer <- function(pointer, sbmlDoc) { + + if (is(pointer, "sbml_model_ptr")) { + pObj <- new("sbmlPtr", + p = pointer, + w = as.character("sbml_model_ptr"), + key = sbmlDocKey(sbmlDoc), + fname = sbmlFileName(sbmlDoc)) + } + else { + pObj <- pointer + } + + return(pObj) +} + + +#------------------------------------------------------------------------------# + +# sbmlPtrType +setMethod("sbmlPtrType", signature(object = "sbmlPtr"), + function(object) { + return(object@sbmlPtrType) + } +) + +# sbmlPointer +setMethod("sbmlPointer", signature(object = "sbmlPtr"), + function(object) { + return(object@sbmlPointer) + } +) + +# sbmlDocKey +setMethod("sbmlDocKey", signature(object = "sbmlPtr"), + function(object) { + return(object@sbmlDocKey) + } +) + +# sbmlFileName +setMethod("sbmlFileName", signature(object = "sbmlPtr"), + function(object) { + return(object@sbmlFileName) + } +) + + +#------------------------------------------------------------------------------# + +setMethod("isNULLpointerSBML", signature(object = "sbmlPtr"), + function(object) { + return(.Call("isNULLptr", PACKAGE = "sybilSBML", sbmlPointer(object))) + } +) + +setMethod("isSBMLdocpointer", signature(object = "sbmlPtr"), + function(object) { + return(.Call("isSBMLdocptr", PACKAGE = "sybilSBML", sbmlPointer(object))) + } +) + +setMethod("isSBMLmodpointer", signature(object = "sbmlPtr"), + function(object) { + return(.Call("isSBMLmodptr", PACKAGE = "sybilSBML", sbmlPointer(object))) + } +) + + +#------------------------------------------------------------------------------# + +setMethod("show", signature(object = "sbmlPtr"), + function(object) { + + if (isNULLpointerSBML(object)) { + ptrtype <- "NULL" + } + else { + if (isSBMLdocpointer(object)) { + ptrtype <- "SBML document" + } + else if (isSBMLmodpointer(object)) { + ptrtype <- "SBML model" + } + else { + ptrtype <- "unknown" + } + } + + cat("object of class ", dQuote("sbmlPtr"), + ": pointer to ", ptrtype, ".\n", sep = "") + + cat(paste("Slot ", + dQuote("sbmlPtrType"), ": ", + sbmlPtrType(object), "\n", sep = "")) + cat(paste("Slot ", dQuote("sbmlPointer"), ": ", sep = "")) + print(slot(object, "sbmlPointer"), sep = "") + cat(paste("Slot ", + dQuote("sbmlDocKey"), ": ", + sbmlDocKey(object), "\n", sep = "")) + cat(paste("Slot ", + dQuote("sbmlFileName"), ": ", + sbmlFileName(object), "\n", sep = "")) + } +) + diff --git a/R/sybilSBML.R b/R/sybilSBML.R new file mode 100644 index 0000000..c76394e --- /dev/null +++ b/R/sybilSBML.R @@ -0,0 +1,280 @@ +#------------------------------------------------------------------------------# +# Link to libSBML for sybil # +#------------------------------------------------------------------------------# + +# sybilSBML.R +# Link to libSBML for sybil. +# +# Copyright (C) 2010-2013 Gabriel Gelius-Dietrich, Dpt. for Bioinformatics, +# Institute for Informatics, Heinrich-Heine-University, Duesseldorf, Germany. +# All right reserved. +# Email: geliudie@uni-duesseldorf.de +# +# This file is part of sybilSBML. +# +# SybilSBML is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# SybilSBML is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with SybilSBML. If not, see <http://www.gnu.org/licenses/>. + + +#------------------------------------------------------------------------------# + +versionLibSBML <- function() { + + version <- .Call("getLibSBMLversion", PACKAGE = "sybilSBML") + return(version) + +} + + +#------------------------------------------------------------------------------# + +openSBMLfile <- function(fname, ptrtype = "sbml_doc") { + + if ( file.exists(fname) == FALSE ) { + stop("file not found: ", sQuote(fname)) + } + + sbmlf <- .Call("readSBMLfile", PACKAGE = "sybilSBML", + as.character(normalizePath(fname)[1]), + as.character(ptrtype) + ) + + sbmlfP <- sbmlDocPointer(sbmlf) + + return(sbmlfP) +} + + +#------------------------------------------------------------------------------# + +closeSBMLfile <- function(sbmlf) { + + invisible( + .Call("delDocument", PACKAGE = "sybilSBML", + sbmlPointer(sbmlf) + ) + ) + +} + + +#------------------------------------------------------------------------------# + +getSBMLmodel <- function(sbmlf, ptrtype = "sbml_mod") { + + sbmlm <- .Call("getSBMLmodel", PACKAGE = "sybilSBML", + sbmlPointer(sbmlf), + as.character(ptrtype) + ) + + sbmlmP <- sbmlModPointer(sbmlm, sbmlf) + + if (isTRUE(isNULLpointerSBML(sbmlmP))) { + sbmlmP <- NULL + } + + return(sbmlmP) +} + + +#------------------------------------------------------------------------------# + +delSBMLmodel <- function(sbmlm) { + + invisible( + .Call("delModel", PACKAGE = "sybilSBML", + sbmlPointer(sbmlm) + ) + ) + +} + + +#------------------------------------------------------------------------------# + +getSBMLlevel <- function(sbmlf) { + + level <- .Call("getSBMLlevel", PACKAGE = "sybilSBML", + sbmlPointer(sbmlf) + ) + + return(level) +} + + + +#------------------------------------------------------------------------------# + +getSBMLversion <- function(sbmlf) { + + version <- .Call("getSBMLversion", PACKAGE = "sybilSBML", + sbmlPointer(sbmlf) + ) + + return(version) +} + + +#------------------------------------------------------------------------------# + +validateSBMLdocument <- function(sbmlf) { + + if (is(sbmlf, "character")) { + sbmlff <- openSBMLfile(fname = sbmlf) + } + else { + sbmlff <- sbmlf + } + + val <- .Call("validateDocument", PACKAGE = "sybilSBML", + sbmlPointer(sbmlff) + ) + + if (is(sbmlf, "character")) { + val <- getSBMLerrors(sbmlff) + closeSBMLfile(sbmlff) + } + + return(val) +} + + +#------------------------------------------------------------------------------# + +getSBMLerrors <- function(sbmlf) { + + err <- .Call("getSBMLerrors", PACKAGE = "sybilSBML", + sbmlPointer(sbmlf) + ) + + err <- sbmlError(err, sbmlf) + + return(err) +} + + +#------------------------------------------------------------------------------# + +getSBMLmodId <- function(sbmlm) { + + modid <- .Call("getSBMLmodId", PACKAGE = "sybilSBML", + sbmlPointer(sbmlm) + ) + + return(modid) +} + + +#------------------------------------------------------------------------------# + +getSBMLmodName <- function(sbmlm) { + + modn <- .Call("getSBMLmodName", PACKAGE = "sybilSBML", + sbmlPointer(sbmlm) + ) + + return(modn) +} + + +#------------------------------------------------------------------------------# + +getSBMLnumCompart <- function(sbmlm) { + + num <- .Call("getSBMLnumCompart", PACKAGE = "sybilSBML", + sbmlPointer(sbmlm) + ) + + return(num) +} + + +#------------------------------------------------------------------------------# + +getSBMLnumSpecies <- function(sbmlm) { + + num <- .Call("getSBMLnumSpecies", PACKAGE = "sybilSBML", + sbmlPointer(sbmlm) + ) + + return(num) +} + + +#------------------------------------------------------------------------------# + +getSBMLnumReactions <- function(sbmlm) { + + num <- .Call("getSBMLnumReactions", PACKAGE = "sybilSBML", + sbmlPointer(sbmlm) + ) + + return(num) +} + + +#------------------------------------------------------------------------------# + +getSBMLunitDefinitionsList <- function(sbmlm) { + + units <- .Call("getSBMLunitDefinitionsList", PACKAGE = "sybilSBML", + sbmlPointer(sbmlm) + ) + + return(units) +} + + +#------------------------------------------------------------------------------# + +getSBMLCompartList <- function(sbmlm) { + + comp <- .Call("getSBMLCompartList", PACKAGE = "sybilSBML", + sbmlPointer(sbmlm) + ) + + return(comp) +} + + +#------------------------------------------------------------------------------# + +getSBMLSpeciesList <- function(sbmlm) { + + spec <- .Call("getSBMLSpeciesList", PACKAGE = "sybilSBML", + sbmlPointer(sbmlm) + ) + + return(spec) +} + + +#------------------------------------------------------------------------------# + +getSBMLReactionsList <- function(sbmlm) { + + react <- .Call("getSBMLReactionsList", PACKAGE = "sybilSBML", + sbmlPointer(sbmlm) + ) + + return(react) +} + + + + + + + + + diff --git a/R/uglyHack.R b/R/uglyHack.R new file mode 100644 index 0000000..c982ac8 --- /dev/null +++ b/R/uglyHack.R @@ -0,0 +1,222 @@ +#------------------------------------------------------------------------------# +# Link to libSBML for sybil # +#------------------------------------------------------------------------------# + +# uglyHack.R +# Link to libSBML for sybil. +# +# Copyright (C) 2010-2013 Gabriel Gelius-Dietrich, Dpt. for Bioinformatics, +# Institute for Informatics, Heinrich-Heine-University, Duesseldorf, Germany. +# All right reserved. +# Email: geliudie@uni-duesseldorf.de +# +# This file is part of sybilSBML. +# +# SybilSBML is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# SybilSBML is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with SybilSBML. If not, see <http://www.gnu.org/licenses/>. + + +################################################ +# Function: .uglyHack +# +# +# + +.uglyHack <- function(filename, remapply = FALSE) { + + if (file.exists(filename) == FALSE ) { + stop( c("cannot open file ", filename) ) + } + + #hackedFileName <- paste(filename, "_temp", sep = "") + hackedFileName <- tempfile(pattern = basename(filename), fileext = "_temp") + + if (file.exists(hackedFileName) == TRUE ) { + unlink(hackedFileName) + } + + lof <- readLines(filename, warn = FALSE) + + #versionLine <- grep("<sbml xmlns=\"", lof, fixed = TRUE) + #print(versionLine) + + # ------------------------------------------------------------------------ # + # correct units + + # SBMLError + # The units of the 'math' formula in a <kineticLaw> definition are expected + # to be the equivalent of _substance per time_. Expected units are mole + # (exponent = 1, multiplier = 1, scale = 0), + # second (exponent = -1, multiplier = 1, scale = 0) + # but the units returned by the <kineticLaw>'s <math> expression are + # mole (exponent = 1, multiplier = 1, scale = -3), + # gram (exponent = -1, multiplier = 1, scale = 0), + # second (exponent = -1, multiplier = 0.00027777, scale = 0). + gramLine <- grep("<unit kind=\"gram\"", lof, fixed = TRUE) + if (length(gramLine) > 0) { + lof <- lof[-gramLine] + } + + ## SBMLWarning + # As a principle of best modeling practice, the units of a <parameter> + # should be declared rather than be left undefined. Doing so improves the + # ability of software to check the consistency of units and helps make it + # easier to detect potential errors in models. +# lof <- sub("(parameter .+OBJECTIVE_COEFFICIENT[^/]+)>/", +# "\\1 units=\"item\"", lof, fixed = FALSE) +# lof <- sub("(parameter .+REDUCED_COST[^/]+)", +# "\\1 units=\"dimensionless\"", lof, fixed = FALSE) + + ## SBMLWarning + # As a principle of best modeling practice, the size of a <compartment> + # should be set to a value rather than be left undefined. Doing so improves + # the portability of models between different simulation and analysis + # systems, and helps make it easier to detect potential errors in models. +# lof <- sub("(compartment id=[^/]+)", +# "\\1 spatialDimensions=\"0\"", lof, fixed = FALSE) + + #lof <- sub("<notes>", + # "<notes><body xmlns=\"http://www.w3.org/1999/xhtml\">", + # lof, fixed = TRUE) + #lof <- sub("</notes>", "</body></notes>", lof, fixed = TRUE) + + + # ------------------------------------------------------------------------ # + # The following containers are all optional in a <reaction>, + # but if any is present, it must not be empty: + # <listOfReactants>, + # <listOfProducts>, + # <listOfModifiers>, + # <kineticLaw>. + + # this is for Bs_iYO844_flux1.xml + # this is for iNJ661_biomass9_0.052_middlebrook7H9_plus_glc_glyc_flux.xml + # this is for Bs_iYO844_flux1.xml + + + remLine <- rep(TRUE, length(lof)) + + reactLineB <- grep("<listOfReactants>", lof, fixed = TRUE) + reactLineE <- grep("</listOfReactants>", lof, fixed = TRUE) + prodLineB <- grep("<listOfProducts>", lof, fixed = TRUE) + prodLineE <- grep("</listOfProducts>", lof, fixed = TRUE) + modLineB <- grep("<listOfModifiers>", lof, fixed = TRUE) + modLineE <- grep("</listOfModifiers>", lof, fixed = TRUE) + kinLawLineB <- grep("<kineticLaw>", lof, fixed = TRUE) + kinLawLineE <- grep("</kineticLaw>", lof, fixed = TRUE) + + reactLine <- reactLineE - reactLineB + prodLine <- prodLineE - prodLineB + modLine <- modLineE - modLineB + kinLawLine <- kinLawLineE - kinLawLineB + + noReact <- which(reactLine == 1) + noProd <- which(prodLine == 1) + noMod <- which(modLine == 1) + noKinLaw <- which(kinLawLine == 1) + + remLine[c(reactLineE[noReact], reactLineB[noReact])] <-FALSE + remLine[c(prodLineE[noProd], prodLineB[noProd])] <-FALSE + remLine[c(modLineE[noMod], modLineB[noMod])] <-FALSE + remLine[c(kinLawLineE[noKinLaw], kinLawLineB[noKinLaw])] <-FALSE + + lof <- lof[remLine] + + + # ------------------------------------------------------------------------ # + # The syntax of 'id' attribute values must conform to the syntax of the + # SBML type 'SId'. + + # this is for iNJ661_biomass9_plus_vitamins_0.052_flux.xml (model id contains a .) + + lof <- gsub("(id=\"\\w+)\\.(\\w+\")", "\\1_\\2", lof, perl = TRUE) + + + # ------------------------------------------------------------------------ # + # A <reaction> definition must contain at least one <speciesReference>, + # either in its <listOfReactants> or its <listOfProducts>. + # A reaction without any reactant or product species is not permitted, + # regardless of whether the reaction has any modifier species. + + # this is for iNJ661_biomass9_0.052_middlebrook7H9_plus_glc_glyc_flux.xml + # this is for macModel.xml + + remReact <- rep(TRUE, length(lof)) + reactBegin <- grep("<reaction.+id=", lof, perl = TRUE) + reactEnd <- grep("</reaction>", lof, fixed = TRUE) + for (i in seq(along = reactBegin)) { + tmp <- lof[reactBegin[i]:reactEnd[i]] + noSpRef <- grep("<speciesReference", tmp, fixed = TRUE) + if (length(noSpRef) == 0) { + remReact[reactBegin[i]:reactEnd[i]] <- FALSE + } + } + + lof <- lof[remReact] + + + # ------------------------------------------------------------------------ # + # Outside of a <functionDefinition>, if a 'ci' element is the first element + # within a MathML 'apply', then the 'ci''s value can only be chosen from the + # set of identifiers of <functionDefinition>s defined in the SBML model. + # The formula 'LOWER_BOUND(UPPER_BOUND, OBJECTIVE_COEFFICIENT, FLUX_VALUE, + # REDUCED_COST)' in the math element of the KineticLaw uses 'LOWER_BOUND' + # which is not a function definition id. + + # this is for Ec_iJR904_GlcMM.xml + + if (isTRUE(remapply)) { + apb <- grep("<apply>", lof, fixed = TRUE) + lof <- lof[-apb] + ape <- grep("</apply>", lof, fixed = TRUE) + lof <- lof[-ape] + } + + + # ------------------------------------------------------------------------ # + # yeast model version < 4.05 + # An SBML XML document must conform to the XML Schema for the corresponding + # SBML Level, Version and Release. The XML Schema for SBML defines the basic + # SBML object structure, the data types used by those objects, and the order + # in which the objects may appear in an SBML document. + # A KineticLaw object must contain exactly one MathML <math> element. + + # this is for yeast_4.04.xml (and lower versions; + # yeast_4.05 and higher are ok) + + # translate + # <kineticLaw> + # ... + # </kineticLaw> + # + # to + # <kineticLaw> + # <math xmlns="http://www.w3.org/1998/Math/MathML"> + # <ci> FLUX_VALUE </ci> + # </math> + # ... + # </kineticLaw> + + + # ------------------------------------------------------------------------ # + # write the new, hopefully error free, file + + hackedFile <- file(hackedFileName, "w") + + #writeLines(lof, con = hackedFile) + cat(lof, file = hackedFile, sep = "\n") + close(hackedFile) + + return(hackedFileName) + +} diff --git a/R/zzz.R b/R/zzz.R new file mode 100644 index 0000000..3cae4e9 --- /dev/null +++ b/R/zzz.R @@ -0,0 +1,37 @@ +#------------------------------------------------------------------------------# +# Link to libSBML for sybil # +#------------------------------------------------------------------------------# + +# zzz.R +# Link to libSBML for sybil. +# +# Copyright (C) 2013 Gabriel Gelius-Dietrich, Dpt. for Bioinformatics, +# Institute for Informatics, Heinrich-Heine-University, Duesseldorf, Germany. +# All right reserved. +# Email: geliudie@uni-duesseldorf.de +# +# This file is part of sybilSBML. +# +# SybilSBML is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# SybilSBML is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with sybilSBML If not, see <http://www.gnu.org/licenses/>. + + +.packageName <- "sybilSBML" + +.onLoad <- function(libname, pkgname) { + .Call("initSBML", PACKAGE = "sybilSBML") +} + +.onAttach <- function(libname, pkgname) { + packageStartupMessage("using libSBML version ", versionLibSBML()) +} diff --git a/cleanup b/cleanup new file mode 100755 index 0000000..0607031 --- /dev/null +++ b/cleanup @@ -0,0 +1,4 @@ +#! /bin/sh + +rm -rf config.* autom4te.cache src/Makevars src/check.c src/config.h src/*.o +exit 0 diff --git a/configure b/configure new file mode 100755 index 0000000..c935bad --- /dev/null +++ b/configure @@ -0,0 +1,4694 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.69 for sybilSBML 2.0.8. +# +# Report bugs to <geliudie@uni-duesseldorf.de>. +# +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org and +$0: geliudie@uni-duesseldorf.de about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +test -n "$DJDIR" || exec 7<&0 </dev/null +exec 6>&1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='sybilSBML' +PACKAGE_TARNAME='sybilsbml' +PACKAGE_VERSION='2.0.8' +PACKAGE_STRING='sybilSBML 2.0.8' +PACKAGE_BUGREPORT='geliudie@uni-duesseldorf.de' +PACKAGE_URL='' + +# Factoring default headers for most tests. +ac_includes_default="\ +#include <stdio.h> +#ifdef HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +#ifdef HAVE_SYS_STAT_H +# include <sys/stat.h> +#endif +#ifdef STDC_HEADERS +# include <stdlib.h> +# include <stddef.h> +#else +# ifdef HAVE_STDLIB_H +# include <stdlib.h> +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include <memory.h> +# endif +# include <string.h> +#endif +#ifdef HAVE_STRINGS_H +# include <strings.h> +#endif +#ifdef HAVE_INTTYPES_H +# include <inttypes.h> +#endif +#ifdef HAVE_STDINT_H +# include <stdint.h> +#endif +#ifdef HAVE_UNISTD_H +# include <unistd.h> +#endif" + +ac_subst_vars='LTLIBOBJS +LIBOBJS +PKG_CPPFLAGS +PKG_LIBS +PKG_CFLAGS +EGREP +GREP +PKG_CONFIG +CPP +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +with_sbml_include +with_sbml_lib +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures sybilSBML 2.0.8 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/sybilsbml] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of sybilSBML 2.0.8:";; + esac + cat <<\_ACEOF + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-sbml-include=PATH + location of libSBML include directory + --with-sbml-lib=PATH location of SBML callable library + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a + nonstandard directory <lib dir> + LIBS libraries to pass to the linker, e.g. -l<library> + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if + you have headers in a nonstandard directory <include dir> + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to <geliudie@uni-duesseldorf.de>. +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +sybilSBML configure 2.0.8 +generated by GNU Autoconf 2.69 + +Copyright (C) 2012 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ------------------------------------------ ## +## Report this to geliudie@uni-duesseldorf.de ## +## ------------------------------------------ ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by sybilSBML $as_me 2.0.8, which was +generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + +: ${R_HOME=`R RHOME`} +if test -z "${R_HOME}"; then + echo "could not determine R_HOME" + exit 1 +fi + +CC=`"${R_HOME}/bin/R" CMD config CC` +CPP=`"${R_HOME}/bin/R" CMD config CPP` +CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS` +CPPFLAGS=`"${R_HOME}/bin/R" CMD config CPPFLAGS` +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdio.h> +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdarg.h> +#include <stdio.h> +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <ac_nonexistent.h> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + +ARGS_OK="FALSE" + +if test -n "$PKG_CPPFLAGS" -a -n "$PKG_LIBS" ; then + ARGS_OK="TRUE" +else + if test -n "$PKG_CPPFLAGS" -o -n "$PKG_LIBS" ; then + as_fn_error $? "Please set both variables: PKG_CPPFLAGS AND PKG_LIBS" "$LINENO" 5 + fi +fi + + + + +# Check whether --with-sbml-include was given. +if test "${with_sbml_include+set}" = set; then : + withval=$with_sbml_include; SBML_INCLUDE=$withval +else + SBML_INCLUDE="" +fi + + + +# Check whether --with-sbml-lib was given. +if test "${with_sbml_lib+set}" = set; then : + withval=$with_sbml_lib; SBML_LIB=$withval +else + SBML_LIB="" +fi + + + + +if test "$ARGS_OK" = "FALSE" ; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PKG_CONFIG+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + if test "${PKG_CONFIG}" != "" ; then + if "${PKG_CONFIG}" --exists libsbml; then + + SBML_LIBS=`${PKG_CONFIG} --libs libsbml` + SBML_CFLAGS=`${PKG_CONFIG} --cflags libsbml` + + if test -z "$SBML_LIBS" -a -z "$SBML_CFLAGS" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: can not get information about libSBML from pkg-config" >&5 +$as_echo "$as_me: can not get information about libSBML from pkg-config" >&6;} + else + { $as_echo "$as_me:${as_lineno-$LINENO}: set compile and link flags according to pkg-config" >&5 +$as_echo "$as_me: set compile and link flags according to pkg-config" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: compile flags are $SBML_CFLAGS" >&5 +$as_echo "$as_me: compile flags are $SBML_CFLAGS" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: link flags are $SBML_LIBS" >&5 +$as_echo "$as_me: link flags are $SBML_LIBS" >&6;} + PKG_LIBS="${SBML_LIBS}" + PKG_CPPFLAGS="${SBML_CFLAGS}" + ARGS_OK="TRUE" + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: pkg-config file for libSBML is not available" >&5 +$as_echo "$as_me: pkg-config file for libSBML is not available" >&6;} + fi + fi +fi + + + +if test "$ARGS_OK" = "FALSE" ; then + + if test -n "$SBML_INCLUDE" -a -n "$SBML_LIB" ; then + + if test -d "$SBML_INCLUDE" ; then + if test -d "$SBML_INCLUDE/sbml" ; then + PKG_CPPFLAGS="-I${SBML_INCLUDE} -I${SBML_INCLUDE}/sbml" + else + PKG_CPPFLAGS="-I${SBML_INCLUDE}" + fi + else + as_fn_error $? "directory $SBML_INCLUDE does not exist" "$LINENO" 5 + fi + + if test -d "$SBML_LIB" ; then + if test -d "$SBML_LIB/sbml" ; then + PKG_LIBS="-L${SBML_LIB} -L${SBML_LIB}/sbml" + else + PKG_LIBS="-L${SBML_LIB}" + fi + else + as_fn_error $? "directory $SBML_LIB does not exist" "$LINENO" 5 + fi + + ARGS_OK="TRUE" + else + + + if test "$prefix" = "NONE" ; then + + if test -d "/usr/include" -o -d "/usr/local/include" ; then + PKG_CPPFLAGS="-I/usr/include -I/usr/local/include -I/usr/include/sbml -I/usr/local/include/sbml" + else + as_fn_error $? "directories /usr/include and /usr/local/include do not exist" "$LINENO" 5 + fi + + if test -d "/usr/local/lib" -o -d "/usr/local/lib64" -o -d "/usr/lib" -o -d "/usr/lib64" ; then + PKG_LIBS="" + if test -d "/usr/local/lib" ; then + PKG_LIBS="$PKG_LIBS -L/usr/local/lib" + if test -d "/usr/local/lib/sbml" ; then + PKG_LIBS="$PKG_LIBS -L/usr/local/lib/sbml" + fi + fi + if test -d "/usr/local/lib64" ; then + PKG_LIBS="$PKG_LIBS -L/usr/local/lib64" + if test -d "/usr/local/lib64/sbml" ; then + PKG_LIBS="$PKG_LIBS -L/usr/local/lib64/sbml" + fi + fi + if test -d "/usr/lib" ; then + PKG_LIBS="$PKG_LIBS -L/usr/lib" + if test -d "/usr/lib/sbml" ; then + PKG_LIBS="$PKG_LIBS -L/usr/lib/sbml" + fi + fi + if test -d "/usr/lib64" ; then + PKG_LIBS="$PKG_LIBS -L/usr/lib64" + if test -d "/usr/lib64/sbml" ; then + PKG_LIBS="$PKG_LIBS -L/usr/lib64/sbml" + fi + fi + # PKG_LIBS="-L/usr/local/lib -Wl,-rpath /usr/local/lib" + else + as_fn_error $? "none of the directories /usr/local/lib, /usr/local/lib64, /usr/lib or /usr/lib64 exists" "$LINENO" 5 + fi + + else + + { $as_echo "$as_me:${as_lineno-$LINENO}: trying prefix $prefix" >&5 +$as_echo "$as_me: trying prefix $prefix" >&6;} + + if test -d "$prefix/include" ; then + PKG_CPPFLAGS="-I$prefix/include -I$prefix/sbml" + else + as_fn_error $? "directory $prefix/include does not exist" "$LINENO" 5 + fi + + if test -d "$prefix/lib" -o -d "$prefix/lib64" ; then + PKG_LIBS="" + if test -d "$prefix/lib" ; then + PKG_LIBS="$PKG_LIBS -L$prefix/lib" + if test -d "$prefix/sbml" ; then + PKG_LIBS="$PKG_LIBS -L$prefix/sbml" + fi + fi + if test -d "$prefix/lib64" ; then + PKG_LIBS="$PKG_LIBS -L$prefix/lib64" + if test -d "$prefix/lib64/sbml" ; then + PKG_LIBS="$PKG_LIBS -L$prefix/lib64/sbml" + fi + fi + else + as_fn_error $? "none of the directories $prefix/lib of $prefix/lib64 exists" "$LINENO" 5 + fi + + fi + + fi + + PKG_LIBS="${PKG_LIBS} -lsbml" + + ARGS_OK="TRUE" + +fi + +if test ! "$ARGS_OK" = "TRUE" ; then + as_fn_error $? "no libSBML installation found" "$LINENO" 5 +fi + + + + +LIBS="${PKG_LIBS}" +CFLAGS="${CFLAGS} ${PKG_CFLAGS}" +CPPFLAGS="${CPPFLAGS} ${PKG_CPPFLAGS}" + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <float.h> + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <string.h> + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdlib.h> + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <ctype.h> +#include <stdlib.h> +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +ac_fn_c_check_header_mongrel "$LINENO" "sbml/SBMLTypes.h" "ac_cv_header_sbml_SBMLTypes_h" "$ac_includes_default" +if test "x$ac_cv_header_sbml_SBMLTypes_h" = xyes; then : + +else + as_fn_error $? "Could not find SBMLTypes.h: + sybilSBML requires libSBML from http://www.sbml.org/. + use --with-sbml-include or PKG_CPPFLAGS to specify the include path." "$LINENO" 5 +fi + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readSBML" >&5 +$as_echo_n "checking for library containing readSBML... " >&6; } +if ${ac_cv_search_readSBML+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char readSBML (); +int +main () +{ +return readSBML (); + ; + return 0; +} +_ACEOF +for ac_lib in '' sbml; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_readSBML=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_readSBML+:} false; then : + break +fi +done +if ${ac_cv_search_readSBML+:} false; then : + +else + ac_cv_search_readSBML=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_readSBML" >&5 +$as_echo "$ac_cv_search_readSBML" >&6; } +ac_res=$ac_cv_search_readSBML +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +else + as_fn_error $? "Could not link to libSBML: + use --with-sbml-lib or PKG_LIBS to specify the library path and the libraries to pass to the linker." "$LINENO" 5 +fi + + + + + + + +ac_config_files="$ac_config_files src/Makevars" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +ac_script=' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} +t clear +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +t quote +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +t quote +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` + + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by sybilSBML $as_me 2.0.8, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Report bugs to <geliudie@uni-duesseldorf.de>." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +sybilSBML config.status 2.0.8 +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2012 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "src/Makevars") CONFIG_FILES="$CONFIG_FILES src/Makevars" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' <conf$$subs.awk | sed ' +/^[^""]/{ + N + s/\n// +} +' >>$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + + +eval set X " :F $CONFIG_FILES " +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + + + + esac + +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + + +exit 0 diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..c75e9c7 --- /dev/null +++ b/configure.ac @@ -0,0 +1,249 @@ +AC_INIT([sybilSBML], [2.0.8], [geliudie@uni-duesseldorf.de]) + +dnl # -------------------------------------------------------------------- +dnl # global (environment) variables +dnl # -------------------------------------------------------------------- +dnl +dnl # PKG_CPPFLAGS C preprocessor flags -I... +dnl # PKG_CFLAGS C compiler flags +dnl # PKG_LIBS libraries -l... + + +dnl # -------------------------------------------------------------------- +dnl # R compiler and flags +dnl # -------------------------------------------------------------------- + +: ${R_HOME=`R RHOME`} +if test -z "${R_HOME}"; then + echo "could not determine R_HOME" + exit 1 +fi + +dnl # GNU R default settings +CC=`"${R_HOME}/bin/R" CMD config CC` +CPP=`"${R_HOME}/bin/R" CMD config CPP` +CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS` +CPPFLAGS=`"${R_HOME}/bin/R" CMD config CPPFLAGS` +AC_PROG_CC +AC_PROG_CPP + + +dnl # -------------------------------------------------------------------- +dnl # template config.h.in +dnl # -------------------------------------------------------------------- + +dnl # AC_CONFIG_HEADERS([src/config.h]) + + +dnl # -------------------------------------------------------------------- +dnl # test for global variables +dnl # -------------------------------------------------------------------- + +ARGS_OK="FALSE" + +if test [ -n "$PKG_CPPFLAGS" -a -n "$PKG_LIBS" ] ; then + ARGS_OK="TRUE" +else + if test [ -n "$PKG_CPPFLAGS" -o -n "$PKG_LIBS" ] ; then + AC_MSG_ERROR([Please set both variables: PKG_CPPFLAGS AND PKG_LIBS]) + fi +fi + + +dnl # -------------------------------------------------------------------- +dnl # get arguments +dnl # -------------------------------------------------------------------- + +AC_ARG_WITH(sbml-include, + AC_HELP_STRING([--with-sbml-include=PATH], + [location of libSBML include directory] + ), + [SBML_INCLUDE=$withval], + [SBML_INCLUDE=""]) + +AC_ARG_WITH(sbml-lib, + AC_HELP_STRING([--with-sbml-lib=PATH], + [location of SBML callable library] + ), + [SBML_LIB=$withval], + [SBML_LIB=""]) + + +dnl # -------------------------------------------------------------------- +dnl # pkg-config +dnl # -------------------------------------------------------------------- + +dnl # include and library directories +if test [ "$ARGS_OK" = "FALSE" ] ; then + AC_PATH_PROG([PKG_CONFIG], [pkg-config], [], [$PATH:/usr/local/bin]) + + if test [ "${PKG_CONFIG}" != "" ] ; then + if "${PKG_CONFIG}" --exists libsbml; then + + SBML_LIBS=`${PKG_CONFIG} --libs libsbml` + SBML_CFLAGS=`${PKG_CONFIG} --cflags libsbml` + + if test [ -z "$SBML_LIBS" -a -z "$SBML_CFLAGS" ] ; then + AC_MSG_NOTICE([can not get information about libSBML from pkg-config]) + else + AC_MSG_NOTICE([set compile and link flags according to pkg-config]) + AC_MSG_NOTICE([compile flags are $SBML_CFLAGS]) + AC_MSG_NOTICE([link flags are $SBML_LIBS]) + PKG_LIBS="${SBML_LIBS}" + PKG_CPPFLAGS="${SBML_CFLAGS}" + ARGS_OK="TRUE" + fi + else + AC_MSG_NOTICE([pkg-config file for libSBML is not available]) + fi + fi +fi + + +dnl # -------------------------------------------------------------------- +dnl # test arguments +dnl # -------------------------------------------------------------------- + +dnl # include and library directories +if test [ "$ARGS_OK" = "FALSE" ] ; then + + if test [ -n "$SBML_INCLUDE" -a -n "$SBML_LIB" ] ; then + + if test [ -d "$SBML_INCLUDE" ] ; then + if test [ -d "$SBML_INCLUDE/sbml"] ; then + PKG_CPPFLAGS="-I${SBML_INCLUDE} -I${SBML_INCLUDE}/sbml" + else + PKG_CPPFLAGS="-I${SBML_INCLUDE}" + fi + else + AC_MSG_ERROR([directory $SBML_INCLUDE does not exist]) + fi + + if test [ -d "$SBML_LIB" ] ; then + if test [ -d "$SBML_LIB/sbml" ] ; then + PKG_LIBS="-L${SBML_LIB} -L${SBML_LIB}/sbml" + else + PKG_LIBS="-L${SBML_LIB}" + fi + else + AC_MSG_ERROR([directory $SBML_LIB does not exist]) + fi + + ARGS_OK="TRUE" + else + + dnl # if no arguments are given, try to use /usr/local + + if test [ "$prefix" = "NONE" ] ; then + + if test [ -d "/usr/include" -o -d "/usr/local/include" ] ; then + PKG_CPPFLAGS="-I/usr/include -I/usr/local/include -I/usr/include/sbml -I/usr/local/include/sbml" + else + AC_MSG_ERROR([directories /usr/include and /usr/local/include do not exist]) + fi + + if test [ -d "/usr/local/lib" -o -d "/usr/local/lib64" -o -d "/usr/lib" -o -d "/usr/lib64" ] ; then + PKG_LIBS="" + if test [ -d "/usr/local/lib" ] ; then + PKG_LIBS="$PKG_LIBS -L/usr/local/lib" + if test [ -d "/usr/local/lib/sbml" ] ; then + PKG_LIBS="$PKG_LIBS -L/usr/local/lib/sbml" + fi + fi + if test [ -d "/usr/local/lib64" ] ; then + PKG_LIBS="$PKG_LIBS -L/usr/local/lib64" + if test [ -d "/usr/local/lib64/sbml" ] ; then + PKG_LIBS="$PKG_LIBS -L/usr/local/lib64/sbml" + fi + fi + if test [ -d "/usr/lib" ] ; then + PKG_LIBS="$PKG_LIBS -L/usr/lib" + if test [ -d "/usr/lib/sbml" ] ; then + PKG_LIBS="$PKG_LIBS -L/usr/lib/sbml" + fi + fi + if test [ -d "/usr/lib64" ] ; then + PKG_LIBS="$PKG_LIBS -L/usr/lib64" + if test [ -d "/usr/lib64/sbml" ] ; then + PKG_LIBS="$PKG_LIBS -L/usr/lib64/sbml" + fi + fi + # PKG_LIBS="-L/usr/local/lib -Wl,-rpath /usr/local/lib" + else + AC_MSG_ERROR([none of the directories /usr/local/lib, /usr/local/lib64, /usr/lib or /usr/lib64 exists]) + fi + + else + + AC_MSG_NOTICE(trying prefix $prefix) + + if test [ -d "$prefix/include" ] ; then + PKG_CPPFLAGS="-I$prefix/include -I$prefix/sbml" + else + AC_MSG_ERROR([directory $prefix/include does not exist]) + fi + + if test [ -d "$prefix/lib" -o -d "$prefix/lib64" ] ; then + PKG_LIBS="" + if test [ -d "$prefix/lib" ] ; then + PKG_LIBS="$PKG_LIBS -L$prefix/lib" + if test [ -d "$prefix/sbml" ] ; then + PKG_LIBS="$PKG_LIBS -L$prefix/sbml" + fi + fi + if test [ -d "$prefix/lib64" ] ; then + PKG_LIBS="$PKG_LIBS -L$prefix/lib64" + if test [ -d "$prefix/lib64/sbml" ] ; then + PKG_LIBS="$PKG_LIBS -L$prefix/lib64/sbml" + fi + fi + else + AC_MSG_ERROR([none of the directories $prefix/lib of $prefix/lib64 exists]) + fi + + fi + + fi + + dnl # PKG_LIBS="${PKG_LIBS} -lxml2 -lz -lpthread -licucore -lm -lz -lbz2 -lsbml -lstdc++ -lm" + PKG_LIBS="${PKG_LIBS} -lsbml" + + ARGS_OK="TRUE" + +fi + +if test [ ! "$ARGS_OK" = "TRUE" ] ; then + AC_MSG_ERROR([no libSBML installation found]) +fi + + + +dnl # -------------------------------------------------------------------- +dnl # check header and library +dnl # -------------------------------------------------------------------- + +LIBS="${PKG_LIBS}" +CFLAGS="${CFLAGS} ${PKG_CFLAGS}" +CPPFLAGS="${CPPFLAGS} ${PKG_CPPFLAGS}" + +AC_CHECK_HEADER([sbml/SBMLTypes.h], , + AC_MSG_ERROR([Could not find SBMLTypes.h: + sybilSBML requires libSBML from http://www.sbml.org/. + use --with-sbml-include or PKG_CPPFLAGS to specify the include path.])) + + +AC_SEARCH_LIBS([readSBML], [sbml], , + AC_MSG_ERROR([Could not link to libSBML: + use --with-sbml-lib or PKG_LIBS to specify the library path and the libraries to pass to the linker.])) + + +dnl # -------------------------------------------------------------------- +dnl # substitute src/Makevars +dnl # -------------------------------------------------------------------- + +AC_SUBST(PKG_CFLAGS) +AC_SUBST(PKG_LIBS) +AC_SUBST(PKG_CPPFLAGS) +AC_OUTPUT(src/Makevars) + +exit 0 diff --git a/configure.win b/configure.win new file mode 100644 index 0000000..e69de29 diff --git a/inst/CITATION b/inst/CITATION new file mode 100644 index 0000000..f33530e --- /dev/null +++ b/inst/CITATION @@ -0,0 +1,20 @@ +citHeader(paste("To cite package", sQuote("sybilSBML"), "in publications use:")) + +citEntry( + key = "ggd:sybil", + entry = "Article", + author = c(person("Gabriel", "Gelius-Dietrich", role = c("aut", "cre"), email = "geliudie@uni-duesseldorf.de"), + person(c("Claus", "Jonathan"), "Fritzemeier", role = "ctb"), + person(c("Abdelmoneim", "Amer"), "Desouki", role = "ctb"), + person(c("Martin", "J"), "Lercher", role = "ctb")), + title = "sybil -- Efficient constraint-based modelling in R", + journal = "BMC Systems Biology", + volume = "7", + year = "2013", + number = "1", + pages = "125", + url = "http://www.biomedcentral.com/1752-0509/7/125", + doi = "10.1186/1752-0509-7-125", + issn = "1752-0509", + textVersion = "Gelius-Dietrich, G. et al. (2013) sybil - Efficient constraint-based modelling in R. BMC Syst Biol 7(1):125" +) diff --git a/inst/INSTALL b/inst/INSTALL new file mode 100644 index 0000000..1036d3c --- /dev/null +++ b/inst/INSTALL @@ -0,0 +1,70 @@ +GNU R package sybilSBML: Link to libSBML for sybil + + +The installation procedure for the sybilSBML package needs to know where to +find the libSBML include directory and where to find the callable library. + + +# ---------------------------------------------------------------------------- # +# Linux and MacOS X installation +# ---------------------------------------------------------------------------- # + +There are basically four different ways of installing the sybilSBML package: + +1) Use --with-sbml-<ARG> + + --with-sbml-include=PATH with PATH being the include directory of libSBML + + --with-sbml-lib=PATH with PATH being the directory containing the + callable library. + + R CMD INSTALL --configure-args=" \ + --with-sbml-include=/path/to/include/dir \ + --with-sbml-lib=/path/to/lib/dir" sybilSBML_X.X.X.tar.gz + + + When using --with-sbml-<ARG>, both arguments must be given. + +2) Use of environment variables + + PKG_CPPFLAGS giving the PATH to the include directory of libSBML + PKG_LIBS giving the PATH to the directory containing the + callable library and the libraries to link to. + +3) Use --prefix + + --prefix=PATH with path being the installation directory of + sybilSBML. The include directory is assumed to be + PATH/include and the callable library should be + in PATH/lib. + + If either --with-sbml-<ARG> nor --prefix is given, it is checked wether + libSBML is located in /usr/local/include and /usr/local/lib[64] and + /usr/include and /usr/lib[64]. + + +4) Use pkg-config + + If pkg-config is available on your system, the pkg-config information + of libSBML will be used. + + +# ---------------------------------------------------------------------------- # +# Windows installation +# ---------------------------------------------------------------------------- # + +For the installation on Windows systems the file Makewars.win in src/ is +required. The file looks like this: + +PKG_CPPFLAGS= -D_R_=1 -DUSE_R=1 -I"$(LIB_SBML)/include" + +PKG_LIBS = -L"$(LIB_SBML)/bin" -lsbml + +all: $(SHLIB) + mkdir -p "$(R_PACKAGE_DIR)/libs$(R_ARCH)" + cp "$(LIB_SBML)/bin/libsbml.dll" "$(R_PACKAGE_DIR)\libs$(R_ARCH)" + +with the environment variable LIB_SBML being the installation directory +of libSBML. + + diff --git a/inst/NEWS.Rd b/inst/NEWS.Rd new file mode 100644 index 0000000..cb95f8e --- /dev/null +++ b/inst/NEWS.Rd @@ -0,0 +1,356 @@ +%% sybilSBML Version History + +\name{NEWS} +\title{sybilSBML News} +\encoding{UTF-8} + +\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}} + +% ---------------------------------------------------------------------------- % +\section{Changes in version 2.0.8 2014-05-21}{ + \itemize{ + \item function \code{openSBMLfile} does a \code{normalizePath} on its + argument \code{fname} + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 2.0.7 2013-11-27}{ + \itemize{ + \item added file \code{CITATION} + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 2.0.6 2013-10-26}{ + \itemize{ + \item a minor bugfix in file \file{configure.ac} + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 2.0.5 2013-09-08}{ + \itemize{ + \item function \code{readSBMLmod} returns an error if the input file does + not contain a -- or contains an empty -- \code{listOfReactions}, + \code{listOfSpecies} or \code{listOfCompartments} section. + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 2.0.4 2013-08-01}{ + \itemize{ + \item function \code{getSBMLCompartList()} returns also the compartment + names, if given + \item fixed a bug in file \file{configure.ac} which occurs when + \code{pkg-config} is not used + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 2.0.3 2013-05-30}{ + \itemize{ + \item some improvements in \file{Makevars.win} suggested by Brian D. Ripley + and Uwe Ligges + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 2.0.2 2013-05-28}{ + \itemize{ + \item removed \CRANpkg{glpkAPI} from Suggests in the \file{DESCRIPTION} file + \item some small changes in package vignette + \item some changes in \file{Makevars.win}, so that precompiled libSBML + binaries will be packed (for WIndows) + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 2.0.1 2013-05-14}{ + \itemize{ + \item added \CRANpkg{glpkAPI} to Suggests in the \file{DESCRIPTION} file + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 2.0.0 2013-05-14}{ + \itemize{ + \item changed argument \code{checkrsbml} to \code{validateSBML} in + function \code{readSBMLmod()} and set its default value to + \code{FALSE} + \item added new function \code{validateSBMLdocument()} + \item installation of \pkg{sybilSBML} requires libSBML version 5.6.0 or + higher, \pkg{rsbml} is no longer required + \item added functions + \code{versionLibSBML()}, + \code{openSBMLfile()}, + \code{closeSBMLfile()}, + \code{getSBMLmodel()}, + \code{delSBMLmodel()}, + \code{getSBMLlevel()}, + \code{getSBMLversion()}, + \code{validateSBMLdocument()}, + \code{getSBMLerrors()}, + \code{getSBMLmodId()}, + \code{getSBMLmodName()}, + \code{getSBMLnumCompart()}, + \code{getSBMLnumSpecies()}, + \code{getSBMLnumReactions()}, + \code{getSBMLunitDefinitionsList()}, + \code{getSBMLCompartList()}, + \code{getSBMLSpeciesList()} and + \code{getSBMLReactionsList()} + as low-level interface funcitons to the C-API of libSBML + \item added classes \code{sbmlPtr} and \code{sbmlError} + + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.1.16 2013-01-16}{ + \itemize{ + \item removed old file \file{NEWS.Rd} from top level directory + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.1.15 2012-10-15}{ + \itemize{ + \item updated package vignette + \item slot \code{rhs} of class \code{modelorg} is not set + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.1.14 2012-04-20}{ + \itemize{ + \item file \file{NEWS} is now in \file{inst/NEWS.Rd} + \item removed arguments \code{verboseMode}, \code{loglevel}, \code{logfile} + and \code{logfileEnc} from function \code{readSBMLmod}; use function + \code{sink} instead + \item fixed a bug in \code{.uglyHack}: tries no longer to fix SBMLWarnings, + which is not necessary + \item \code{.uglyHack} uses \code{tempfile()} to generate corrected + SBML files + \item fixed a bug in \code{readSBMLmod()}: slot \code{subSys} was not of + correct data type in rare cases + \item better SBML id formatting in \code{readSBMLmod()} + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.1.13 2012-03-16}{ + \itemize{ + \item compatible with \CRANpkg{sybil} version 0.5.12: replaced + \CRANpkg{SparseM} with \CRANpkg{Matrix} + + \item some additions to \code{.uglyHack()} + + \item fixed a small bug in \code{readSBMLmod()}, when parsing sub systems + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.1.12 2011-12-12}{ + \itemize{ + \item fixed a small bug in \code{readSBMLmod()} concerning the detection of + gpr rules + + \item fixed a bug in \code{readSBMLmod()}: genes from reactions which + are excluded from the model are not read + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.1.11 2011-12-09}{ + \itemize{ + \item very minor adjustments in \code{readSBMLmod()} + + \item \code{readSBMLmod()} will continue reading the model, + if \pkg{rsbml} produces warnings. Check warnings in the log file; + arguments \code{loglevel} and \code{logfile} in \code{readSBMLmod()} + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.1.10 2011-08-30}{ + \itemize{ + \item updated documentation + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.1.9 2011-08-30}{ + \itemize{ + \item added boolean arguments \code{remMet}, \code{contrMet}, + \code{singletonMet} and \code{deadEndmet} to \code{readSBMLmod()}, + the two boolen arguments \code{remSingleMet} and + \code{constrSingleMet} are removed, see \code{help("readSBMLmod")} + for details + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.1.8 2011-08-15}{ + \itemize{ + \item some small changes according to \CRANpkg{codetools} + + \item slots \code{met_single} and \code{react_single} of class + \code{modelorg} are initialized with \code{NA}, not \code{FALSE} + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.1.7 2011-08-12}{ + \itemize{ + \item new arguments for \code{readSBMLmod()}: + \code{mergeMet}, \code{balanceReact}, \code{remUnusedMetReact}, + \code{remSingleMet}, \code{constrSingleMet} and \code{tol}. + See \code{help("readSBMLmod")} for details + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.1.6 2011-08-08}{ + \itemize{ + \item a warning is produced, if a metabolite is used only once in S + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.1.5 2011-08-08}{ + \itemize{ + \item \code{readSBMLmod()} removes unused metabolites and reactions + (rows and lines without any non-zero entries) + + \item \code{readSBMLmod()} merges and balances metabolites as in + \code{readTSVmod()} from \CRANpkg{sybil} + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.1.4 2011-08-05}{ + \itemize{ + \item fixed a bug in \code{readSBMLmod()} concerning the number of + metabolite names and metabolite compartments + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.1.3 2011-08-05}{ + \itemize{ + \item added \code{NAMESPACE} + + \item new boolean parameter \code{bndCnd} in \code{readSBMLmod()}: + If set to \code{TRUE}, external metabolites are those, + having the SBML tag \code{boundaryCondition} set to \code{TRUE}. + If set to \code{FALSE}, external metabolites are recogized via + \code{extMetFlag} + + \item usage of class \code{sybilLog} in \code{readSBMLmod()} with four new + parameters. See \code{help("readSBMLmod")} for details. + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.1.2 2011-07-20}{ + \itemize{ + \item fixed a bug in \code{readSBMLmod()}: + if an external metabolite id is removed and it occcurs in + a reaction, that particular reaction is read correctly. + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.1.1 2011-07-06}{ + \itemize{ + \item new boolean parameter \code{ignoreNoAn} in \code{readSBMLmod()}: + if set to \code{TRUE}, any notes and annotation fields in the + \code{listOfReactions} in an SBML file are ignored + (default: \code{TRUE}). + + \item unused metabolites having no non-zero entry in S, are removed from S + and the metabolites list in instances of class \code{modelorg} + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.1.0 2011-05-17}{ + \itemize{ + \item updated documentation + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.0.3 2011-05-11}{ + \itemize{ + \item added compatibility to \CRANpkg{sybil} version \eqn{\geq}{>=} 0.4.1: + slot \code{subSys} is now of class \code{matrix} + + \item fixed a bug in \code{readSBMLmod()}: metablite id's differing + only in the number of consecutive '\code{_}' are now recogized + as different metabolite id's. + + \item \code{readSBMLmod()} can now read the Yeast model in the file + \file{Sc_iND750_GlcMM.xml} from the Palsson group. + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.0.2 2011-03-02}{ + \itemize{ + \item If the SBML file contains reactions with metabolites used as + reactands and products at the same time, the stoichiometric + coefficient for those metabolites is the sum of reactand and product. + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.0.1 2011-03-01}{ + \itemize{ + \item fixed some regular expressions when parsing metabolite names and id's + + \item added argument \code{extMetFlag} which is used to identify external + metabolites + + \item reads subsystem information also from annotations + } +} + + +% ---------------------------------------------------------------------------- % +\section{Changes in version 1.0.0 2011-01-25}{ + \itemize{ + \item initial public release + } +} + + diff --git a/inst/README b/inst/README new file mode 100644 index 0000000..543e28a --- /dev/null +++ b/inst/README @@ -0,0 +1,4 @@ +GNU R package sybilSBML: Link to libSBML for sybil + +The package sybilSBML requires a working installation of libSBML (>= 5.6.0) +(in particular libraries and header files). diff --git a/inst/extdata/ecoli_core_model.xml b/inst/extdata/ecoli_core_model.xml new file mode 100644 index 0000000..0d72848 --- /dev/null +++ b/inst/extdata/ecoli_core_model.xml @@ -0,0 +1,2685 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sbml xmlns="http://www.sbml.org/sbml/level2" level="2" version="1"> + <model id="Ecoli_core_model" name="Ecoli_core_model"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>COBRA_Toolbox</p></html> + </notes> + <listOfUnitDefinitions> + <unitDefinition id="mmol_per_gDW_per_hr"> + <listOfUnits> + <unit kind="mole" scale="-3" multiplier="1" offset="0"/> + <unit kind="gram" exponent="-1" multiplier="1" offset="0"/> + <unit kind="second" exponent="-1" multiplier="0.00027777" offset="0"/> + </listOfUnits> + </unitDefinition> + </listOfUnitDefinitions> + <listOfCompartments> + <compartment id="C_c" name="Cytoplasm"/> + <compartment id="C_e" name="Extracellular"/> + </listOfCompartments> + <listOfSpecies> + <species id="M_13dpg_c" name="3-Phospho-D-glyceroyl-phosphate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C3H4O10P2</p></html> + </notes> + </species> + <species id="M_2pg_c" name="D-Glycerate-2-phosphate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C3H4O7P</p></html> + </notes> + </species> + <species id="M_3pg_c" name="3-Phospho-D-glycerate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C3H4O7P</p></html> + </notes> + </species> + <species id="M_6pgc_c" name="6-Phospho-D-gluconate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C6H10O10P</p></html> + </notes> + </species> + <species id="M_6pgl_c" name="6-phospho-D-glucono-1-5-lactone" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C6H9O9P</p></html> + </notes> + </species> + <species id="M_ac_c" name="Acetate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C2H3O2</p></html> + </notes> + </species> + <species id="M_ac_e" name="Acetate" compartment="C_e"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C2H3O2</p></html> + </notes> + </species> + <species id="M_acald_c" name="Acetaldehyde" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C2H4O</p></html> + </notes> + </species> + <species id="M_acald_e" name="Acetaldehyde" compartment="C_e"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C2H4O</p></html> + </notes> + </species> + <species id="M_accoa_c" name="Acetyl-CoA" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C23H34N7O17P3S</p></html> + </notes> + </species> + <species id="M_acon_C_c" name="cis-Aconitate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C6H3O6</p></html> + </notes> + </species> + <species id="M_actp_c" name="Acetyl-phosphate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C2H3O5P</p></html> + </notes> + </species> + <species id="M_adp_c" name="ADP" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C10H12N5O10P2</p></html> + </notes> + </species> + <species id="M_akg_c" name="2-Oxoglutarate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C5H4O5</p></html> + </notes> + </species> + <species id="M_akg_e" name="2-Oxoglutarate" compartment="C_e"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C5H4O5</p></html> + </notes> + </species> + <species id="M_amp_c" name="AMP" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C10H12N5O7P</p></html> + </notes> + </species> + <species id="M_atp_c" name="ATP" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C10H12N5O13P3</p></html> + </notes> + </species> + <species id="M_cit_c" name="Citrate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C6H5O7</p></html> + </notes> + </species> + <species id="M_co2_c" name="CO2" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: CO2</p></html> + </notes> + </species> + <species id="M_co2_e" name="CO2" compartment="C_e"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: CO2</p></html> + </notes> + </species> + <species id="M_coa_c" name="Coenzyme-A" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C21H32N7O16P3S</p></html> + </notes> + </species> + <species id="M_dhap_c" name="Dihydroxyacetone-phosphate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C3H5O6P</p></html> + </notes> + </species> + <species id="M_e4p_c" name="D-Erythrose-4-phosphate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C4H7O7P</p></html> + </notes> + </species> + <species id="M_etoh_c" name="Ethanol" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C2H6O</p></html> + </notes> + </species> + <species id="M_etoh_e" name="Ethanol" compartment="C_e"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C2H6O</p></html> + </notes> + </species> + <species id="M_f6p_c" name="D-Fructose-6-phosphate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C6H11O9P</p></html> + </notes> + </species> + <species id="M_fdp_c" name="D-Fructose-1-6-bisphosphate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C6H10O12P2</p></html> + </notes> + </species> + <species id="M_for_c" name="Formate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: CH1O2</p></html> + </notes> + </species> + <species id="M_for_e" name="Formate" compartment="C_e"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: CH1O2</p></html> + </notes> + </species> + <species id="M_fru_e" name="D-Fructose" compartment="C_e"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C6H12O6</p></html> + </notes> + </species> + <species id="M_fum_c" name="Fumarate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C4H2O4</p></html> + </notes> + </species> + <species id="M_fum_e" name="Fumarate" compartment="C_e"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C4H2O4</p></html> + </notes> + </species> + <species id="M_g3p_c" name="Glyceraldehyde-3-phosphate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C3H5O6P</p></html> + </notes> + </species> + <species id="M_g6p_c" name="D-Glucose-6-phosphate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C6H11O9P</p></html> + </notes> + </species> + <species id="M_glc_D_e" name="D-Glucose" compartment="C_e"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C6H12O6</p></html> + </notes> + </species> + <species id="M_gln_L_c" name="L-Glutamine" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C5H10N2O3</p></html> + </notes> + </species> + <species id="M_gln_L_e" name="L-Glutamine" compartment="C_e"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C5H10N2O3</p></html> + </notes> + </species> + <species id="M_glu_L_c" name="L-Glutamate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C5H8NO4</p></html> + </notes> + </species> + <species id="M_glu_L_e" name="L-Glutamate" compartment="C_e"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C5H8NO4</p></html> + </notes> + </species> + <species id="M_glx_c" name="Glyoxylate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C2H1O3</p></html> + </notes> + </species> + <species id="M_h2o_c" name="H2O" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: H2O</p></html> + </notes> + </species> + <species id="M_h2o_e" name="H2O" compartment="C_e"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: H2O</p></html> + </notes> + </species> + <species id="M_h_c" name="H" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: H</p></html> + </notes> + </species> + <species id="M_h_e" name="H" compartment="C_e"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: H</p></html> + </notes> + </species> + <species id="M_icit_c" name="Isocitrate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C6H5O7</p></html> + </notes> + </species> + <species id="M_lac_D_c" name="D-Lactate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C3H5O3</p></html> + </notes> + </species> + <species id="M_lac_D_e" name="D-Lactate" compartment="C_e"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C3H5O3</p></html> + </notes> + </species> + <species id="M_mal_L_c" name="L-Malate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C4H4O5</p></html> + </notes> + </species> + <species id="M_mal_L_e" name="L-Malate" compartment="C_e"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C4H4O5</p></html> + </notes> + </species> + <species id="M_nad_c" name="Nicotinamide-adenine-dinucleotide" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C21H26N7O14P2</p></html> + </notes> + </species> + <species id="M_nadh_c" name="Nicotinamide-adenine-dinucleotide-reduced" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C21H27N7O14P2</p></html> + </notes> + </species> + <species id="M_nadp_c" name="Nicotinamide-adenine-dinucleotide-phosphate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C21H25N7O17P3</p></html> + </notes> + </species> + <species id="M_nadph_c" name="Nicotinamide-adenine-dinucleotide-phosphate-reduced" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C21H26N7O17P3</p></html> + </notes> + </species> + <species id="M_nh4_c" name="Ammonium" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: H4N</p></html> + </notes> + </species> + <species id="M_nh4_e" name="Ammonium" compartment="C_e"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: H4N</p></html> + </notes> + </species> + <species id="M_o2_c" name="O2" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: O2</p></html> + </notes> + </species> + <species id="M_o2_e" name="O2" compartment="C_e"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: O2</p></html> + </notes> + </species> + <species id="M_oaa_c" name="Oxaloacetate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C4H2O5</p></html> + </notes> + </species> + <species id="M_pep_c" name="Phosphoenolpyruvate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C3H2O6P</p></html> + </notes> + </species> + <species id="M_pi_c" name="Phosphate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: HO4P</p></html> + </notes> + </species> + <species id="M_pi_e" name="Phosphate" compartment="C_e"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: HO4P</p></html> + </notes> + </species> + <species id="M_pyr_c" name="Pyruvate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C3H3O3</p></html> + </notes> + </species> + <species id="M_pyr_e" name="Pyruvate" compartment="C_e"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C3H3O3</p></html> + </notes> + </species> + <species id="M_q8_c" name="Ubiquinone-8" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C49H74O4</p></html> + </notes> + </species> + <species id="M_q8h2_c" name="Ubiquinol-8" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C49H76O4</p></html> + </notes> + </species> + <species id="M_r5p_c" name="alpha-D-Ribose-5-phosphate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C5H9O8P</p></html> + </notes> + </species> + <species id="M_ru5p_D_c" name="D-Ribulose-5-phosphate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C5H9O8P</p></html> + </notes> + </species> + <species id="M_s7p_c" name="Sedoheptulose-7-phosphate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C7H13O10P</p></html> + </notes> + </species> + <species id="M_succ_c" name="Succinate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C4H4O4</p></html> + </notes> + </species> + <species id="M_succ_e" name="Succinate" compartment="C_e"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C4H4O4</p></html> + </notes> + </species> + <species id="M_succoa_c" name="Succinyl-CoA" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C25H35N7O19P3S</p></html> + </notes> + </species> + <species id="M_xu5p_D_c" name="D-Xylulose-5-phosphate" compartment="C_c"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>FORMULA: C5H9O8P</p></html> + </notes> + </species> + <species id="M_ac_b" name="ac_b" compartment="C_e"/> + <species id="M_acald_b" name="acald_b" compartment="C_e"/> + <species id="M_akg_b" name="akg_b" compartment="C_e"/> + <species id="M_co2_b" name="co2_b" compartment="C_e"/> + <species id="M_etoh_b" name="etoh_b" compartment="C_e"/> + <species id="M_for_b" name="for_b" compartment="C_e"/> + <species id="M_fru_b" name="fru_b" compartment="C_e"/> + <species id="M_fum_b" name="fum_b" compartment="C_e"/> + <species id="M_glc_D_b" name="glc_D_b" compartment="C_e"/> + <species id="M_gln_L_b" name="gln_L_b" compartment="C_e"/> + <species id="M_glu_L_b" name="glu_L_b" compartment="C_e"/> + <species id="M_h2o_b" name="h2o_b" compartment="C_e"/> + <species id="M_h_b" name="h_b" compartment="C_e"/> + <species id="M_lac_D_b" name="lac_D_b" compartment="C_e"/> + <species id="M_mal_L_b" name="mal_L_b" compartment="C_e"/> + <species id="M_nh4_b" name="nh4_b" compartment="C_e"/> + <species id="M_o2_b" name="o2_b" compartment="C_e"/> + <species id="M_pi_b" name="pi_b" compartment="C_e"/> + <species id="M_pyr_b" name="pyr_b" compartment="C_e"/> + <species id="M_succ_b" name="succ_b" compartment="C_e"/> + </listOfSpecies> + <listOfReactions> + <reaction id="R_ACALD" name="acetaldehyde dehydrogenase (acetylating)"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: (b0351 or b1241)</p><p>GENE_LIST: b0351 b1241</p><p>SUBSYSTEM: Pyruvate Metabolism</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_acald_c"/> + <speciesReference species="M_coa_c"/> + <speciesReference species="M_nad_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_accoa_c"/> + <speciesReference species="M_h_c"/> + <speciesReference species="M_nadh_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_ACALDt" name="acetaldehyde reversible transport"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: s0001</p><p>GENE_LIST: s0001</p><p>SUBSYSTEM: Transport, Extracellular</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_acald_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_acald_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_ACKr" name="acetate kinase"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: (b3115 or b2296 or b1849)</p><p>GENE_LIST: b1849 b2296 b3115</p><p>SUBSYSTEM: Pyruvate Metabolism</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_ac_c"/> + <speciesReference species="M_atp_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_actp_c"/> + <speciesReference species="M_adp_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_ACONTa" name="aconitase (half-reaction A, Citrate hydro-lyase)"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: (b0118 or b1276)</p><p>GENE_LIST: b0118 b1276</p><p>SUBSYSTEM: Citric Acid Cycle</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_cit_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_acon_C_c"/> + <speciesReference species="M_h2o_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_ACONTb" name="aconitase (half-reaction B, Isocitrate hydro-lyase)"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: (b0118 or b1276)</p><p>GENE_LIST: b0118 b1276</p><p>SUBSYSTEM: Citric Acid Cycle</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_acon_C_c"/> + <speciesReference species="M_h2o_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_icit_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_ACt2r" name="acetate reversible transport via proton symport"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>SUBSYSTEM: Transport, Extracellular</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_ac_e"/> + <speciesReference species="M_h_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_ac_c"/> + <speciesReference species="M_h_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_ADK1" name="adenylate kinase"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: b0474</p><p>GENE_LIST: b0474</p><p>SUBSYSTEM: Oxidative Phosphorylation</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_amp_c"/> + <speciesReference species="M_atp_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_adp_c" stoichiometry="2"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_AKGDH" name="2-Oxoglutarate dehydrogenase" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: ( b0116 and b0726 and b0727 )</p><p>GENE_LIST: b0116 b0726 b0727</p><p>SUBSYSTEM: Citric Acid Cycle</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_akg_c"/> + <speciesReference species="M_coa_c"/> + <speciesReference species="M_nad_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_co2_c"/> + <speciesReference species="M_nadh_c"/> + <speciesReference species="M_succoa_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_AKGt2r" name="2-oxoglutarate reversible transport via symport"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: b2587</p><p>GENE_LIST: b2587</p><p>SUBSYSTEM: Transport, Extracellular</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_akg_e"/> + <speciesReference species="M_h_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_akg_c"/> + <speciesReference species="M_h_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_ALCD2x" name="alcohol dehydrogenase (ethanol)"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: (b0356 or b1478 or b1241)</p><p>GENE_LIST: b0356 b1241 b1478</p><p>SUBSYSTEM: Pyruvate Metabolism</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_etoh_c"/> + <speciesReference species="M_nad_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_acald_c"/> + <speciesReference species="M_h_c"/> + <speciesReference species="M_nadh_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_ATPM" name="ATP maintenance requirement" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>SUBSYSTEM: Oxidative Phosphorylation</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_atp_c"/> + <speciesReference species="M_h2o_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_adp_c"/> + <speciesReference species="M_h_c"/> + <speciesReference species="M_pi_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="8.39" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="504.195" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_ATPS4r" name="ATP synthase (four protons for one ATP)"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: (((b3736 and b3737 and b3738) and (b3731 and b3732 and b3733 and b3734 and b3735)) or ((b3736 and b3737 and b3738) and (b3731 and b3732 and b3733 and b3734 and b3735) and b3739))</p><p>GENE_LIST: b3731 b3732 b3733 b3734 b3735 b3736 b3737 b3738 b3739</p><p>SUBSYSTEM: Oxidative Phosphorylation</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_adp_c"/> + <speciesReference species="M_h_e" stoichiometry="4"/> + <speciesReference species="M_pi_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_atp_c"/> + <speciesReference species="M_h2o_c"/> + <speciesReference species="M_h_c" stoichiometry="3"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_Biomass_Ecoli_core_w_GAM" name="Biomass Objective Function with GAM" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"></html> + </notes> + <listOfReactants> + <speciesReference species="M_3pg_c" stoichiometry="1.496"/> + <speciesReference species="M_accoa_c" stoichiometry="3.7478"/> + <speciesReference species="M_atp_c" stoichiometry="59.81"/> + <speciesReference species="M_e4p_c" stoichiometry="0.361"/> + <speciesReference species="M_f6p_c" stoichiometry="0.0709"/> + <speciesReference species="M_g3p_c" stoichiometry="0.129"/> + <speciesReference species="M_g6p_c" stoichiometry="0.205"/> + <speciesReference species="M_gln_L_c" stoichiometry="0.2557"/> + <speciesReference species="M_glu_L_c" stoichiometry="4.9414"/> + <speciesReference species="M_h2o_c" stoichiometry="59.81"/> + <speciesReference species="M_nad_c" stoichiometry="3.547"/> + <speciesReference species="M_nadph_c" stoichiometry="13.0279"/> + <speciesReference species="M_oaa_c" stoichiometry="1.7867"/> + <speciesReference species="M_pep_c" stoichiometry="0.5191"/> + <speciesReference species="M_pyr_c" stoichiometry="2.8328"/> + <speciesReference species="M_r5p_c" stoichiometry="0.8977"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_adp_c" stoichiometry="59.81"/> + <speciesReference species="M_akg_c" stoichiometry="4.1182"/> + <speciesReference species="M_coa_c" stoichiometry="3.7478"/> + <speciesReference species="M_h_c" stoichiometry="59.81"/> + <speciesReference species="M_nadh_c" stoichiometry="3.547"/> + <speciesReference species="M_nadp_c" stoichiometry="13.0279"/> + <speciesReference species="M_pi_c" stoichiometry="59.81"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="1"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_CO2t" name="CO2 transporter via diffusion"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: s0001</p><p>GENE_LIST: s0001</p><p>SUBSYSTEM: Transport, Extracellular</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_co2_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_co2_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_CS" name="citrate synthase" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: b0720</p><p>GENE_LIST: b0720</p><p>SUBSYSTEM: Citric Acid Cycle</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_accoa_c"/> + <speciesReference species="M_h2o_c"/> + <speciesReference species="M_oaa_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_cit_c"/> + <speciesReference species="M_coa_c"/> + <speciesReference species="M_h_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_CYTBD" name="cytochrome oxidase bd (ubiquinol-8: 2 protons)" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: ((b0978 and b0979) or (b0733 and b0734))</p><p>GENE_LIST: b0733 b0734 b0978 b0979</p><p>SUBSYSTEM: Oxidative Phosphorylation</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_h_c" stoichiometry="2"/> + <speciesReference species="M_o2_c" stoichiometry="0.5"/> + <speciesReference species="M_q8h2_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_h2o_c"/> + <speciesReference species="M_h_e" stoichiometry="2"/> + <speciesReference species="M_q8_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_D_LACt2" name="D-lactate transport via proton symport"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: ( b2975 or b3603 )</p><p>GENE_LIST: b2975 b3603</p><p>SUBSYSTEM: Transport, Extracellular</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_h_e"/> + <speciesReference species="M_lac_D_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_h_c"/> + <speciesReference species="M_lac_D_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_ENO" name="enolase"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: b2779</p><p>GENE_LIST: b2779</p><p>SUBSYSTEM: Glycolysis/Gluconeogenesis</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_2pg_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_h2o_c"/> + <speciesReference species="M_pep_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_ETOHt2r" name="ethanol reversible transport via proton symport"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>SUBSYSTEM: Transport, Extracellular</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_etoh_e"/> + <speciesReference species="M_h_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_etoh_c"/> + <speciesReference species="M_h_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_EX_ac_e" name="Acetate exchange"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>SUBSYSTEM: Exchange</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_ac_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_ac_b"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_EX_acald_e" name="Acetaldehyde exchange"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>SUBSYSTEM: Exchange</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_acald_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_acald_b"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_EX_akg_e" name="2-Oxoglutarate exchange"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>SUBSYSTEM: Exchange</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_akg_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_akg_b"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_EX_co2_e" name="CO2 exchange"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>SUBSYSTEM: Exchange</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_co2_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_co2_b"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_EX_etoh_e" name="Ethanol exchange"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>SUBSYSTEM: Exchange</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_etoh_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_etoh_b"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_EX_for_e" name="Formate exchange"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>SUBSYSTEM: Exchange</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_for_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_for_b"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_EX_fru_e" name="D-Fructose exchange"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>SUBSYSTEM: Exchange</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_fru_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_fru_b"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_EX_fum_e" name="Fumarate exchange"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>SUBSYSTEM: Exchange</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_fum_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_fum_b"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_EX_glc_e" name="D-Glucose exchange"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>SUBSYSTEM: Exchange</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_glc_D_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_glc_D_b"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-10" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="495" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_EX_gln_L_e" name="L-Glutamine exchange"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>SUBSYSTEM: Exchange</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_gln_L_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_gln_L_b"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_EX_glu_L_e" name="L-Glutamate exchange"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>SUBSYSTEM: Exchange</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_glu_L_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_glu_L_b"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_EX_h_e" name="H+ exchange"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>SUBSYSTEM: Exchange</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_h_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_h2o_b"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_EX_h2o_e" name="H2O exchange"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>SUBSYSTEM: Exchange</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_h2o_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_h_b"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_EX_lac_D_e" name="D-Lactate exchange"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>SUBSYSTEM: Exchange</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_lac_D_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_lac_D_b"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_EX_mal_L_e" name="L-Malate exchange"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>SUBSYSTEM: Exchange</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_mal_L_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_mal_L_b"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_EX_nh4_e" name="Ammonium exchange"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>SUBSYSTEM: Exchange</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_nh4_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_nh4_b"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_EX_o2_e" name="O2 exchange"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>SUBSYSTEM: Exchange</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_o2_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_o2_b"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_EX_pi_e" name="Phosphate exchange"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>SUBSYSTEM: Exchange</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_pi_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_pi_b"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_EX_pyr_e" name="Pyruvate exchange"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>SUBSYSTEM: Exchange</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_pyr_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_pyr_b"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_EX_succ_e" name="Succinate exchange"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>SUBSYSTEM: Exchange</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_succ_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_succ_b"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_FBA" name="fructose-bisphosphate aldolase"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: (b2097 or b1773 or b2925)</p><p>GENE_LIST: b1773 b2097 b2925</p><p>SUBSYSTEM: Glycolysis/Gluconeogenesis</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_fdp_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_dhap_c"/> + <speciesReference species="M_g3p_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_FBP" name="fructose-bisphosphatase" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: (b3925 or b4232)</p><p>GENE_LIST: b3925 b4232</p><p>SUBSYSTEM: Glycolysis/Gluconeogenesis</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_fdp_c"/> + <speciesReference species="M_h2o_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_f6p_c"/> + <speciesReference species="M_pi_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_FORt2" name="formate transport via proton symport (uptake only)" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: (b0904 or b2492)</p><p>GENE_LIST: b0904 b2492</p><p>SUBSYSTEM: Transport, Extracellular</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_for_e"/> + <speciesReference species="M_h_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_for_c"/> + <speciesReference species="M_h_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_FORti" name="formate transport via diffusion" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: (b0904 or b2492)</p><p>GENE_LIST: b0904 b2492</p><p>SUBSYSTEM: Transport, Extracellular</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_for_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_for_e"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_FRD7" name="fumarate reductase" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: (b4151 and b4152 and b4153 and b4154)</p><p>GENE_LIST: b4151 b4152 b4153 b4154</p><p>SUBSYSTEM: Oxidative Phosphorylation</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_fum_c"/> + <speciesReference species="M_q8h2_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_q8_c"/> + <speciesReference species="M_succ_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_FRUpts2" name="Fructose transport via PEP:Pyr PTS (f6p generating)" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: (b1817 and b1818 and b1819 and b2415 and b2416)</p><p>GENE_LIST: b1817 b1818 b1819 b2415 b2416</p><p>SUBSYSTEM: Transport, Extracellular</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_fru_e"/> + <speciesReference species="M_pep_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_f6p_c"/> + <speciesReference species="M_pyr_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_FUM" name="fumarase"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: ( b1612 or b4122 or b1611 )</p><p>GENE_LIST: b1611 b1612 b4122</p><p>SUBSYSTEM: Citric Acid Cycle</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_fum_c"/> + <speciesReference species="M_h2o_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_mal_L_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_FUMt2_2" name="Fumarate transport via proton symport (2 H)" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: b3528</p><p>GENE_LIST: b3528</p><p>SUBSYSTEM: Transport, Extracellular</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_fum_e"/> + <speciesReference species="M_h_e" stoichiometry="2"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_fum_c"/> + <speciesReference species="M_h_c" stoichiometry="2"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_G6PDH2r" name="glucose 6-phosphate dehydrogenase"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: b1852</p><p>GENE_LIST: b1852</p><p>SUBSYSTEM: Pentose Phosphate Pathway</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_g6p_c"/> + <speciesReference species="M_nadp_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_6pgl_c"/> + <speciesReference species="M_h_c"/> + <speciesReference species="M_nadph_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_GAPD" name="glyceraldehyde-3-phosphate dehydrogenase"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: b1779</p><p>GENE_LIST: b1779</p><p>SUBSYSTEM: Glycolysis/Gluconeogenesis</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_g3p_c"/> + <speciesReference species="M_nad_c"/> + <speciesReference species="M_pi_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_13dpg_c"/> + <speciesReference species="M_h_c"/> + <speciesReference species="M_nadh_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_GLCpts" name="D-glucose transport via PEP:Pyr PTS" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: ((b2417 and b1101 and b2415 and b2416) or (b1817 and b1818 and b1819 and b2415 and b2416) or (b2417 and b1621 and b2415 and b2416))</p><p>GENE_LIST: b1101 b1621 b1817 b1818 b1819 b2415 b2416 b2417</p><p>SUBSYSTEM: Transport, Extracellular</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_glc_D_e"/> + <speciesReference species="M_pep_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_g6p_c"/> + <speciesReference species="M_pyr_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_GLNS" name="glutamine synthetase" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: (b3870 or b1297)</p><p>GENE_LIST: b1297 b3870</p><p>SUBSYSTEM: Glutamate Metabolism</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_atp_c"/> + <speciesReference species="M_glu_L_c"/> + <speciesReference species="M_nh4_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_adp_c"/> + <speciesReference species="M_gln_L_c"/> + <speciesReference species="M_h_c"/> + <speciesReference species="M_pi_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_GLNabc" name="L-glutamine transport via ABC system" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: (b0811 and b0810 and b0809)</p><p>GENE_LIST: b0809 b0810 b0811</p><p>SUBSYSTEM: Transport, Extracellular</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_atp_c"/> + <speciesReference species="M_gln_L_e"/> + <speciesReference species="M_h2o_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_adp_c"/> + <speciesReference species="M_gln_L_c"/> + <speciesReference species="M_h_c"/> + <speciesReference species="M_pi_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_GLUDy" name="glutamate dehydrogenase (NADP)"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: b1761</p><p>GENE_LIST: b1761</p><p>SUBSYSTEM: Glutamate Metabolism</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_glu_L_c"/> + <speciesReference species="M_h2o_c"/> + <speciesReference species="M_nadp_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_akg_c"/> + <speciesReference species="M_h_c"/> + <speciesReference species="M_nadph_c"/> + <speciesReference species="M_nh4_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_GLUN" name="glutaminase" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: (b1812 or b0485 or b1524)</p><p>GENE_LIST: b0485 b1524 b1812</p><p>SUBSYSTEM: Glutamate Metabolism</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_gln_L_c"/> + <speciesReference species="M_h2o_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_glu_L_c"/> + <speciesReference species="M_nh4_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_GLUSy" name="glutamate synthase (NADPH)" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: (b3212 and b3213)</p><p>GENE_LIST: b3212 b3213</p><p>SUBSYSTEM: Glutamate Metabolism</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_akg_c"/> + <speciesReference species="M_gln_L_c"/> + <speciesReference species="M_h_c"/> + <speciesReference species="M_nadph_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_glu_L_c" stoichiometry="2"/> + <speciesReference species="M_nadp_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_GLUt2r" name="L-glutamate transport via proton symport, reversible (periplasm)"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: b4077</p><p>GENE_LIST: b4077</p><p>SUBSYSTEM: Transport, Extracellular</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_glu_L_e"/> + <speciesReference species="M_h_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_glu_L_c"/> + <speciesReference species="M_h_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_GND" name="phosphogluconate dehydrogenase" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: b2029</p><p>GENE_LIST: b2029</p><p>SUBSYSTEM: Pentose Phosphate Pathway</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_6pgc_c"/> + <speciesReference species="M_nadp_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_co2_c"/> + <speciesReference species="M_nadph_c"/> + <speciesReference species="M_ru5p_D_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_H2Ot" name="H2O transport via diffusion"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: (b0875 or s0001)</p><p>GENE_LIST: b0875 s0001</p><p>SUBSYSTEM: Transport, Extracellular</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_h2o_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_h2o_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_ICDHyr" name="isocitrate dehydrogenase (NADP)"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: b1136</p><p>GENE_LIST: b1136</p><p>SUBSYSTEM: Citric Acid Cycle</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_icit_c"/> + <speciesReference species="M_nadp_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_akg_c"/> + <speciesReference species="M_co2_c"/> + <speciesReference species="M_nadph_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_ICL" name="Isocitrate lyase" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: b4015</p><p>GENE_LIST: b4015</p><p>SUBSYSTEM: Anaplerotic reactions</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_icit_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_glx_c"/> + <speciesReference species="M_succ_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_LDH_D" name="D lactate dehydrogenase"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: (b2133 or b1380)</p><p>GENE_LIST: b1380 b2133</p><p>SUBSYSTEM: Pyruvate Metabolism</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_lac_D_c"/> + <speciesReference species="M_nad_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_h_c"/> + <speciesReference species="M_nadh_c"/> + <speciesReference species="M_pyr_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_MALS" name="malate synthase" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: ( b4014 or b2976 )</p><p>GENE_LIST: b2976 b4014</p><p>SUBSYSTEM: Anaplerotic reactions</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_accoa_c"/> + <speciesReference species="M_glx_c"/> + <speciesReference species="M_h2o_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_coa_c"/> + <speciesReference species="M_h_c"/> + <speciesReference species="M_mal_L_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_MALt2_2" name="Malate transport via proton symport (2 H)" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: b3528</p><p>GENE_LIST: b3528</p><p>SUBSYSTEM: Transport, Extracellular</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_h_e" stoichiometry="2"/> + <speciesReference species="M_mal_L_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_h_c" stoichiometry="2"/> + <speciesReference species="M_mal_L_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_MDH" name="malate dehydrogenase"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: b3236</p><p>GENE_LIST: b3236</p><p>SUBSYSTEM: Citric Acid Cycle</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_mal_L_c"/> + <speciesReference species="M_nad_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_h_c"/> + <speciesReference species="M_nadh_c"/> + <speciesReference species="M_oaa_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_ME1" name="malic enzyme (NAD)" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: b1479</p><p>GENE_LIST: b1479</p><p>SUBSYSTEM: Anaplerotic reactions</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_mal_L_c"/> + <speciesReference species="M_nad_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_co2_c"/> + <speciesReference species="M_nadh_c"/> + <speciesReference species="M_pyr_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_ME2" name="malic enzyme (NADP)" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: b2463</p><p>GENE_LIST: b2463</p><p>SUBSYSTEM: Anaplerotic reactions</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_mal_L_c"/> + <speciesReference species="M_nadp_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_co2_c"/> + <speciesReference species="M_nadph_c"/> + <speciesReference species="M_pyr_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_NADH16" name="NADH dehydrogenase (ubiquinone-8 & 3 protons)" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: (b2276 and b2277 and b2278 and b2279 and b2280 and b2281 and b2282 and b2283 and b2284 and b2285 and b2286 and b2287 and b2288)</p><p>GENE_LIST: b2276 b2277 b2278 b2279 b2280 b2281 b2282 b2283 b2284 b2285 b2286 b2287 b2288</p><p>SUBSYSTEM: Oxidative Phosphorylation</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_h_c" stoichiometry="4"/> + <speciesReference species="M_nadh_c"/> + <speciesReference species="M_q8_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_h_e" stoichiometry="3"/> + <speciesReference species="M_nad_c"/> + <speciesReference species="M_q8h2_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_NADTRHD" name="NAD transhydrogenase" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: (b3962 or (b1602 and b1603))</p><p>GENE_LIST: b1602 b1603 b3962</p><p>SUBSYSTEM: Oxidative Phosphorylation</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_nad_c"/> + <speciesReference species="M_nadph_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_nadh_c"/> + <speciesReference species="M_nadp_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_NH4t" name="ammonia reversible transport"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: (s0001 or b0451)</p><p>GENE_LIST: b0451 s0001</p><p>SUBSYSTEM: Inorganic Ion Transport and Metabolism</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_nh4_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_nh4_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_O2t" name="o2 transport via diffusion"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: s0001</p><p>GENE_LIST: s0001</p><p>SUBSYSTEM: Transport, Extracellular</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_o2_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_o2_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_PDH" name="pyruvate dehydrogenase" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: ( b0114 and b0115 and b0116 )</p><p>GENE_LIST: b0114 b0115 b0116</p><p>SUBSYSTEM: Glycolysis/Gluconeogenesis</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_coa_c"/> + <speciesReference species="M_nad_c"/> + <speciesReference species="M_pyr_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_accoa_c"/> + <speciesReference species="M_co2_c"/> + <speciesReference species="M_nadh_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_PFK" name="phosphofructokinase" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: ( b3916 or b1723 )</p><p>GENE_LIST: b1723 b3916</p><p>SUBSYSTEM: Glycolysis/Gluconeogenesis</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_atp_c"/> + <speciesReference species="M_f6p_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_adp_c"/> + <speciesReference species="M_fdp_c"/> + <speciesReference species="M_h_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_PFL" name="pyruvate formate lyase" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: (((b0902 and b0903) and b2579) or (b0902 and b0903) or (b0902 and b3114) or (b3951 and b3952))</p><p>GENE_LIST: b0902 b0903 b2579 b3114 b3951 b3952</p><p>SUBSYSTEM: Pyruvate Metabolism</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_coa_c"/> + <speciesReference species="M_pyr_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_accoa_c"/> + <speciesReference species="M_for_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_PGI" name="glucose-6-phosphate isomerase"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: b4025</p><p>GENE_LIST: b4025</p><p>SUBSYSTEM: Glycolysis/Gluconeogenesis</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_g6p_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_f6p_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_PGK" name="phosphoglycerate kinase"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: b2926</p><p>GENE_LIST: b2926</p><p>SUBSYSTEM: Glycolysis/Gluconeogenesis</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_3pg_c"/> + <speciesReference species="M_atp_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_13dpg_c"/> + <speciesReference species="M_adp_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_PGL" name="6-phosphogluconolactonase" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: b0767</p><p>GENE_LIST: b0767</p><p>SUBSYSTEM: Pentose Phosphate Pathway</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_6pgl_c"/> + <speciesReference species="M_h2o_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_6pgc_c"/> + <speciesReference species="M_h_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_PGM" name="phosphoglycerate mutase"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: (b3612 or b4395 or b0755)</p><p>GENE_LIST: b0755 b3612 b4395</p><p>SUBSYSTEM: Glycolysis/Gluconeogenesis</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_2pg_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_3pg_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_PIt2r" name="phosphate reversible transport via proton symport"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: (b2987 or b3493)</p><p>GENE_LIST: b2987 b3493</p><p>SUBSYSTEM: Inorganic Ion Transport and Metabolism</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_h_e"/> + <speciesReference species="M_pi_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_h_c"/> + <speciesReference species="M_pi_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_PPC" name="phosphoenolpyruvate carboxylase" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: b3956</p><p>GENE_LIST: b3956</p><p>SUBSYSTEM: Anaplerotic reactions</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_co2_c"/> + <speciesReference species="M_h2o_c"/> + <speciesReference species="M_pep_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_h_c"/> + <speciesReference species="M_oaa_c"/> + <speciesReference species="M_pi_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_PPCK" name="phosphoenolpyruvate carboxykinase" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: b3403</p><p>GENE_LIST: b3403</p><p>SUBSYSTEM: Anaplerotic reactions</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_atp_c"/> + <speciesReference species="M_oaa_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_adp_c"/> + <speciesReference species="M_co2_c"/> + <speciesReference species="M_pep_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_PPS" name="phosphoenolpyruvate synthase" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: b1702</p><p>GENE_LIST: b1702</p><p>SUBSYSTEM: Glycolysis/Gluconeogenesis</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_atp_c"/> + <speciesReference species="M_h2o_c"/> + <speciesReference species="M_pyr_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_amp_c"/> + <speciesReference species="M_h_c" stoichiometry="2"/> + <speciesReference species="M_pep_c"/> + <speciesReference species="M_pi_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_PTAr" name="phosphotransacetylase"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: (b2297 or b2458)</p><p>GENE_LIST: b2297 b2458</p><p>SUBSYSTEM: Pyruvate Metabolism</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_accoa_c"/> + <speciesReference species="M_pi_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_actp_c"/> + <speciesReference species="M_coa_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_PYK" name="pyruvate kinase" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: (b1854 or b1676)</p><p>GENE_LIST: b1676 b1854</p><p>SUBSYSTEM: Glycolysis/Gluconeogenesis</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_adp_c"/> + <speciesReference species="M_h_c"/> + <speciesReference species="M_pep_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_atp_c"/> + <speciesReference species="M_pyr_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_PYRt2r" name="pyruvate reversible transport via proton symport"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>SUBSYSTEM: Transport, Extracellular</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_h_e"/> + <speciesReference species="M_pyr_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_h_c"/> + <speciesReference species="M_pyr_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_RPE" name="ribulose 5-phosphate 3-epimerase"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: (b3386 or b4301)</p><p>GENE_LIST: b3386 b4301</p><p>SUBSYSTEM: Pentose Phosphate Pathway</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_ru5p_D_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_xu5p_D_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_RPI" name="ribose-5-phosphate isomerase"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: ( b2914 or b4090 )</p><p>GENE_LIST: b2914 b4090</p><p>SUBSYSTEM: Pentose Phosphate Pathway</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_r5p_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_ru5p_D_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_SUCCt2_2" name="succinate transport via proton symport (2 H)" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: b3528</p><p>GENE_LIST: b3528</p><p>SUBSYSTEM: Transport, Extracellular</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_h_e" stoichiometry="2"/> + <speciesReference species="M_succ_e"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_h_c" stoichiometry="2"/> + <speciesReference species="M_succ_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_SUCCt3" name="succinate transport out via proton antiport" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>SUBSYSTEM: Transport, Extracellular</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_h_e"/> + <speciesReference species="M_succ_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_h_c"/> + <speciesReference species="M_succ_e"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_SUCDi" name="succinate dehydrogenase (irreversible)" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: (b0721 and b0722 and b0723 and b0724)</p><p>GENE_LIST: b0721 b0722 b0723 b0724</p><p>SUBSYSTEM: Oxidative Phosphorylation</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_q8_c"/> + <speciesReference species="M_succ_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_fum_c"/> + <speciesReference species="M_q8h2_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_SUCOAS" name="succinyl-CoA synthetase (ADP-forming)"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: ( b0728 and b0729 )</p><p>GENE_LIST: b0728 b0729</p><p>SUBSYSTEM: Citric Acid Cycle</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_atp_c"/> + <speciesReference species="M_coa_c"/> + <speciesReference species="M_succ_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_adp_c"/> + <speciesReference species="M_pi_c"/> + <speciesReference species="M_succoa_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_TALA" name="transaldolase"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: (b2464 or b0008)</p><p>GENE_LIST: b0008 b2464</p><p>SUBSYSTEM: Pentose Phosphate Pathway</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_g3p_c"/> + <speciesReference species="M_s7p_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_e4p_c"/> + <speciesReference species="M_f6p_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_THD2" name="NAD(P) transhydrogenase" reversible="false"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: ( b1602 and b1603 )</p><p>GENE_LIST: b1602 b1603</p><p>SUBSYSTEM: Oxidative Phosphorylation</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_h_e" stoichiometry="2"/> + <speciesReference species="M_nadh_c"/> + <speciesReference species="M_nadp_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_h_c" stoichiometry="2"/> + <speciesReference species="M_nad_c"/> + <speciesReference species="M_nadph_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="0" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="500" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_TKT1" name="transketolase"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: ( b2935 or b2465 )</p><p>GENE_LIST: b2465 b2935</p><p>SUBSYSTEM: Pentose Phosphate Pathway</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_r5p_c"/> + <speciesReference species="M_xu5p_D_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_g3p_c"/> + <speciesReference species="M_s7p_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_TKT2" name="transketolase"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: ( b2935 or b2465 )</p><p>GENE_LIST: b2465 b2935</p><p>SUBSYSTEM: Pentose Phosphate Pathway</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_e4p_c"/> + <speciesReference species="M_xu5p_D_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_f6p_c"/> + <speciesReference species="M_g3p_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + <reaction id="R_TPI" name="triose-phosphate isomerase"> + <notes> + <html xmlns="http://www.w3.org/1999/xhtml"><p>GENE_ASSOCIATION: b3919</p><p>GENE_LIST: b3919</p><p>SUBSYSTEM: Glycolysis/Gluconeogenesis</p></html> + </notes> + <listOfReactants> + <speciesReference species="M_dhap_c"/> + </listOfReactants> + <listOfProducts> + <speciesReference species="M_g3p_c"/> + </listOfProducts> + <kineticLaw> + <math xmlns="http://www.w3.org/1998/Math/MathML"> + <ci> FLUX_VALUE </ci> + </math> + <listOfParameters> + <parameter id="LOWER_BOUND" value="-1000" units="mmol_per_gDW_per_hr"/> + <parameter id="UPPER_BOUND" value="1000" units="mmol_per_gDW_per_hr"/> + <parameter id="OBJECTIVE_COEFFICIENT" value="0"/> + <parameter id="FLUX_VALUE" value="0" units="mmol_per_gDW_per_hr"/> + </listOfParameters> + </kineticLaw> + </reaction> + </listOfReactions> + </model> +</sbml> diff --git a/man/closeSBMLfile.Rd b/man/closeSBMLfile.Rd new file mode 100644 index 0000000..a2364ad --- /dev/null +++ b/man/closeSBMLfile.Rd @@ -0,0 +1,39 @@ +\name{closeSBMLfile} +\alias{closeSBMLfile} + +\title{ + Close SBML File +} + +\description{ + Close SBML file and free all memory associated with the SBML document pointer. +} + +\usage{ + closeSBMLfile(sbmlf) +} + +\arguments{ + \item{sbmlf}{ + An object of class \code{\linkS4class{sbmlPtr}} as returned by + \code{\link{openSBMLfile}}. + } +} + +\value{ + Returns \code{NULL} invisibly. +} + +\references{ + Bornstein, B. J., Keating, S. M., Jouraku, A., and Hucka M. (2008) + LibSBML: An API Library for SBML. \emph{Bioinformatics} \bold{24}, + 880--881. +} + +\author{Gabriel Gelius-Dietrich} + +\seealso{ + \code{\link{openSBMLfile}}, \code{\linkS4class{sbmlPtr}} +} + +\keyword{ IO } diff --git a/man/delSBMLmodel.Rd b/man/delSBMLmodel.Rd new file mode 100644 index 0000000..b65ff86 --- /dev/null +++ b/man/delSBMLmodel.Rd @@ -0,0 +1,39 @@ +\name{delSBMLmodel} +\alias{delSBMLmodel} + +\title{ + Delete Pointer to SBML Model +} + +\description{ + Delete Pointer to SBML Model +} + +\usage{ + delSBMLmodel(sbmlm) +} + +\arguments{ + \item{sbmlm}{ + An object of class \code{\linkS4class{sbmlPtr}} as returned by + \code{\link{getSBMLmodel}}. This is basically a pointer to a SBML model. + } +} + +\value{ + Returns \code{NULL} invisibly. +} + +\references{ + Bornstein, B. J., Keating, S. M., Jouraku, A., and Hucka M. (2008) + LibSBML: An API Library for SBML. \emph{Bioinformatics} \bold{24}, + 880--881. +} + +\author{Gabriel Gelius-Dietrich} + +\seealso{ + \code{\link{getSBMLmodel}}, \code{\linkS4class{sbmlPtr}} +} + +\keyword{ IO } diff --git a/man/getSBMLCompartList.Rd b/man/getSBMLCompartList.Rd new file mode 100644 index 0000000..37e9cdb --- /dev/null +++ b/man/getSBMLCompartList.Rd @@ -0,0 +1,55 @@ +\name{getSBMLCompartList} +\alias{getSBMLCompartList} + +\title{ + Get Compartment List +} + +\description{ + Retrieve list of compartments included in a SBML model +} + +\usage{ + getSBMLCompartList(sbmlm) +} + +\arguments{ + \item{sbmlm}{ + An object of class \code{\linkS4class{sbmlPtr}} as returned by + \code{\link{getSBMLmodel}}. This is basically a pointer to a SBML model. + } +} + +\value{ + If the SBML model contains a ListOfCompartments section, a \code{list} is + returned: + \item{id}{ + character vector containing the compartment id's. If no id is given for a + particular compartment, the corresponding value is set to \code{"no_id"}. + } + \item{name}{ + character vector containing the reaction names. If + not available, the value is set to the empty string \code{""}. + } + \item{outside}{ + character vector containing the outside argument of the compartments. If + not available, the value is set to the empty string \code{""}. + } + All list elements have the same length. + If the SBML model does not contain a ListOfCompartments section, \code{NULL} + is returned. +} + +\references{ + Bornstein, B. J., Keating, S. M., Jouraku, A., and Hucka M. (2008) + LibSBML: An API Library for SBML. \emph{Bioinformatics} \bold{24}, + 880--881. +} + +\author{Gabriel Gelius-Dietrich} + +\seealso{ + \code{\link{getSBMLmodel}}, \code{\linkS4class{sbmlPtr}} +} + +\keyword{ IO } diff --git a/man/getSBMLReactionsList.Rd b/man/getSBMLReactionsList.Rd new file mode 100644 index 0000000..83dccf5 --- /dev/null +++ b/man/getSBMLReactionsList.Rd @@ -0,0 +1,129 @@ +\name{getSBMLReactionsList} +\alias{getSBMLReactionsList} + +\title{ + Get Reaction List +} + +\description{ + Retrieve list of reactions included in a SBML model +} +\usage{ + getSBMLReactionsList(sbmlm) +} + +\arguments{ + \item{sbmlm}{ + An object of class \code{\linkS4class{sbmlPtr}} as returned by + \code{\link{getSBMLmodel}}. This is basically a pointer to a SBML model. + } +} + +\value{ + If the SBML model contains a ListOfReactions section, a \code{list} is + returned: + \item{id}{ + character vector containing the reaction id's. If no id is given for a + particular reaction, the corresponding value is set to \code{"no_id"}. + } + \item{name}{ + character vector containing the reaction names. If + not available, the value is set to the empty string \code{""}. + } + \item{reversible}{ + logical vector containing the reversible flag of the reactions. If no + reversible flag is given for a particular reaction, the corresponding value + is set to \code{FALSE}. + } + \item{notes}{ + character vector containing the note strings. If no note is given for a + particular reaction, the corresponding value is set to the empty string + \code{""}. + } + \item{annotation}{ + character vector containing the annotation strings. If no annotation is + given for a particular reaction, the corresponding value is set to the empty + string \code{""}. + } + \item{reactants}{ + a list containing the reactions reactants. + \describe{ + \item{id}{ + character vector containing the species reference id's involved as + reactants. If no id is given for a particular species, the corresponding + value is set to \code{"no_id"}. + } + \item{species}{ + character vector containing the species id's involved as reactants. + If no id is given for a particular species, the corresponding value is + set to \code{"no_species"}. + } + \item{stoichiometry}{ + numeric vector containing the stoichiometry of the species. If no value + is given for a particular species, the corresponding value is set to + \code{1}. + } + } + If no reactant is given for a particular reaction, the corresponding value + is set to \code{NULL}. + } + \item{products}{ + a list containing the reactions products. + \describe{ + \item{id}{ + character vector containing the species reference id's involved as + products. If no id is given for a particular species, the corresponding + value is set to \code{"no_id"}. + } + \item{species}{ + character vector containing the species id's involved as products. + If no id is given for a particular species, the corresponding value is + set to \code{"no_species"}. + } + \item{stoichiometry}{ + numeric vector containing the stoichiometry of the species. If no value + is given for a particular species, the corresponding value is set to + \code{1}. + } + } + If no product is given for a particular reaction, the corresponding value + is set to \code{NULL}. + } + \item{kinetic_law}{ + a list containing the reactions parameters. + \describe{ + \item{id}{ + character vector containing the parameter id's. If no id is given for a + particular parameter, the corresponding value is set to \code{"no_id"}. + } + \item{value}{ + numeric vector containing the parameter values. If no value is given + for a particular parameter, the corresponding value is set to \code{0}. + } + \item{units}{ + character vector containing the parameter units. If no unit is given for + a particular parameter, the corresponding value is set to the empty + string \code{""}. + } + } + If no parameter is given for a particular reaction, the corresponding value + is set to \code{NULL}. + } + All list elements have the same length. + If the SBML model does not contain a ListOfReactions section, \code{NULL} + is returned. +} + +\references{ + Bornstein, B. J., Keating, S. M., Jouraku, A., and Hucka M. (2008) + LibSBML: An API Library for SBML. \emph{Bioinformatics} \bold{24}, + 880--881. +} + +\author{Gabriel Gelius-Dietrich} + +\seealso{ + \code{\link{getSBMLmodel}}, \code{\linkS4class{sbmlPtr}} +} + +\keyword{ IO } diff --git a/man/getSBMLSpeciesList.Rd b/man/getSBMLSpeciesList.Rd new file mode 100644 index 0000000..cd76137 --- /dev/null +++ b/man/getSBMLSpeciesList.Rd @@ -0,0 +1,64 @@ +\name{getSBMLSpeciesList} +\alias{getSBMLSpeciesList} + +\title{ + Get Species List +} + +\description{ + Retrieve list of species included in a SBML model +} + +\usage{ + getSBMLSpeciesList(sbmlm) +} + +\arguments{ + \item{sbmlm}{ + An object of class \code{\linkS4class{sbmlPtr}} as returned by + \code{\link{getSBMLmodel}}. This is basically a pointer to a SBML model. + } +} + +\value{ + If the SBML model contains a ListOfSpecies section, a \code{list} is + returned: + \item{id}{ + character vector containing the species id's. If no id is given for a + particular species, the corresponding value is set to \code{"no_id"}. + } + \item{name}{ + character vector containing the species names. If + not available, the value is set to the empty string \code{""}. + } + \item{compartment}{ + character vector containing the species compartments. If + not available, the value is set to the empty string \code{""}. + } + \item{charge}{ + integer vector containing the charge of the species. If no charge is given + for a particular species, the corresponding value is set to \code{0}. + } + \item{boundaryCondition}{ + logical vector containing the boundaryCondition flag of the species. If no + boundaryCondition flag is given for a particular species, the corresponding + value is set to \code{FALSE}. + } + All list elements have the same length. + If the SBML model does not contain a ListOfSpecies section, \code{NULL} + is returned. +} + +\references{ + Bornstein, B. J., Keating, S. M., Jouraku, A., and Hucka M. (2008) + LibSBML: An API Library for SBML. \emph{Bioinformatics} \bold{24}, + 880--881. +} + +\author{Gabriel Gelius-Dietrich} + +\seealso{ + \code{\link{getSBMLmodel}}, \code{\linkS4class{sbmlPtr}} +} + +\keyword{ IO } diff --git a/man/getSBMLerrors.Rd b/man/getSBMLerrors.Rd new file mode 100644 index 0000000..daff21c --- /dev/null +++ b/man/getSBMLerrors.Rd @@ -0,0 +1,70 @@ +\name{getSBMLerrors} +\alias{getSBMLerrors} + +\title{ + Get SBML Errors +} + +\description{ + Retrieve list of errors in a SBML file. +} + +\usage{ + getSBMLerrors(sbmlf) +} + +\arguments{ + \item{sbmlf}{ + An object of class \code{\linkS4class{sbmlPtr}} as returned by + \code{\link{openSBMLfile}}. This is basically a pointer to a SBML document. + } +} + +\value{ + If the SBML document contains errors, a \code{list} is returned: + \item{infos}{ + a list of infos. + } + \item{warnings}{ + a list of warnings. + } + \item{errors}{ + a list of errors. + } + \item{fatals}{ + a list of fatals. + } + Each elements of the lists above, is again a list: + \describe{ + \item{id}{ + A single integer value containing the error id. + } + \item{line}{ + A single integer value containing the row number of the SBML file + producing the error. + } + \item{column}{ + A single integer value containing the column number of the SBML file + producing the error. + } + \item{message}{ + A single character string containing the error message. + } + } + If the SBML document does not contain errors, \code{TRUE} is returned. +} + +\references{ + Bornstein, B. J., Keating, S. M., Jouraku, A., and Hucka M. (2008) + LibSBML: An API Library for SBML. \emph{Bioinformatics} \bold{24}, + 880--881. +} + +\author{Gabriel Gelius-Dietrich} + +\seealso{ + \code{\link{openSBMLfile}}, \code{\link{validateSBMLdocument}}, + \code{\linkS4class{sbmlPtr}} +} + +\keyword{ IO } diff --git a/man/getSBMLlevel.Rd b/man/getSBMLlevel.Rd new file mode 100644 index 0000000..c9d212c --- /dev/null +++ b/man/getSBMLlevel.Rd @@ -0,0 +1,37 @@ +\name{getSBMLlevel} +\alias{getSBMLlevel} + +\title{ + Get SBML Level +} +\description{ + Retrieve SBML level of SBML file. +} +\usage{ + getSBMLlevel(sbmlf) +} + +\arguments{ + \item{sbmlf}{ + An object of class \code{\linkS4class{sbmlPtr}} as returned by + \code{\link{openSBMLfile}}. This is basically a pointer to a SBML document. + } +} + +\value{ + A single integer value containing the SBML level of the SBML file. +} + +\references{ + Bornstein, B. J., Keating, S. M., Jouraku, A., and Hucka M. (2008) + LibSBML: An API Library for SBML. \emph{Bioinformatics} \bold{24}, + 880--881. +} + +\author{Gabriel Gelius-Dietrich} + +\seealso{ + \code{\link{openSBMLfile}}, \code{\linkS4class{sbmlPtr}} +} + +\keyword{ IO } diff --git a/man/getSBMLmodId.Rd b/man/getSBMLmodId.Rd new file mode 100644 index 0000000..f6dd225 --- /dev/null +++ b/man/getSBMLmodId.Rd @@ -0,0 +1,39 @@ +\name{getSBMLmodId} +\alias{getSBMLmodId} + +\title{ + Get Model Id +} + +\description{ + Retrieve model id of a SBML model +} + +\usage{ + getSBMLmodId(sbmlm) +} + +\arguments{ + \item{sbmlm}{ + An object of class \code{\linkS4class{sbmlPtr}} as returned by + \code{\link{getSBMLmodel}}. This is basically a pointer to a SBML model. + } +} + +\value{ + A single character string containing the model id of the SBML model. +} + +\references{ + Bornstein, B. J., Keating, S. M., Jouraku, A., and Hucka M. (2008) + LibSBML: An API Library for SBML. \emph{Bioinformatics} \bold{24}, + 880--881. +} + +\author{Gabriel Gelius-Dietrich} + +\seealso{ + \code{\link{getSBMLmodel}}, \code{\linkS4class{sbmlPtr}} +} + +\keyword{ IO } diff --git a/man/getSBMLmodName.Rd b/man/getSBMLmodName.Rd new file mode 100644 index 0000000..8065871 --- /dev/null +++ b/man/getSBMLmodName.Rd @@ -0,0 +1,39 @@ +\name{getSBMLmodName} +\alias{getSBMLmodName} + +\title{ + Get Model Name +} + +\description{ + Retrieve model name of a SBML model +} + +\usage{ + getSBMLmodName(sbmlm) +} + +\arguments{ + \item{sbmlm}{ + An object of class \code{\linkS4class{sbmlPtr}} as returned by + \code{\link{getSBMLmodel}}. This is basically a pointer to a SBML model. + } +} + +\value{ + A single character string containing the model name of the SBML model. +} + +\references{ + Bornstein, B. J., Keating, S. M., Jouraku, A., and Hucka M. (2008) + LibSBML: An API Library for SBML. \emph{Bioinformatics} \bold{24}, + 880--881. +} + +\author{Gabriel Gelius-Dietrich} + +\seealso{ + \code{\link{getSBMLmodel}}, \code{\linkS4class{sbmlPtr}} +} + +\keyword{ IO } diff --git a/man/getSBMLmodel.Rd b/man/getSBMLmodel.Rd new file mode 100644 index 0000000..b623a7c --- /dev/null +++ b/man/getSBMLmodel.Rd @@ -0,0 +1,40 @@ +\name{getSBMLmodel} +\alias{getSBMLmodel} + +\title{ + Get SBML Model +} +\description{ + Retrieve a pointer to a SBML model. +} +\usage{ + getSBMLmodel(sbmlf, ptrtype = "sbml_mod") +} + +\arguments{ + \item{sbmlf}{ + An object of class \code{\linkS4class{sbmlPtr}} as returned by + \code{\link{openSBMLfile}}. + } + \item{ptrtype}{ + A single character string containing the pointer type. + } +} + +\value{ + A object of class \code{\linkS4class{sbmlPtr}}. +} + +\references{ + Bornstein, B. J., Keating, S. M., Jouraku, A., and Hucka M. (2008) + LibSBML: An API Library for SBML. \emph{Bioinformatics} \bold{24}, + 880--881. +} + +\author{Gabriel Gelius-Dietrich} + +\seealso{ + \code{\link{openSBMLfile}}, \code{\linkS4class{sbmlPtr}} +} + +\keyword{ IO } diff --git a/man/getSBMLnumCompart.Rd b/man/getSBMLnumCompart.Rd new file mode 100644 index 0000000..931438b --- /dev/null +++ b/man/getSBMLnumCompart.Rd @@ -0,0 +1,39 @@ +\name{getSBMLnumCompart} +\alias{getSBMLnumCompart} + +\title{ + Get Number of Compartments +} + +\description{ + Retrieve number of compartments of a SBML model. +} + +\usage{ + getSBMLnumCompart(sbmlm) +} + +\arguments{ + \item{sbmlm}{ + An object of class \code{\linkS4class{sbmlPtr}} as returned by + \code{\link{getSBMLmodel}}. This is basically a pointer to a SBML model. + } +} + +\value{ + A single integer value containing the number of compartments of a SBML model. +} + +\references{ + Bornstein, B. J., Keating, S. M., Jouraku, A., and Hucka M. (2008) + LibSBML: An API Library for SBML. \emph{Bioinformatics} \bold{24}, + 880--881. +} + +\author{Gabriel Gelius-Dietrich} + +\seealso{ + \code{\link{getSBMLmodel}}, \code{\linkS4class{sbmlPtr}} +} + +\keyword{ IO } diff --git a/man/getSBMLnumReactions.Rd b/man/getSBMLnumReactions.Rd new file mode 100644 index 0000000..9dfd5a5 --- /dev/null +++ b/man/getSBMLnumReactions.Rd @@ -0,0 +1,39 @@ +\name{getSBMLnumReactions} +\alias{getSBMLnumReactions} + +\title{ + Get Number of Reactions +} + +\description{ + Retrieve number of reactions of a SBML model. +} + +\usage{ + getSBMLnumReactions(sbmlm) +} + +\arguments{ + \item{sbmlm}{ + An object of class \code{\linkS4class{sbmlPtr}} as returned by + \code{\link{getSBMLmodel}}. This is basically a pointer to a SBML model. + } +} + +\value{ + A single integer value containing the number of reactions of a SBML model. +} + +\references{ + Bornstein, B. J., Keating, S. M., Jouraku, A., and Hucka M. (2008) + LibSBML: An API Library for SBML. \emph{Bioinformatics} \bold{24}, + 880--881. +} + +\author{Gabriel Gelius-Dietrich} + +\seealso{ + \code{\link{getSBMLmodel}}, \code{\linkS4class{sbmlPtr}} +} + +\keyword{ IO } diff --git a/man/getSBMLnumSpecies.Rd b/man/getSBMLnumSpecies.Rd new file mode 100644 index 0000000..f46cb26 --- /dev/null +++ b/man/getSBMLnumSpecies.Rd @@ -0,0 +1,39 @@ +\name{getSBMLnumSpecies} +\alias{getSBMLnumSpecies} + +\title{ + Get Number of Species +} + +\description{ + Retrieve number of species of a SBML model. +} + +\usage{ + getSBMLnumSpecies(sbmlm) +} + +\arguments{ + \item{sbmlm}{ + An object of class \code{\linkS4class{sbmlPtr}} as returned by + \code{\link{getSBMLmodel}}. This is basically a pointer to a SBML model. + } +} + +\value{ + A single integer value containing the number of species of a SBML model. +} + +\references{ + Bornstein, B. J., Keating, S. M., Jouraku, A., and Hucka M. (2008) + LibSBML: An API Library for SBML. \emph{Bioinformatics} \bold{24}, + 880--881. +} + +\author{Gabriel Gelius-Dietrich} + +\seealso{ + \code{\link{getSBMLmodel}}, \code{\linkS4class{sbmlPtr}} +} + +\keyword{ IO } diff --git a/man/getSBMLunitDefinitionsList.Rd b/man/getSBMLunitDefinitionsList.Rd new file mode 100644 index 0000000..285426a --- /dev/null +++ b/man/getSBMLunitDefinitionsList.Rd @@ -0,0 +1,70 @@ +\name{getSBMLunitDefinitionsList} +\alias{getSBMLunitDefinitionsList} + +\title{ + Get Unit Definitions List +} +\description{ + Retrieve list of unit definitions included in a SBML model +} +\usage{ + getSBMLunitDefinitionsList(sbmlm) +} + +\arguments{ + \item{sbmlm}{ + An object of class \code{\linkS4class{sbmlPtr}} as returned by + \code{\link{getSBMLmodel}}. This is basically a pointer to a SBML model. + } +} + +\value{ + If the SBML model contains a listOfUnitDefinitions section, a \code{list} is + returned: + \item{definition_id}{ + character vector containing the unit definition id's. If no id is given for + a particular unit definition, the corresponding value is set to + \code{"no_id"}. + } + \item{definition}{ + a list containing the units. + \describe{ + \item{kind}{ + character vector containing the unit kind's involved as + unit definitions. If no kind is given for a particular unit, the + corresponding value is set to \code{"no_kind"}. + } + \item{scale}{ + integer vector containing the scale. If no scale is given for a + particular unit, the corresponding value is set to \code{0}. + } + \item{exponent}{ + integer vector containing the exponent. If no exponent is given for a + particular unit, the corresponding value is set to \code{1}. + } + \item{multiplier}{ + numeric vector containing the multiplier. If no multiplier is given for + a particular species, the corresponding value is set to \code{1}. + } + } + If no unit is given for a particular unit definition, the corresponding + value is set to \code{NULL}. + } + All list elements have the same length. + If the SBML model does not contain a listOfUnitDefinitions section, \code{NULL} + is returned. +} + +\references{ + Bornstein, B. J., Keating, S. M., Jouraku, A., and Hucka M. (2008) + LibSBML: An API Library for SBML. \emph{Bioinformatics} \bold{24}, + 880--881. +} + +\author{Gabriel Gelius-Dietrich} + +\seealso{ + \code{\link{getSBMLmodel}}, \code{\linkS4class{sbmlPtr}} +} + +\keyword{ IO } diff --git a/man/getSBMLversion.Rd b/man/getSBMLversion.Rd new file mode 100644 index 0000000..13c7467 --- /dev/null +++ b/man/getSBMLversion.Rd @@ -0,0 +1,39 @@ +\name{getSBMLversion} +\alias{getSBMLversion} + +\title{ + Get SBML Version +} + +\description{ + Retrieve SBML version of SBML file. +} + +\usage{ + getSBMLversion(sbmlf) +} + +\arguments{ + \item{sbmlf}{ + An object of class \code{\linkS4class{sbmlPtr}} as returned by + \code{\link{openSBMLfile}}. This is basically a pointer to a SBML document. + } +} + +\value{ + A single integer value containing the SBML version of the SBML file. +} + +\references{ + Bornstein, B. J., Keating, S. M., Jouraku, A., and Hucka M. (2008) + LibSBML: An API Library for SBML. \emph{Bioinformatics} \bold{24}, + 880--881. +} + +\author{Gabriel Gelius-Dietrich} + +\seealso{ + \code{\link{openSBMLfile}}, \code{\linkS4class{sbmlPtr}} +} + +\keyword{ IO } diff --git a/man/openSBMLfile.Rd b/man/openSBMLfile.Rd new file mode 100644 index 0000000..194554f --- /dev/null +++ b/man/openSBMLfile.Rd @@ -0,0 +1,41 @@ +\name{openSBMLfile} +\alias{openSBMLfile} + +\title{ + Open SBML File +} + +\description{ + Retrieve a pointer to a SBML document. +} + +\usage{ + openSBMLfile(fname, ptrtype = "sbml_doc") +} + +\arguments{ + \item{fname}{ + A single character string containing a file name of an SBML file. + } + \item{ptrtype}{ + A single character string containing the pointer type. + } +} + +\value{ + A object of class \code{\linkS4class{sbmlPtr}}. +} + +\references{ + Bornstein, B. J., Keating, S. M., Jouraku, A., and Hucka M. (2008) + LibSBML: An API Library for SBML. \emph{Bioinformatics} \bold{24}, + 880--881. +} + +\author{Gabriel Gelius-Dietrich} + +\seealso{ + \code{\link{closeSBMLfile}}, \code{\linkS4class{sbmlPtr}} +} + +\keyword{ IO } diff --git a/man/readSBMLmod.Rd b/man/readSBMLmod.Rd new file mode 100644 index 0000000..209d9f4 --- /dev/null +++ b/man/readSBMLmod.Rd @@ -0,0 +1,214 @@ +\name{readSBMLmod} +\alias{readSBMLmod} + +\encoding{utf8} + +\title{Reads a Metabolic Network in SBML Format} + +\description{ + The function reads a metabolic network in SBML format. The function + returns an S4 object of the class \code{\link{modelorg}} +} + +\usage{ + readSBMLmod(filename, description, + def_bnd = SYBIL_SETTINGS("MAXIMUM"), + validateSBML = FALSE, + extMetFlag = "b", + bndCond = TRUE, + ignoreNoAn = FALSE, + mergeMet = TRUE, + balanceReact = TRUE, + remUnusedMetReact = TRUE, + singletonMet = FALSE, + deadEndMet = FALSE, + remMet = FALSE, + constrMet = FALSE, + tol = SYBIL_SETTINGS("TOLERANCE")) +} + +\arguments{ + \item{filename}{ + SBML file containing the model + } + \item{description}{ + Character vector containing a description of the model.\cr + Default: \code{filename}. + } + \item{def_bnd}{ + Single numeric value. Absolute value for upper and lower bounds for + reaction contraints -- if they are missing in the SBML file.\cr + Default: \code{MAXIMUM(SYBIL_SETTINGS)}. + } + \item{validateSBML}{ + Boolean: validate the xml file.\cr + Default: \code{TRUE}. + } + \item{extMetFlag}{ + A single character string how external metabolites were identified. If the + metabolite id ends in \code{"_extMetFlag"}, the corresponding metabolite is + considered to be external and will be removed if \code{bndCond} is set to + \code{FALSE}.\cr + Default: \code{"b"}. + } + \item{bndCond}{ + Boolean: use the value of SBML tag \code{boundaryCondition} in order to + identify external metabolites.\cr + Default: \code{TRUE}. + } + \item{ignoreNoAn}{ + Boolean: if set to \code{TRUE}, any notes and annotation fields in the + listOfReactions in an SBML file are ignored.\cr + Default: \code{FALSE}. + } + \item{mergeMet}{ + Boolean: if set to \code{TRUE}, metabolites used more than once as reactant + or product in a particular reaction are added up, see details below. If set + to \code{FALSE}, the last value is used without warning.\cr + Default: \code{TRUE}. + } + \item{balanceReact}{ + Boolean: if set to \code{TRUE}, metabolites used as reactant and product in + a particular reaction at the same time are balanced, see details below. If + set to \code{FALSE} the last value is used without warning (reactants before + products).\cr + Default: \code{TRUE}. + } + \item{remUnusedMetReact}{ + Boolean: if set to TRUE, metabolites and reactions which are not used in the + stoichiometric matrix will be removed. A metabolite or a reaction is + considered as unused, if the corresponding element of \code{rowSums} + (metabolites) or \code{colSums} (reactions) of the binary version of the + stoichiometric matrix is zero, see details below. If set to \code{FALSE}, + only a warning is given.\cr + Default: \code{FALSE}. + } + \item{singletonMet}{ + Boolean: if set to TRUE, metabolites appearing only once in the + stoichiometric matrix are identified. Metabolites appear only + once, if \code{\link{rowSums}} of the binary stoichiometric matrix is one in + the corresponding row, see details below.\cr + Default: \code{FALSE}. + } + \item{deadEndMet}{ + Boolean: if set to TRUE, metabolites which are produced but not consumed, or + vice versa are identified, see details below. If both arguments + \code{singletonMet} and \code{deadEndMet} are set to \code{TRUE}, the + function will first look for singleton metabolites, and exclude them (and + the corresponding reactions) from the search list. Afterwards, dead end + metabolites are searched only in the smaller model.\cr + Default: \code{FALSE}. + } + \item{remMet}{ + Boolean: if set to TRUE, metabolites identified as singleton or dead end + metabolites will be removed from the model. Additionally, reactions + containing such metabolites will be removed also.\cr + Default: \code{FALSE}. + } + \item{constrMet}{ + Boolean: if set to TRUE, reactions containing metabolites identified as + singleton or dead end metabolites will be constrained to zero.\cr + Default: \code{FALSE}. + } + \item{tol}{ + A single numeric value, giving the smallest positive floating point number + unequal to zero, see details below.\cr + Default: \code{TOLERANCE(SYBIL_SETTINGS)}. + } +} + +\details{ + The library \code{libSBML} is used to read an SBML file and to collect + the information in an object of the class \code{\link[sybil]{modelorg}}. + + If a metabolite is used more than once as product or + reactant of a particular reaction, it is merged: + \code{a + (2) a} is converted to \code{(3) a} + and a warning will be given. + + If a metabolite is used first as reactant and then as + product of a particular reaction, the reaction is + balanced: + \code{(2) b + a -> b + c} + is converted to + \code{ b + a -> c} + + A binary version of the stoichiometric matrix \eqn{S} is constructed + via \eqn{\left|S\right| > tol}{abs(S) > tol}. + + A binary version of the stoichiometric matrix \eqn{S} is scanned for reactions + and metabolites which are not used in S. If there are some, a warning will be + given and the corresponding reactions and metabolites will be removed from + the model if \code{remUnusedMetReact} is set to \code{TRUE}. + + The binary version of the stoichiometric matrix \eqn{S} is scanned for + metabolites, which are used only once in S. If there are some, at least a + warning will be given. If either \code{constrMet} or \code{remMet} is set to + \code{TRUE}, the binary version of \eqn{S} is scanned for paths of singleton + metabolites. If \code{constrMet} is set to \code{TRUE}, reactions containing + those metabolites will be constrained to zero; if \code{remMet} is set to + \code{TRUE}, the metabolites and the reactions containing those metabolites + will be removed from the network. + + In order to find path of singleton metabolites a binary version of the + stoichiometric matrix \eqn{S} is used. Sums of rows gives the vector of + metabolite usage, each element is the number of reactions a metabolite + participates. A single metabolite (singleton) is a metabolite with a row sum + of zero. All columns in \eqn{S} (reactions) containing singleton metabolites + will be set to zero. And again, singleton metabolites will be searched until + none are found. + + The algorithm to find dead end metabolites works in a quite similar way, but + not in the binary version of the stoichiometric matrix. Here, metabolite + \code{i} is considered as dead end, if it is for example produced by reaction + \code{j} but not used by any other reaction \code{k}. +} + +\value{ + An S4 object of the class \code{\link[sybil]{modelorg}}. +} + +\references{ + The BiGG database \url{http://bigg.ucsd.edu/}. + + Bornstein, B. J., Keating, S. M., Jouraku, A., and Hucka M. (2008) + LibSBML: An API Library for SBML. \emph{Bioinformatics} \bold{24}, + 880--881. + + Schellenberger, J., Park, J. O., Conrad, T. C., and Palsson, B. Ø., (2010) + BiGG: a Biochemical Genetic and Genomic knowledgebase of large scale metabolic + reconstructions. \emph{BMC Bioinformatics} \bold{11}, 213. + + Becker, S. A., Feist, A. M., Mo, M. L., Hannum, G., Palsson, B. Ø. and + Herrgard, M. J. (2007) Quantitative prediction of cellular metabolism with + constraint-based models: the COBRA Toolbox. \emph{Nat Protoc} \bold{2}, + 727--738. + + Schellenberger, J., Que, R., Fleming, R. M. T., Thiele, I., Orth, J. D., + Feist, A. M., Zielinski, D. C., Bordbar, A., Lewis, N. E., Rahmanian, S., + Kang, J., Hyduke, D. R. and Palsson, B. Ø. (2011) Quantitative prediction of + cellular metabolism with constraint-based models: the COBRA Toolbox v2.0. + \emph{Nat Protoc} \bold{6}, 1290--1307. +} + +\author{ + Gabriel Gelius-Dietrich +} + +\note{ + The function \code{readSBMLmod} makes use of the library + \code{libSBML} (\url{http://www.sbml.org}). +} + +\seealso{ + \code{\link{validateSBMLdocument}} +} + +\examples{ + dir <- system.file(package = "sybilSBML", "extdata") + file <- file.path(dir, "ecoli_core_model.xml") + mod <- readSBMLmod(file, bndCond = FALSE) +} + +\keyword{ IO } + diff --git a/man/sbmlError-class.Rd b/man/sbmlError-class.Rd new file mode 100644 index 0000000..1406da7 --- /dev/null +++ b/man/sbmlError-class.Rd @@ -0,0 +1,122 @@ +\name{sbmlError-class} + +\Rdversion{1.1} +\docType{class} + +\alias{sbmlError-class} +\alias{sbmlError} + +\alias{getNumErrors,sbmlError-method} +\alias{length,sbmlError-method} +\alias{printSlot,sbmlError,character-method} +\alias{sbmlDocKey,sbmlError-method} +\alias{sbmlErrors,sbmlError-method} +\alias{sbmlFatals,sbmlError-method} +\alias{sbmlFileName,sbmlError-method} +\alias{sbmlInfos,sbmlError-method} +\alias{sbmlWarnings,sbmlError-method} +\alias{getNumErrors} +\alias{printSlot} +\alias{sbmlErrors} +\alias{sbmlFatals} +\alias{sbmlInfos} +\alias{sbmlWarnings} + +\title{Class \code{"sbmlError"}} + +\description{ + Class to administrate Infos, Warnings, Errors and Fatals returned after + validation of an SBML file. +} + +\section{Objects from the Class}{ + Objects can be created by calls of the form + + \code{err <- sbmlError(err, sbmlf)}. + \describe{ + \item{\code{err}:}{ + an object of class \code{sbml_error} containing a list of SBML errors. + } + \item{\code{sbmlf}:}{ + an object of class \code{\linkS4class{sbmlPtr}} containing a pointer to + an SBML document object. + } + } + This constructor function is only used internally, objects of class + \code{sbmlError} are returned by the functions + \code{\link{validateSBMLdocument}} and \code{\link{getSBMLerrors}}. +} + +\section{Slots}{ + \describe{ + \item{\code{sbmlInfos}:}{ + Object of class \code{"list"} containing all Infos. + } + \item{\code{sbmlWarnings}:}{ + Object of class \code{"list"} containing all Warnings. + } + \item{\code{sbmlErrors}:}{ + Object of class \code{"list"} containing all Errors. + } + \item{\code{sbmlFatals}:}{ + Object of class \code{"list"} containing all Fatals. + } + \item{\code{sbmlFileName}:}{ + Object of class \code{"character"} containing the file name of the SBML + file generating the errors. + } + \item{\code{sbmlDocKey}:}{ + Object of class \code{"character"} containing a single character string + functioning as a unique key to a SBML document object. + } + } +} + +\section{Methods}{ + \describe{ + \item{getNumErrors}{\code{signature(object = "sbmlError")}: + returns a vector of length 5 containing the number of Infos, Warnings, + Errors, Fatals and the total number of entries. + } + \item{length}{\code{signature(x = "sbmlError")}: + returns the total number of entries. + } + \item{printSlot}{\code{signature(object = "sbmlError", ws = "character")}: + prints the slot given in argument \code{ws}. It can be \code{"Infos"}, + \code{"Warnings"}, \code{"Errors"} or \code{"Fatals"}. + } + \item{sbmlDocKey}{\code{signature(object = "sbmlError")}: + gets the \code{sbmlDocKey} slot. + } + \item{sbmlErrors}{\code{signature(object = "sbmlError")}: + gets the \code{sbmlErrors} slot. + } + \item{sbmlFatals}{\code{signature(object = "sbmlError")}: + gets the \code{sbmlFatals} slot. + } + \item{sbmlFileName}{\code{signature(object = "sbmlError")}: + gets the \code{sbmlFileName} slot. + } + \item{sbmlInfos}{\code{signature(object = "sbmlError")}: + gets the \code{sbmlInfos} slot. + } + \item{sbmlWarnings}{\code{signature(object = "sbmlError")}: + gets the \code{sbmlWarnings} slot. + } + } +} + +\author{Gabriel Gelius-Dietrich} + +\seealso{ + \code{\link{validateSBMLdocument}}, \code{\link{getSBMLerrors}} +} + +\examples{ + showClass("sbmlError") +} + +\keyword{classes} + + + diff --git a/man/sbmlPtr-class.Rd b/man/sbmlPtr-class.Rd new file mode 100644 index 0000000..bc8c2c4 --- /dev/null +++ b/man/sbmlPtr-class.Rd @@ -0,0 +1,117 @@ +\name{sbmlPtr-class} + +\Rdversion{1.1} +\docType{class} + +\alias{sbmlPtr-class} + +\alias{isNULLpointerSBML,sbmlPtr-method} +\alias{isSBMLdocpointer,sbmlPtr-method} +\alias{isSBMLmodpointer,sbmlPtr-method} +\alias{sbmlDocKey,sbmlPtr-method} +\alias{sbmlFileName,sbmlPtr-method} +\alias{sbmlPointer,sbmlPtr-method} +\alias{sbmlPtrType,sbmlPtr-method} +\alias{isNULLpointerSBML} +\alias{isSBMLdocpointer} +\alias{isSBMLmodpointer} +\alias{sbmlDocKey} +\alias{sbmlFileName} +\alias{sbmlPointer} +\alias{sbmlPtrType} +\alias{sbmlDocPointer} +\alias{sbmlModPointer} + +\title{Class \code{"sbmlPtr"}} + +\description{ + Containing SBML pointer objects. +} + +\section{Objects from the Class}{ + Objects can be created by calls of the form + + \code{doc <- sbmlDocPointer(pointer)}. + \describe{ + \item{\code{pointer}:}{ + an object of class \code{sbml_doc_ptr} containing a pointer to a SBML + document. + } + } + \code{doc <- sbmlModPointer(pointer, sbmlDoc)}. + \describe{ + \item{\code{pointer}:}{ + an object of class \code{sbml_mod_ptr} containing a pointer to a SBML + model. + } + \item{\code{sbmlDoc}:}{ + an object of class \code{sbmlPtr} containing a pointer to a SBML + document (returned by \code{sbmlDocPointer}). + } + } + + This constructor functions are only used internally, objects of class + \code{sbmlPtr} are returned by the functions \code{\link{openSBMLfile}} + and \code{\link{getSBMLmodel}}. +} + +\section{Slots}{ + \describe{ + \item{\code{sbmlPtrType}:}{Object of class \code{"character"} + containing the type of the pointer. + } + \item{\code{sbmlPointer}:}{Object of class \code{"externalptr"} + containing a pointer to a SBML document or model. + } + \item{\code{sbmlFileName}:}{ + Object of class \code{"character"} containing the file name of the SBML + file generating the errors. + } + \item{\code{sbmlDocKey}:}{ + Object of class \code{"character"} containing a single character string + functioning as a unique key to a SBML document object. + } + } +} + +\section{Methods}{ + \describe{ + \item{isNULLpointerSBML}{\code{signature(object = "sbmlPtr")}: + returns \code{TRUE} if \code{sbmlPointer(object)} is a NULL pointer, + otherwise \code{FALSE}. + } + \item{isSBMLdocpointer}{\code{signature(object = "sbmlPtr")}: + returns \code{TRUE} if \code{sbmlPointer(object)} is a pointer to a + SBML document, otherwise \code{FALSE}. + } + \item{isSBMLmodpointer}{\code{signature(object = "sbmlPtr")}: + returns \code{TRUE} if \code{sbmlPointer(object)} is a pointer to a + SBML model, otherwise \code{FALSE}. + } + \item{sbmlDocKey}{\code{signature(object = "sbmlPtr")}: + gets the \code{sbmlDocKey} slot. + } + \item{sbmlFileName}{\code{signature(object = "sbmlPtr")}: + gets the \code{sbmlFileName} slot. + } + \item{sbmlPointer}{\code{signature(object = "sbmlPtr")}: + gets the \code{sbmlPointer} slot. + } + \item{sbmlPtrType}{\code{signature(object = "sbmlPtr")}: + gets the \code{sbmlPtrType} slot. + } + } +} + +\author{Gabriel Gelius-Dietrich} + +\seealso{ + \code{\link{openSBMLfile}}, \code{\link{getSBMLmodel}} +} + +\examples{ + showClass("sbmlError") +} + +\keyword{classes} + diff --git a/man/validateSBMLdocument.Rd b/man/validateSBMLdocument.Rd new file mode 100644 index 0000000..e447583 --- /dev/null +++ b/man/validateSBMLdocument.Rd @@ -0,0 +1,65 @@ +\name{validateSBMLdocument} +\alias{validateSBMLdocument} + +\title{ + Validate SBML +} + +\description{ + Validate files written in SBML. +} + +\usage{ + validateSBMLdocument(sbmlf) +} + +\arguments{ + \item{sbmlf}{ + A single character string containing a filename of an SBML file, + or an object of class \code{\linkS4class{sbmlPtr}} as returned by + \code{\link{openSBMLfile}}. + } +} + +\details{ + The given SBML file is validated by the libSBML function + \code{checkConsistency}. Errors are retrieved by the libSBML function + \code{getError} and returned as list. +} + +\value{ + If argument \code{sbmlf} is an object of class \code{character},the + function returns \code{TRUE}, if no infos, warnings, errors or fatals + have been found. Otherwise a the value returned is a list. + \item{infos }{Infos} + \item{warnings }{Warnings} + \item{errors }{Errors} + \item{fatals }{Fatals} + Each entry of one of these lists is again a list containing the message id, + line and column number of the SBML file generating the message and the + corresponding message text. + + If argument \code{sbmlf} is an object of class \code{\linkS4class{sbmlPtr}}, + the function returns the number of errors found in the SBML document. +} + +\references{ + Bornstein, B. J., Keating, S. M., Jouraku, A., and Hucka M. (2008) + LibSBML: An API Library for SBML. \emph{Bioinformatics} \bold{24}, + 880--881. +} + +\author{Gabriel Gelius-Dietrich} + +\seealso{ + \code{\link{readSBMLmod}}, \code{\link{openSBMLfile}}, + \code{\link{getSBMLerrors}}, \code{\linkS4class{sbmlPtr}} +} + +\examples{ + dir <- system.file(package = "sybilSBML", "extdata") + file <- file.path(dir, "ecoli_core_model.xml") + err <- validateSBMLdocument(file) +} + +\keyword{ IO } diff --git a/man/versionLibSBML.Rd b/man/versionLibSBML.Rd new file mode 100644 index 0000000..2b7b7c3 --- /dev/null +++ b/man/versionLibSBML.Rd @@ -0,0 +1,29 @@ +\name{versionLibSBML} +\alias{versionLibSBML} + +\title{ + Get libSBML Version +} + +\description{ + Retrieve libSBML version number. +} + +\usage{ + versionLibSBML() +} + +\value{ + A single character string containing the dotted version of the + libSBML version number. +} + +\references{ + Bornstein, B. J., Keating, S. M., Jouraku, A., and Hucka M. (2008) + LibSBML: An API Library for SBML. \emph{Bioinformatics} \bold{24}, + 880--881. +} + +\author{Gabriel Gelius-Dietrich} + +\keyword{ IO } diff --git a/src/Makevars.in b/src/Makevars.in new file mode 100644 index 0000000..f03b4d3 --- /dev/null +++ b/src/Makevars.in @@ -0,0 +1,3 @@ +PKG_CFLAGS=@PKG_CFLAGS@ +PKG_CPPFLAGS=@PKG_CPPFLAGS@ +PKG_LIBS=@PKG_LIBS@ diff --git a/src/Makevars.win b/src/Makevars.win new file mode 100644 index 0000000..f76c27e --- /dev/null +++ b/src/Makevars.win @@ -0,0 +1,7 @@ +PKG_CPPFLAGS= -D_R_=1 -DUSE_R=1 -I"$(LIB_SBML)/include" + +PKG_LIBS = -L"$(LIB_SBML)/bin" -lsbml + +all: $(SHLIB) + mkdir -p "$(R_PACKAGE_DIR)/libs$(R_ARCH)" + cp "$(LIB_SBML)/bin/libsbml.dll" "$(R_PACKAGE_DIR)\libs$(R_ARCH)" diff --git a/src/init.c b/src/init.c new file mode 100644 index 0000000..59a802a --- /dev/null +++ b/src/init.c @@ -0,0 +1,66 @@ +/* init.c + Link to libSBML for sybil. + + Copyright (C) 2010-2013 Gabriel Gelius-Dietrich, Dpt. for Bioinformatics, + Institute for Informatics, Heinrich-Heine-University, Duesseldorf, Germany. + All right reserved. + Email: geliudie@uni-duesseldorf.de + + This file is part of sybilSBML. + + SybilSBML is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + SybilSBML is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with sybilSBML. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include <R.h> +#include <Rinternals.h> + +#include "sybilSBML.h" + +#include <R_ext/Rdynload.h> + +static const R_CallMethodDef callMethods[] = { + {"isSBMLdocptr", (DL_FUNC) &isSBMLdocptr, 1}, + {"isSBMLmodptr", (DL_FUNC) &isSBMLmodptr, 1}, + {"isNULLptr", (DL_FUNC) &isNULLptr, 1}, + {"getLibSBMLversion", (DL_FUNC) &getLibSBMLversion, 0}, + {"initSBML", (DL_FUNC) &initSBML, 0}, + {"delDocument", (DL_FUNC) &delDocument, 1}, + {"delModel", (DL_FUNC) &delModel, 1}, + {"readSBMLfile", (DL_FUNC) &readSBMLfile, 2}, + {"getSBMLlevel", (DL_FUNC) &getSBMLlevel, 1}, + {"getSBMLversion", (DL_FUNC) &getSBMLversion, 1}, + {"validateDocument", (DL_FUNC) &validateDocument, 1}, + {"getSBMLerrors", (DL_FUNC) &getSBMLerrors, 1}, + {"getSBMLmodel", (DL_FUNC) &getSBMLmodel, 2}, + {"getSBMLmodId", (DL_FUNC) &getSBMLmodId, 1}, + {"getSBMLmodName", (DL_FUNC) &getSBMLmodName, 1}, + {"getSBMLnumCompart", (DL_FUNC) &getSBMLnumCompart, 1}, + {"getSBMLnumSpecies", (DL_FUNC) &getSBMLnumSpecies, 1}, + {"getSBMLnumReactions", (DL_FUNC) &getSBMLnumReactions, 1}, + {"getSBMLunitDefinitionsList", (DL_FUNC) &getSBMLunitDefinitionsList, 1}, + {"getSBMLCompartList", (DL_FUNC) &getSBMLCompartList, 1}, + {"getSBMLSpeciesList", (DL_FUNC) &getSBMLSpeciesList, 1}, + {"getSBMLReactionsList", (DL_FUNC) &getSBMLReactionsList, 1}, + {NULL, NULL, 0} +}; + + +/* -------------------------------------------------------------------------- */ + +void R_init_sybilSBML(DllInfo *info) { + R_registerRoutines(info, NULL, callMethods, NULL, NULL); + R_useDynamicSymbols(info, FALSE); +} + + diff --git a/src/sbml.c b/src/sbml.c new file mode 100644 index 0000000..c1bd5d4 --- /dev/null +++ b/src/sbml.c @@ -0,0 +1,131 @@ +/* sbml.c + Link to libSBML for sybil. + + Copyright (C) 2010-2013 Gabriel Gelius-Dietrich, Dpt. for Bioinformatics, + Institute for Informatics, Heinrich-Heine-University, Duesseldorf, Germany. + All right reserved. + Email: geliudie@uni-duesseldorf.de + + This file is part of sybilSBML. + + SybilSBML is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + SybilSBML is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with sybilSBML. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include "sbml.h" + + +/* -------------------------------------------------------------------------- */ +/* some usefull funcitons */ +/* -------------------------------------------------------------------------- */ + +/* make a problem description for R */ +SEXP generateProblemMsg(XMLError_t *sbml_err) { + + SEXP out = R_NilValue; + SEXP listv = R_NilValue; + + PROTECT(out = Rf_allocVector(VECSXP, 4)); + + SET_VECTOR_ELT(out, 0, Rf_ScalarInteger(XMLError_getErrorId(sbml_err))); + SET_VECTOR_ELT(out, 1, Rf_ScalarInteger(XMLError_getLine(sbml_err))); + SET_VECTOR_ELT(out, 2, Rf_ScalarInteger(XMLError_getColumn(sbml_err))); + SET_VECTOR_ELT(out, 3, Rf_mkString(XMLError_getMessage(sbml_err))); + + PROTECT(listv = Rf_allocVector(STRSXP, 4)); + SET_STRING_ELT(listv, 0, Rf_mkChar("id")); + SET_STRING_ELT(listv, 1, Rf_mkChar("line")); + SET_STRING_ELT(listv, 2, Rf_mkChar("column")); + SET_STRING_ELT(listv, 3, Rf_mkChar("message")); + Rf_setAttrib(out, R_NamesSymbol, listv); + + UNPROTECT(2); + + return out; + +} + + +/* get species reference */ +SEXP getSpeciesReference(Reaction_t *react, unsigned int nspec, unsigned int repro) { + + SEXP id = R_NilValue; + SEXP spec = R_NilValue; + SEXP stoich = R_NilValue; + SEXP speclist = R_NilValue; + SEXP speclistn = R_NilValue; + + unsigned int i; + SpeciesReference_t *met; + + if (nspec > 0) { + + PROTECT(id = Rf_allocVector(STRSXP, nspec)); + PROTECT(spec = Rf_allocVector(STRSXP, nspec)); + PROTECT(stoich = Rf_allocVector(REALSXP, nspec)); + + for (i = 0; i < nspec; i++) { + if (0 == repro) { + met = Reaction_getReactant(react, i); + } + else { + met = Reaction_getProduct(react, i); + } + + /* id */ + if (SpeciesReference_isSetId(met)) { + SET_STRING_ELT(id, i, Rf_mkChar(SpeciesReference_getId(met))); + } + else { + SET_STRING_ELT(id, i, Rf_mkChar("no_id")); + } + + /* species reference */ + if (SpeciesReference_isSetSpecies(met)) { + SET_STRING_ELT(spec, i, Rf_mkChar(SpeciesReference_getSpecies(met))); + } + else { + SET_STRING_ELT(spec, i, Rf_mkChar("no_species")); + } + + /* stoichiometry */ + if (SpeciesReference_isSetStoichiometry(met)) { + REAL(stoich)[i] = SpeciesReference_getStoichiometry(met); + } + else { + REAL(stoich)[i] = 1; + } + } + + PROTECT(speclist = Rf_allocVector(VECSXP, 3)); + SET_VECTOR_ELT(speclist, 0, id); + SET_VECTOR_ELT(speclist, 1, spec); + SET_VECTOR_ELT(speclist, 2, stoich); + + PROTECT(speclistn = Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(speclistn, 0, Rf_mkChar("id")); + SET_STRING_ELT(speclistn, 1, Rf_mkChar("species")); + SET_STRING_ELT(speclistn, 2, Rf_mkChar("stoichiometry")); + Rf_setAttrib(speclist, R_NamesSymbol, speclistn); + + UNPROTECT(5); + + } + else { + speclist = R_NilValue; + } + + return speclist; +} + + diff --git a/src/sbml.h b/src/sbml.h new file mode 100644 index 0000000..4d3b9c9 --- /dev/null +++ b/src/sbml.h @@ -0,0 +1,84 @@ +/* sbml.h + Link to libSBML for sybil. + + Copyright (C) 2010-2013 Gabriel Gelius-Dietrich, Dpt. for Bioinformatics, + Institute for Informatics, Heinrich-Heine-University, Duesseldorf, Germany. + All right reserved. + Email: geliudie@uni-duesseldorf.de + + This file is part of sybilSBML. + + SybilSBML is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + SybilSBML is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with sybilSBML. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include <stdlib.h> + +#include <sbml/SBMLDocument.h> + +/* avoid remapping of Rf_<function> to <function> in R header files */ +#ifndef R_NO_REMAP +#define R_NO_REMAP +#endif /* R_NO_REMAP */ + +/* use strict R headers */ +#ifndef STRICT_R_HEADERS +#define STRICT_R_HEADERS +#endif /* STRICT_R_HEADERS */ + +#include <R.h> +#include <Rinternals.h> + + +/* -------------------------------------------------------------------------- */ +/* NULL */ +#define checkIfNil(cp) do { \ + if (R_ExternalPtrAddr(cp) == NULL) \ + Rf_error("You passed a nil value!"); \ +} while (0) + +/* -------------------------------------------------------------------------- */ +/* sbml document */ +#define checkTypeOfDocument(cp) do { \ + if ( (TYPEOF(cp) != EXTPTRSXP) || (R_ExternalPtrTag(cp) != tagSBMLdocument) ) \ + Rf_error("You must pass a pointer to an sbml document structure!"); \ +} while (0) + +#define checkDocument(p) do { \ + checkIfNil(p); \ + checkTypeOfDocument(p); \ +} while (0) + + +/* -------------------------------------------------------------------------- */ +/* sbml model */ +#define checkTypeOfModel(cp) do { \ + if ( (TYPEOF(cp) != EXTPTRSXP) || (R_ExternalPtrTag(cp) != tagSBMLmodel) ) \ + Rf_error("You must pass a pointer to an sbml model structure!"); \ +} while (0) + +#define checkModel(p) do { \ + checkIfNil(p); \ + checkTypeOfModel(p); \ +} while (0) + + +/* -------------------------------------------------------------------------- */ +/* some usefull funcitons */ +/* -------------------------------------------------------------------------- */ + +/* make a problem description for R */ +SEXP generateProblemMsg(XMLError_t *sbml_err); + +/* get species reference */ +SEXP getSpeciesReference(Reaction_t *react, unsigned int nspec, unsigned int repro); diff --git a/src/sybilSBML.c b/src/sybilSBML.c new file mode 100644 index 0000000..2c89694 --- /dev/null +++ b/src/sybilSBML.c @@ -0,0 +1,1047 @@ +/* sybilSBML.c + Link to libSBML for sybil. + + Copyright (C) 2010-2013 Gabriel Gelius-Dietrich, Dpt. for Bioinformatics, + Institute for Informatics, Heinrich-Heine-University, Duesseldorf, Germany. + All right reserved. + Email: geliudie@uni-duesseldorf.de + + This file is part of sybilSBML. + + SybilSBML is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + SybilSBML is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with sybilSBML. If not, see <http://www.gnu.org/licenses/>. +*/ + + +#include "sybilSBML.h" + + +static SEXP tagSBMLmodel; +static SEXP tagSBMLdocument; + + +/* -------------------------------------------------------------------------- */ +/* Finalizer */ +/* -------------------------------------------------------------------------- */ + +/* -------------------------------------------------------------------------- */ +/* finalizer for sbml document objects */ +static void sbmlDocumentFinalizer (SEXP sbmldoc) { + if (!R_ExternalPtrAddr(sbmldoc)) { + return; + } + else { + delDocument(sbmldoc); + } +} + + +/* -------------------------------------------------------------------------- */ +/* finalizer for sbml model objects */ +/* +static void sbmlModelFinalizer (SEXP sbmlmodel) { + if (!R_ExternalPtrAddr(sbmlmodel)) { + return; + } + else { + delModel(sbmlmodel); + } +} +*/ + + +/* -------------------------------------------------------------------------- */ +/* help functions */ +/* -------------------------------------------------------------------------- */ + +/* check for pointer to sbml document */ +SEXP isSBMLdocptr(SEXP ptr) { + + SEXP out = R_NilValue; + + if ( (TYPEOF(ptr) == EXTPTRSXP) && + (R_ExternalPtrTag(ptr) == tagSBMLdocument) ) { + out = Rf_ScalarLogical(1); + } + else { + out = Rf_ScalarLogical(0); + } + + return out; +} + +/* check for pointer to sbml model */ +SEXP isSBMLmodptr(SEXP ptr) { + + SEXP out = R_NilValue; + + if ( (TYPEOF(ptr) == EXTPTRSXP) && + (R_ExternalPtrTag(ptr) == tagSBMLmodel) ) { + out = Rf_ScalarLogical(1); + } + else { + out = Rf_ScalarLogical(0); + } + + return out; +} + +/* check for NULL pointer */ +SEXP isNULLptr(SEXP ptr) { + + SEXP out = R_NilValue; + + if ( (TYPEOF(ptr) == EXTPTRSXP) && + (R_ExternalPtrAddr(ptr) == NULL) ) { + out = Rf_ScalarLogical(1); + } + else { + out = Rf_ScalarLogical(0); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* API-Functions */ +/* -------------------------------------------------------------------------- */ + +/* -------------------------------------------------------------------------- */ +/* initialize sybilSBML */ +SEXP initSBML(void) { + tagSBMLmodel = Rf_install("TYPE_SBML_MODEL"); + tagSBMLdocument = Rf_install("TYPE_SBML_DOCUMENT"); + return R_NilValue; +} + + +/* -------------------------------------------------------------------------- */ +/* get libsbml version number (dotted version) */ +SEXP getLibSBMLversion() { + + SEXP out = R_NilValue; + + const char *vstr = getLibSBMLDottedVersion(); + + out = Rf_mkString(vstr); + + return out; + +} + + +/* -------------------------------------------------------------------------- */ +/* remove sbml document pointer */ +SEXP delDocument(SEXP sbmldoc) { + + SEXP out = R_NilValue; + SBMLDocument_t *del = NULL; + + checkDocument(sbmldoc); + + del = R_ExternalPtrAddr(sbmldoc); + + SBMLDocument_free(del); + R_ClearExternalPtr(sbmldoc); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* remove model pointer */ +SEXP delModel(SEXP sbmlmodel) { + + SEXP out = R_NilValue; + /* Model_t *del = NULL; */ + + checkModel(sbmlmodel); + + /* del = R_ExternalPtrAddr(sbmlmodel); */ + + /* Model_free(del); */ + R_ClearExternalPtr(sbmlmodel); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* read SBML file */ +SEXP readSBMLfile(SEXP fname, SEXP ptrtype) { + + SEXP sfext = R_NilValue; + SEXP ptr, class, file; + const char *rfname = CHAR(STRING_ELT(fname, 0)); + + SBMLDocument_t *sbmldoc; + + /* create sbml document pointer */ + PROTECT(ptr = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(ptr, 0, STRING_ELT(ptrtype, 0)); + + PROTECT(class = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(class, 0, Rf_mkChar("sbml_doc_ptr")); + + PROTECT(file = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(file, 0, Rf_mkChar("file_name")); + + /* read the model xml file */ + sbmldoc = readSBML(rfname); + + sfext = R_MakeExternalPtr(sbmldoc, tagSBMLdocument, R_NilValue); + PROTECT(sfext); + R_RegisterCFinalizerEx(sfext, sbmlDocumentFinalizer, TRUE); + Rf_setAttrib(ptr, class, sfext); + Rf_setAttrib(ptr, file, fname); + Rf_classgets(ptr, class); + + UNPROTECT(4); + + return ptr; +} + + +/* -------------------------------------------------------------------------- */ +/* get sbml document level */ +SEXP getSBMLlevel(SEXP sbmldoc) { + + SEXP out = R_NilValue; + unsigned int level; + + checkDocument(sbmldoc); + + level = SBMLDocument_getLevel(R_ExternalPtrAddr(sbmldoc)); + + out = Rf_ScalarInteger(level); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get sbml document version */ +SEXP getSBMLversion(SEXP sbmldoc) { + + SEXP out = R_NilValue; + unsigned int version; + + checkDocument(sbmldoc); + + version = SBMLDocument_getVersion(R_ExternalPtrAddr(sbmldoc)); + + out = Rf_ScalarInteger(version); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* validate SBML document */ +SEXP validateDocument(SEXP sbmldoc) { + + /* + this is adopted from Michael Lawrence: rsbml + Michael Lawrence (). rsbml: R support for SBML, using libsbml. + R package version 2.18.0. http://www.sbml.org + http://www.bioconductor.org/packages/release/bioc/html/rsbml.html + */ + + SEXP out = R_NilValue; + + unsigned int validation; + + checkDocument(sbmldoc); + + /* number or errors logged when reading SBML file */ + validation = SBMLDocument_getNumErrors(R_ExternalPtrAddr(sbmldoc)); + /* number or errors from structural and mathematical tests */ + validation += SBMLDocument_checkConsistency(R_ExternalPtrAddr(sbmldoc)); + + if (validation > 0) { + out = Rf_ScalarLogical(0); + } + else { + out = Rf_ScalarLogical(1); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get SBML errors */ +SEXP getSBMLerrors(SEXP sbmldoc) { + + /* + this is adopted from Michael Lawrence: rsbml + Michael Lawrence (). rsbml: R support for SBML, using libsbml. + R package version 2.18.0. http://www.sbml.org + http://www.bioconductor.org/packages/release/bioc/html/rsbml.html + */ + + SEXP out = R_NilValue; + SEXP listv = R_NilValue; + SEXP info = R_NilValue; + SEXP warn = R_NilValue; + SEXP error = R_NilValue; + SEXP fatal = R_NilValue; + SEXP class = R_NilValue; + SEXP el = R_NilValue; + + XMLError_t *sbml_err; + + unsigned int nprob, i, ind; + int ninfo = 0, nwarn = 0, nerror = 0, nfatal = 0, nunknown = 0; + + checkDocument(sbmldoc); + + nprob = SBMLDocument_getNumErrors(R_ExternalPtrAddr(sbmldoc)); + + /* + Rprintf("Model Errors: %i\n", nprob); + */ + + if (nprob > 0) { + + /* check how many infos, warnings, errors and fatals we have */ + for (i = 0; i < nprob; i++) { + sbml_err = (XMLError_t *) SBMLDocument_getError(R_ExternalPtrAddr(sbmldoc), i); + if (XMLError_isInfo(sbml_err)) { + ninfo++; + } + else if (XMLError_isWarning(sbml_err)) { + nwarn++; + } + else if (XMLError_isError(sbml_err)) { + nerror++; + } + else if (XMLError_isFatal(sbml_err)) { + nfatal++; + } + else { + nunknown++; + } + } + + /* + Rprintf("number of infos: %i, warnings: %i, errors: %i, falals: %i, unknowns: %i\n", + ninfo, nwarn, nerror, nfatal, nunknown); + */ + + /* + out will be a list of four elements: + infos + warnings + errors + fatals + each of them is a list of three elements: + id + line + column + msg + */ + + PROTECT(out = Rf_allocVector(VECSXP, 4)); + + /* allocate space for each error list */ + PROTECT(info = Rf_allocVector(VECSXP, ninfo)); + PROTECT(warn = Rf_allocVector(VECSXP, nwarn)); + PROTECT(error = Rf_allocVector(VECSXP, nerror)); + PROTECT(fatal = Rf_allocVector(VECSXP, nfatal)); + + SET_VECTOR_ELT(out, 0, info); + SET_VECTOR_ELT(out, 1, warn); + SET_VECTOR_ELT(out, 2, error); + SET_VECTOR_ELT(out, 3, fatal); + + PROTECT(listv = Rf_allocVector(STRSXP, 4)); + SET_STRING_ELT(listv, 0, Rf_mkChar("infos")); + SET_STRING_ELT(listv, 1, Rf_mkChar("warnings")); + SET_STRING_ELT(listv, 2, Rf_mkChar("errors")); + SET_STRING_ELT(listv, 3, Rf_mkChar("fatals")); + Rf_setAttrib(out, R_NamesSymbol, listv); + + /* get the error messages */ + ninfo = 0, nwarn = 0, nerror = 0, nfatal = 0, nunknown = 0; + for (i = 0; i < nprob; i++) { + sbml_err = (XMLError_t *) SBMLDocument_getError(R_ExternalPtrAddr(sbmldoc), i); + el = R_NilValue; + ind = 0; + if (XMLError_isInfo(sbml_err)) { + ind = ninfo++; + el = info; + } + else if (XMLError_isWarning(sbml_err)) { + ind = nwarn++; + el = warn; + } + else if (XMLError_isError(sbml_err)) { + ind = nerror++; + el = error; + } + else if (XMLError_isFatal(sbml_err)) { + ind = nfatal++; + el = fatal; + } + else { + nunknown++; + } + SET_VECTOR_ELT(el, ind, generateProblemMsg(sbml_err)); + } + + /* make the list to be an instance of 'sbml_error' */ + PROTECT(class = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(class, 0, Rf_mkChar("sbml_error")); + Rf_classgets(out, class); + + UNPROTECT(7); + + } /* end if nprob > 0 */ + else { + out = Rf_ScalarLogical(1); + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get sbml model from sbml document */ +SEXP getSBMLmodel(SEXP sbmldoc, SEXP ptrtype) { + + SEXP smext = R_NilValue; + SEXP ptr, class; + + Model_t *sbmlmodel; + + checkDocument(sbmldoc); + + /* create model pointer */ + PROTECT(ptr = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(ptr, 0, STRING_ELT(ptrtype, 0)); + + PROTECT(class = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(class, 0, Rf_mkChar("sbml_model_ptr")); + + /* get sbml model */ + sbmlmodel = SBMLDocument_getModel(R_ExternalPtrAddr(sbmldoc)); + + smext = R_MakeExternalPtr(sbmlmodel, tagSBMLmodel, R_NilValue); + PROTECT(smext); + /* R_RegisterCFinalizerEx(smext, sbmlModelFinalizer, TRUE); */ + Rf_setAttrib(ptr, class, smext); + Rf_classgets(ptr, class); + + UNPROTECT(3); + + return ptr; +} + + +/* -------------------------------------------------------------------------- */ +/* get model id */ +SEXP getSBMLmodId(SEXP sbmlmod) { + + SEXP out = R_NilValue; + const char *mid; + + checkModel(sbmlmod); + + if (Model_isSetId(R_ExternalPtrAddr(sbmlmod))) { + mid = Model_getId(R_ExternalPtrAddr(sbmlmod)); + } + else { + mid = "no_id"; + } + + out = Rf_mkString(mid); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get model name */ +SEXP getSBMLmodName(SEXP sbmlmod) { + + SEXP out = R_NilValue; + const char *mnm; + + checkModel(sbmlmod); + + if (Model_isSetName(R_ExternalPtrAddr(sbmlmod))) { + mnm = Model_getName(R_ExternalPtrAddr(sbmlmod)); + } + else { + mnm = ""; + } + + out = Rf_mkString(mnm); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get number of compartments */ +SEXP getSBMLnumCompart(SEXP sbmlmod) { + + SEXP out = R_NilValue; + unsigned int nc; + + checkModel(sbmlmod); + + nc = Model_getNumCompartments(R_ExternalPtrAddr(sbmlmod)); + + out = Rf_ScalarInteger(nc); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get number of species (metabolites) */ +SEXP getSBMLnumSpecies(SEXP sbmlmod) { + + SEXP out = R_NilValue; + unsigned int nsp; + + checkModel(sbmlmod); + + nsp = Model_getNumSpecies(R_ExternalPtrAddr(sbmlmod)); + + out = Rf_ScalarInteger(nsp); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get number of reactions */ +SEXP getSBMLnumReactions(SEXP sbmlmod) { + + SEXP out = R_NilValue; + unsigned int nr; + + checkModel(sbmlmod); + + nr = Model_getNumReactions(R_ExternalPtrAddr(sbmlmod)); + + out = Rf_ScalarInteger(nr); + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get list of unit definitions */ +SEXP getSBMLunitDefinitionsList(SEXP sbmlmod) { + + SEXP out = R_NilValue; + SEXP class = R_NilValue; + SEXP unl = R_NilValue; + SEXP listv = R_NilValue; + SEXP listn = R_NilValue; + + SEXP unitdefid = R_NilValue; + SEXP unitdef = R_NilValue; + + SEXP unitkind = R_NilValue; + SEXP unitscale = R_NilValue; + SEXP unitexp = R_NilValue; + SEXP unitmult = R_NilValue; + + unsigned int nud, nu, i, j; + + /* ListOf_t *udl; */ + UnitDefinition_t *udlel; + Unit_t *uel; + + checkModel(sbmlmod); + + /* udl = Model_getListOfUnitDefinitions(R_ExternalPtrAddr(sbmlmod)); */ + nud = Model_getNumUnitDefinitions(R_ExternalPtrAddr(sbmlmod)); + + if (nud > 0) { + PROTECT(unitdefid = Rf_allocVector(STRSXP, nud)); + PROTECT(unitdef = Rf_allocVector(VECSXP, nud)); + for (i = 0; i < nud; i++) { + /* udlel = (UnitDefinition_t *) ListOf_get(udl, i); */ + udlel = Model_getUnitDefinition(R_ExternalPtrAddr(sbmlmod), i); + + /* id and unit */ + if (UnitDefinition_isSetId(udlel)) { + SET_STRING_ELT(unitdefid, i, Rf_mkChar(UnitDefinition_getId(udlel))); + + nu = UnitDefinition_getNumUnits(udlel); + + PROTECT(unitkind = Rf_allocVector(STRSXP, nu)); + PROTECT(unitscale = Rf_allocVector(INTSXP, nu)); + PROTECT(unitexp = Rf_allocVector(INTSXP, nu)); + PROTECT(unitmult = Rf_allocVector(REALSXP, nu)); + + for (j = 0; j < nu; j++) { + uel = UnitDefinition_getUnit(udlel, j); + + /* kind */ + if (Unit_isSetKind(uel)) { + SET_STRING_ELT(unitkind, j, Rf_mkChar(UnitKind_toString(Unit_getKind(uel)))); + } + else { + SET_STRING_ELT(unitkind, j, Rf_mkChar("no_kind")); + } + + /* scale */ + if (Unit_isSetScale(uel)) { + INTEGER(unitscale)[j] = Unit_getScale(uel); + } + else { + INTEGER(unitscale)[j] = 0; + } + + /* exponent */ + if (Unit_isSetExponent(uel)) { + INTEGER(unitexp)[j] = Unit_getExponent(uel); + } + else { + INTEGER(unitexp)[j] = 1; + } + + /* multiplier */ + if (Unit_isSetMultiplier(uel)) { + REAL(unitmult)[j] = Unit_getMultiplier(uel); + } + else { + REAL(unitmult)[j] = 1; + } + + } + + PROTECT(unl = Rf_allocVector(VECSXP, 4)); + SET_VECTOR_ELT(unl, 0, unitkind); + SET_VECTOR_ELT(unl, 1, unitscale); + SET_VECTOR_ELT(unl, 2, unitexp); + SET_VECTOR_ELT(unl, 3, unitmult); + + PROTECT(listn = Rf_allocVector(STRSXP, 4)); + SET_STRING_ELT(listn, 0, Rf_mkChar("kind")); + SET_STRING_ELT(listn, 1, Rf_mkChar("scale")); + SET_STRING_ELT(listn, 2, Rf_mkChar("exponent")); + SET_STRING_ELT(listn, 3, Rf_mkChar("multiplier")); + Rf_setAttrib(unl, R_NamesSymbol, listn); + + SET_VECTOR_ELT(unitdef, i, unl); + + UNPROTECT(6); + + } + else { + SET_STRING_ELT(unitdefid, i, Rf_mkChar("no_id")); + } + } + + PROTECT(out = Rf_allocVector(VECSXP, 2)); + SET_VECTOR_ELT(out, 0, unitdefid); + SET_VECTOR_ELT(out, 1, unitdef); + + PROTECT(listv = Rf_allocVector(STRSXP, 2)); + SET_STRING_ELT(listv, 0, Rf_mkChar("definition_id")); + SET_STRING_ELT(listv, 1, Rf_mkChar("definition")); + + Rf_setAttrib(out, R_NamesSymbol, listv); + + /* make the list to be an instance of 'unit_definition' */ + PROTECT(class = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(class, 0, Rf_mkChar("unit_definition")); + Rf_classgets(out, class); + + UNPROTECT(5); + } + else { + out = R_NilValue; + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get list of compartments */ +SEXP getSBMLCompartList(SEXP sbmlmod) { + + SEXP out = R_NilValue; + SEXP class = R_NilValue; + SEXP listv = R_NilValue; + SEXP compid = R_NilValue; + SEXP compname = R_NilValue; + SEXP compout = R_NilValue; + + unsigned int nc, i; + + /* ListOf_t *cl; */ + Compartment_t *clel; + + checkModel(sbmlmod); + + /* cl = Model_getListOfCompartments(R_ExternalPtrAddr(sbmlmod)); */ + nc = Model_getNumCompartments(R_ExternalPtrAddr(sbmlmod)); + + if (nc > 0) { + PROTECT(compid = Rf_allocVector(STRSXP, nc)); + PROTECT(compname = Rf_allocVector(STRSXP, nc)); + PROTECT(compout = Rf_allocVector(STRSXP, nc)); + + for (i = 0; i < nc; i++) { + /* clel = (Compartment_t *) ListOf_get(cl, i); */ + clel = Model_getCompartment(R_ExternalPtrAddr(sbmlmod), i); + /* id */ + if (Compartment_isSetId(clel)) { + SET_STRING_ELT(compid, i, Rf_mkChar(Compartment_getId(clel))); + } + else { + SET_STRING_ELT(compid, i, Rf_mkChar("no_id")); + } + /* name */ + if (Compartment_isSetName(clel)) { + SET_STRING_ELT(compname, i, Rf_mkChar(Compartment_getName(clel))); + } + else { + SET_STRING_ELT(compname, i, Rf_mkChar("")); + } + /* outside */ + if (Compartment_isSetOutside(clel)) { + SET_STRING_ELT(compout, i, Rf_mkChar(Compartment_getOutside(clel))); + } + else { + SET_STRING_ELT(compout, i, Rf_mkChar("")); + } + } + + PROTECT(out = Rf_allocVector(VECSXP, 3)); + SET_VECTOR_ELT(out, 0, compid); + SET_VECTOR_ELT(out, 1, compname); + SET_VECTOR_ELT(out, 2, compout); + + PROTECT(listv = Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(listv, 0, Rf_mkChar("id")); + SET_STRING_ELT(listv, 1, Rf_mkChar("name")); + SET_STRING_ELT(listv, 2, Rf_mkChar("outside")); + + Rf_setAttrib(out, R_NamesSymbol, listv); + + /* make the list to be an instance of 'compartments_list' */ + PROTECT(class = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(class, 0, Rf_mkChar("compartments_list")); + Rf_classgets(out, class); + + UNPROTECT(6); + } + else { + out = R_NilValue; + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get list of species (metabolites) */ +SEXP getSBMLSpeciesList(SEXP sbmlmod) { + + SEXP out = R_NilValue; + SEXP class = R_NilValue; + SEXP listv = R_NilValue; + SEXP metid = R_NilValue; + SEXP metname = R_NilValue; + SEXP metcomp = R_NilValue; + SEXP metcharge = R_NilValue; + SEXP metbndcnd = R_NilValue; + + unsigned int nsp, i; + + /* ListOf_t *spl; */ + Species_t *splel; + + checkModel(sbmlmod); + + /* spl = Model_getListOfSpecies(R_ExternalPtrAddr(sbmlmod)); */ + nsp = Model_getNumSpecies(R_ExternalPtrAddr(sbmlmod)); + + if (nsp > 0) { + PROTECT(metid = Rf_allocVector(STRSXP, nsp)); + PROTECT(metname = Rf_allocVector(STRSXP, nsp)); + PROTECT(metcomp = Rf_allocVector(STRSXP, nsp)); + PROTECT(metcharge = Rf_allocVector(INTSXP, nsp)); + PROTECT(metbndcnd = Rf_allocVector(LGLSXP, nsp)); + + for (i = 0; i < nsp; i++) { + /* splel = (Species_t *) ListOf_get(spl, i); */ + splel = Model_getSpecies(R_ExternalPtrAddr(sbmlmod), i); + /* id */ + if (Species_isSetId(splel)) { + SET_STRING_ELT(metid, i, Rf_mkChar(Species_getId(splel))); + } + else { + SET_STRING_ELT(metid, i, Rf_mkChar("no_id")); + } + /* name */ + if (Species_isSetName(splel)) { + SET_STRING_ELT(metname, i, Rf_mkChar(Species_getName(splel))); + } + else { + SET_STRING_ELT(metname, i, Rf_mkChar("")); + } + /* compartment */ + if (Species_isSetCompartment(splel)) { + SET_STRING_ELT(metcomp, i, Rf_mkChar(Species_getCompartment(splel))); + } + else { + SET_STRING_ELT(metcomp, i, Rf_mkChar("")); + } + /* charge */ + if (Species_isSetCharge(splel)) { + INTEGER(metcharge)[i] = Species_getCharge(splel); + } + else { + INTEGER(metcharge)[i] = 0; + } + /* boundary condition */ + if (Species_isSetBoundaryCondition(splel)) { + LOGICAL(metbndcnd)[i] = Species_getBoundaryCondition(splel); + } + else { + LOGICAL(metbndcnd)[i] = 0; + } + } + + PROTECT(out = Rf_allocVector(VECSXP, 5)); + SET_VECTOR_ELT(out, 0, metid); + SET_VECTOR_ELT(out, 1, metname); + SET_VECTOR_ELT(out, 2, metcomp); + SET_VECTOR_ELT(out, 3, metcharge); + SET_VECTOR_ELT(out, 4, metbndcnd); + + PROTECT(listv = Rf_allocVector(STRSXP, 5)); + SET_STRING_ELT(listv, 0, Rf_mkChar("id")); + SET_STRING_ELT(listv, 1, Rf_mkChar("name")); + SET_STRING_ELT(listv, 2, Rf_mkChar("compartment")); + SET_STRING_ELT(listv, 3, Rf_mkChar("charge")); + SET_STRING_ELT(listv, 4, Rf_mkChar("boundaryCondition")); + + Rf_setAttrib(out, R_NamesSymbol, listv); + + /* make the list to be an instance of 'species_list' */ + PROTECT(class = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(class, 0, Rf_mkChar("species_list")); + Rf_classgets(out, class); + + UNPROTECT(8); + } + else { + out = R_NilValue; + } + + return out; +} + + +/* -------------------------------------------------------------------------- */ +/* get list of reactions */ +SEXP getSBMLReactionsList(SEXP sbmlmod) { + + SEXP out = R_NilValue; + SEXP class = R_NilValue; + SEXP listv = R_NilValue; + SEXP reactid = R_NilValue; + SEXP reactname = R_NilValue; + SEXP reactrev = R_NilValue; + SEXP reactnotes = R_NilValue; + SEXP reactannot = R_NilValue; + SEXP reactreact = R_NilValue; + SEXP reactprod = R_NilValue; + SEXP reactkl = R_NilValue; + + SEXP parml = R_NilValue; + SEXP parmn = R_NilValue; + SEXP parmid = R_NilValue; + SEXP parmval = R_NilValue; + SEXP parmunit = R_NilValue; + + unsigned int nre, i, j, nreactant, nproduct, nparm; + + /* ListOf_t *rel; */ + Reaction_t *relel; + KineticLaw_t *kl; + Parameter_t *parm; + + checkModel(sbmlmod); + + /* rel = Model_getListOfReactions(R_ExternalPtrAddr(sbmlmod)); */ + nre = Model_getNumReactions(R_ExternalPtrAddr(sbmlmod)); + + if (nre > 0) { + PROTECT(reactid = Rf_allocVector(STRSXP, nre)); + PROTECT(reactname = Rf_allocVector(STRSXP, nre)); + PROTECT(reactrev = Rf_allocVector(LGLSXP, nre)); + PROTECT(reactnotes = Rf_allocVector(STRSXP, nre)); + PROTECT(reactannot = Rf_allocVector(STRSXP, nre)); + PROTECT(reactreact = Rf_allocVector(VECSXP, nre)); + PROTECT(reactprod = Rf_allocVector(VECSXP, nre)); + PROTECT(reactkl = Rf_allocVector(VECSXP, nre)); + + for (i = 0; i < nre; i++) { + /* relel = (Reaction_t *) ListOf_get(rel, i); */ + relel = Model_getReaction(R_ExternalPtrAddr(sbmlmod), i); + + nreactant = Reaction_getNumReactants(relel); + nproduct = Reaction_getNumProducts(relel); + + /* id */ + if (Reaction_isSetId(relel)) { + SET_STRING_ELT(reactid, i, Rf_mkChar(Reaction_getId(relel))); + } + else { + SET_STRING_ELT(reactid, i, Rf_mkChar("no_id")); + } + /* name */ + if (Reaction_isSetName(relel)) { + SET_STRING_ELT(reactname, i, Rf_mkChar(Reaction_getName(relel))); + } + else { + SET_STRING_ELT(reactname, i, Rf_mkChar("")); + } + /* reversible */ + if (Reaction_isSetReversible(relel)) { + LOGICAL(reactrev)[i] = Reaction_getReversible(relel); + } + else { + LOGICAL(reactrev)[i] = 0; + } + /* notes */ + if (SBase_isSetNotes((SBase_t *) relel)) { + SET_STRING_ELT(reactnotes, i, Rf_mkChar(SBase_getNotesString((SBase_t *) relel))); + } + else { + SET_STRING_ELT(reactnotes, i, Rf_mkChar("")); + } + /* annotation */ + if (SBase_isSetAnnotation((SBase_t *) relel)) { + SET_STRING_ELT(reactannot, i, Rf_mkChar(SBase_getAnnotationString((SBase_t *) relel))); + } + else { + SET_STRING_ELT(reactannot, i, Rf_mkChar("")); + } + + /* reactants */ + SET_VECTOR_ELT(reactreact, i, getSpeciesReference(relel, nreactant, 0)); + + /* products */ + SET_VECTOR_ELT(reactprod, i, getSpeciesReference(relel, nproduct, 1)); + + /* kineticLaw */ + if (Reaction_isSetKineticLaw(relel)) { + kl = Reaction_getKineticLaw(relel); + nparm = KineticLaw_getNumParameters(kl); + + if (nparm > 0) { + PROTECT(parmid = Rf_allocVector(STRSXP, nparm)); + PROTECT(parmval = Rf_allocVector(REALSXP, nparm)); + PROTECT(parmunit = Rf_allocVector(STRSXP, nparm)); + + for (j = 0; j < nparm; j++) { + parm = KineticLaw_getParameter(kl, j); + + /* id */ + if (Parameter_isSetId(parm)) { + SET_STRING_ELT(parmid, j, Rf_mkChar(Parameter_getId(parm))); + } + else { + SET_STRING_ELT(parmid, j, Rf_mkChar("no_id")); + } + /* value */ + if (Parameter_isSetValue(parm)) { + REAL(parmval)[j] = Parameter_getValue(parm); + } + else { + REAL(parmval)[j] = 0; + } + /* units */ + if (Parameter_isSetUnits(parm)) { + SET_STRING_ELT(parmunit, j, Rf_mkChar(Parameter_getUnits(parm))); + } + else { + SET_STRING_ELT(parmunit, j, Rf_mkChar("")); + } + } + + PROTECT(parml = Rf_allocVector(VECSXP, 3)); + SET_VECTOR_ELT(parml, 0, parmid); + SET_VECTOR_ELT(parml, 1, parmval); + SET_VECTOR_ELT(parml, 2, parmunit); + + PROTECT(parmn = Rf_allocVector(STRSXP, 3)); + SET_STRING_ELT(parmn, 0, Rf_mkChar("id")); + SET_STRING_ELT(parmn, 1, Rf_mkChar("value")); + SET_STRING_ELT(parmn, 2, Rf_mkChar("units")); + Rf_setAttrib(parml, R_NamesSymbol, parmn); + + UNPROTECT(5); + } + else { + parml = R_NilValue; + } + SET_VECTOR_ELT(reactkl, i, parml); + } + else { + SET_VECTOR_ELT(reactkl, i, R_NilValue); + } + + } + + PROTECT(out = Rf_allocVector(VECSXP, 8)); + SET_VECTOR_ELT(out, 0, reactid); + SET_VECTOR_ELT(out, 1, reactname); + SET_VECTOR_ELT(out, 2, reactrev); + SET_VECTOR_ELT(out, 3, reactnotes); + SET_VECTOR_ELT(out, 4, reactannot); + SET_VECTOR_ELT(out, 5, reactreact); + SET_VECTOR_ELT(out, 6, reactprod); + SET_VECTOR_ELT(out, 7, reactkl); + + PROTECT(listv = Rf_allocVector(STRSXP, 8)); + SET_STRING_ELT(listv, 0, Rf_mkChar("id")); + SET_STRING_ELT(listv, 1, Rf_mkChar("name")); + SET_STRING_ELT(listv, 2, Rf_mkChar("reversible")); + SET_STRING_ELT(listv, 3, Rf_mkChar("notes")); + SET_STRING_ELT(listv, 4, Rf_mkChar("annotation")); + SET_STRING_ELT(listv, 5, Rf_mkChar("reactants")); + SET_STRING_ELT(listv, 6, Rf_mkChar("products")); + SET_STRING_ELT(listv, 7, Rf_mkChar("kinetic_law")); + + Rf_setAttrib(out, R_NamesSymbol, listv); + + /* make the list to be an instance of 'reactions_list' */ + PROTECT(class = Rf_allocVector(STRSXP, 1)); + SET_STRING_ELT(class, 0, Rf_mkChar("reactions_list")); + Rf_classgets(out, class); + + UNPROTECT(11); + } + else { + out = R_NilValue; + } + + return out; +} diff --git a/src/sybilSBML.h b/src/sybilSBML.h new file mode 100644 index 0000000..0334524 --- /dev/null +++ b/src/sybilSBML.h @@ -0,0 +1,100 @@ +/* sybilSBML.h + Link to libSBML for sybil. + + Copyright (C) 2010-2013 Gabriel Gelius-Dietrich, Dpt. for Bioinformatics, + Institute for Informatics, Heinrich-Heine-University, Duesseldorf, Germany. + All right reserved. + Email: geliudie@uni-duesseldorf.de + + This file is part of sybilSBML. + + SybilSBML is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + SybilSBML is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with sybilSBML. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include "sbml.h" + +/* -------------------------------------------------------------------------- */ +/* help functions */ +/* -------------------------------------------------------------------------- */ + +/* check for pointer to sbml document */ +SEXP isSBMLdocptr(SEXP ptr); + +/* check for pointer to sbml model */ +SEXP isSBMLmodptr(SEXP ptr); + +/* check for NULL pointer */ +SEXP isNULLptr(SEXP ptr); + + +/* -------------------------------------------------------------------------- */ +/* API functions */ +/* -------------------------------------------------------------------------- */ + +/* get libsbml version number (dotted version) */ +SEXP getLibSBMLversion(); + +/* initialize sybilSBML */ +SEXP initSBML(void); + +/* remove sbml document pointer */ +SEXP delDocument(SEXP sbmldoc); + +/* remove model pointer */ +SEXP delModel(SEXP sbmlmodel); + +/* read SBML file */ +SEXP readSBMLfile(SEXP fname, SEXP ptrtype); + +/* get sbml document level */ +SEXP getSBMLlevel(SEXP sbmldoc); + +/* get sbml document version */ +SEXP getSBMLversion(SEXP sbmldoc); + +/* validate SBML document */ +SEXP validateDocument(SEXP sbmldoc); + +/* get SBML errors */ +SEXP getSBMLerrors(SEXP sbmldoc); + +/* get sbml model from sbml document */ +SEXP getSBMLmodel(SEXP sbmldoc, SEXP ptrtype); + +/* get model id */ +SEXP getSBMLmodId(SEXP sbmlmod); + +/* get model name */ +SEXP getSBMLmodName(SEXP sbmlmod); + +/* get number of compartments */ +SEXP getSBMLnumCompart(SEXP sbmlmod); + +/* get number of species (metabolites) */ +SEXP getSBMLnumSpecies(SEXP sbmlmod); + +/* get number of reactions */ +SEXP getSBMLnumReactions(SEXP sbmlmod); + +/* get list of unit definitions */ +SEXP getSBMLunitDefinitionsList(SEXP sbmlmod); + +/* get list of compartments */ +SEXP getSBMLCompartList(SEXP sbmlmod); + +/* get list of species (metabolites) */ +SEXP getSBMLSpeciesList(SEXP sbmlmod); + +/* get list of reactions */ +SEXP getSBMLReactionsList(SEXP sbmlmod); diff --git a/vignettes/sybilSBML.Rnw b/vignettes/sybilSBML.Rnw new file mode 100644 index 0000000..5d11fdf --- /dev/null +++ b/vignettes/sybilSBML.Rnw @@ -0,0 +1,132 @@ +\documentclass[a4paper,headings=small]{scrartcl} +\usepackage[english]{babel} +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage{textcomp,lmodern} +\typearea[current]{last} +\usepackage{fixltx2e,mparhack,mathdots} + +\usepackage{natbib} +%\usepackage{hyperref} + +\usepackage{microtype} + +\newcommand{\Comp}[1]{\texttt{#1}} +% bash command prompt +\DeclareRobustCommand{\PROMPTL}{\Comp{\$}} + +% just a bash command +\DeclareRobustCommand{\COML}[1]{% + \small{\PROMPTL\Comp{ #1}} +} +% bash command with quote environment +\DeclareRobustCommand{\COMML}[1]{% + \begin{quote}% + \small{\PROMPTL\Comp{ #1}} + \end{quote} +} + +\addtolength{\skip\footins}{0.5\baselineskip} +\usepackage{fnpos} + + +% \hypersetup{ +% pdftitle = {sybilSBML -- Quick Start}, +% pdfauthor = {Gabriel Gelius-Dietrich}, +% pdfsubject = {SBML support for SyBiL}, +% pdfkeywords = {SBML}, +% pdfborder = {0 0 0}, +% pdfhighlight = {/N} +% } + + +\newcommand{\pkg}[1]{\emph{#1}} +\newcommand{\CRANpkg}[1]{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}} +%\newcommand{\pkgname}{\CRANpkg{sybilSBML}} +\newcommand{\pkgname}{\emph{sybilSBML}} +\newcommand{\prgname}[1]{\textsc{#1}} + + +\begin{document} +\title{sybilSBML -- Quick Start} +%\VignetteIndexEntry{Package sybilSBML -- Quick Start} +%\VignettePackage{sybilSBML} +\author{Gabriel Gelius-Dietrich} + +\maketitle + + +\section{Introduction} + +The package \pkgname{} is an addition to package +\pkg{sybil}\footnote{\texttt{http://CRAN.R-project.org/package=sybil}} +providing support for +metabolic networks written in SBML (Systems Biology Markup Language), in +particular those developed by Bernhard \O. Palsson's +lab\footnote{\texttt{http://gcrg.ucsd.edu/}} and those from the BiGG +database\footnote{\texttt{http://bigg.ucsd.edu/}} \citep{Schellenberger:2010fk}. +\nocite{Becker:2007uq,Schellenberger:2011fk} + + +\section{Installation} + +The package \pkgname{} depends on a working installation of +LibSBML \citep{Bornstein:2008uq} available from the SBML +homepage\footnote{\texttt{http://www.sbml.org/}, libSBML version 5.6.0 or higher} +(in particular libraries and header files). +See \Comp{INSTALL} for installation instructions and platform specific details. + + +\section{Usage} + +The package \pkgname{} provides the command \Comp{readSBMLmod()} which reads +SBML formated files and returns instances of class \Comp{modelorg}. + +<<eval=FALSE>>= +library(sybilSBML) +model <- readSBMLmod("<model>.xml") +@ + + +\section{Input files} + +The function \Comp{readSBMLmod()} reads metabolic network models written in +SBML format (Systems Biology Markup Language). Among the models available in +this de-facto standard format are in particular those developed by +Bernhard \O. Palsson's lab. + +The file \Comp{ecoli\_core\_model.xml} (in \Comp{extdata/}) contains an +exemplarily metabolic network written in SBML for the core energy metabolism +of \emph{E.~coli} \citep{Palsson:2006fk,Orth:2010fk}. +The exact location of the file can be retrieved with the \Comp{system.file()} +command: +<<>>= +library(sybilSBML) +mp <- system.file(package = "sybilSBML", "extdata") +ec_mod <- file.path(mp, "ecoli_core_model.xml") +@ +The model can be read in by using the command \Comp{readSBMLmod()}: +<<print=true>>= +mod <- readSBMLmod(ec_mod, bndCond = FALSE) +@ +The metabolite id's of the SBML files are written in the format +\Comp{M\_<metabolite abbreviation>\_<compartment abbreviation>}. The compartment +abbreviation is a one letter abbreviation, e.\,g. \Comp{c} for cytosol. All +metabolites outside the system boundary belong to compartment \Comp{b}. Those +metabolites are transported into or outside the system. As long as they are +mentioned, the network is closed. The function \Comp{readSBMLmod()} will remove +them in order to produce an open network. + +\section{Validation of input files} + +SBML files can be validated by using the command \Comp{validateSBMLdocument()}: +<<>>= +err <- validateSBMLdocument(ec_mod) +@ +The variable \Comp{err} is of class \Comp{sbmlError}, storing error messages +generated by the validation procedure. + +\bibliographystyle{abbrvnat} +\bibliography{sybilSBML} + +\end{document} diff --git a/vignettes/sybilSBML.bib b/vignettes/sybilSBML.bib new file mode 100644 index 0000000..dbd1455 --- /dev/null +++ b/vignettes/sybilSBML.bib @@ -0,0 +1,97 @@ +%% This BibTeX bibliography file was created using BibDesk. +%% http://bibdesk.sourceforge.net/ + + +%% Created for Gabriel Gelius-Dietrich at 2013-05-10 16:04:20 +0200 + + +%% Saved with string encoding Unicode (UTF-8) + + + +@booklet{Orth:2010fk, + Author = {Orth, Jeffrey D and Fleming, Ronan M T and Palsson, Bernhard {\O}}, + Date-Added = {2013-05-10 14:04:16 +0000}, + Date-Modified = {2013-05-10 14:04:16 +0000}, + Howpublished = {EcoSal Chapter 10.2.1}, + Title = {Reconstruction and Use of Microbial Metabolic Networks: the Core \emph{Escherichia coli} Metabolic Model as an Educational Guide}, + Year = {2010}} + +@book{Palsson:2006fk, + Author = {Bernhard {\O}. Palsson}, + Date-Added = {2013-05-10 14:04:16 +0000}, + Date-Modified = {2013-05-10 14:04:16 +0000}, + Publisher = {Cambridge University Press}, + Title = {Systems Biology: Properties of Recontructed Networks}, + Year = {2006}} + +@article{Schellenberger:2010fk, + Abstract = {BACKGROUND: Genome-scale metabolic reconstructions under the Constraint Based Reconstruction and Analysis (COBRA) framework are valuable tools for analyzing the metabolic capabilities of organisms and interpreting experimental data. As the number of such reconstructions and analysis methods increases, there is a greater need for data uniformity and ease of distribution and use. +DESCRIPTION: We describe BiGG, a knowledgebase of Biochemically, Genetically and Genomically structured genome-scale metabolic network reconstructions. BiGG integrates several published genome-scale metabolic networks into one resource with standard nomenclature which allows components to be compared across different organisms. BiGG can be used to browse model content, visualize metabolic pathway maps, and export SBML files of the models for further analysis by external software packages. Users may follow links from BiGG to several external databases to obtain additional information on genes, proteins, reactions, metabolites and citations of interest. +CONCLUSIONS: BiGG addresses a need in the systems biology community to have access to high quality curated metabolic models and reconstructions. It is freely available for academic use at http://bigg.ucsd.edu.}, + Author = {Schellenberger, Jan and Park, Junyoung O and Conrad, Tom M and Palsson, Bernhard {\O}}, + Date-Added = {2012-03-07 14:31:53 +0000}, + Date-Modified = {2012-03-07 14:33:06 +0000}, + Doi = {10.1186/1471-2105-11-213}, + Journal = {BMC Bioinformatics}, + Journal-Full = {BMC bioinformatics}, + Mesh = {Genome; Genomics; Knowledge Bases; Metabolic Networks and Pathways; Software}, + Pages = {213}, + Pmc = {PMC2874806}, + Pmid = {20426874}, + Pst = {epublish}, + Title = {{BiGG}: a Biochemical Genetic and Genomic knowledgebase of large scale metabolic reconstructions}, + Volume = {11}, + Year = {2010}, + Bdsk-Url-1 = {http://dx.doi.org/10.1186/1471-2105-11-213}} + +@article{Becker:2007uq, + Abstract = {The manner in which microorganisms utilize their metabolic processes can be predicted using constraint-based analysis of genome-scale metabolic networks. Herein, we present the constraint-based reconstruction and analysis toolbox, a software package running in the Matlab environment, which allows for quantitative prediction of cellular behavior using a constraint-based approach. Specifically, this software allows predictive computations of both steady-state and dynamic optimal growth behavior, the effects of gene deletions, comprehensive robustness analyses, sampling the range of possible cellular metabolic states and the determination of network modules. Functions enabling these calculations are included in the toolbox, allowing a user to input a genome-scale metabolic model distributed in Systems Biology Markup Language format and perform these calculations with just a few lines of code. The results are predictions of cellular behavior that have been verified as accurate in a growing body of research. After software installation, calculation time is minimal, allowing the user to focus on the interpretation of the computational results.}, + Author = {Becker, Scott A and others}, + Date-Added = {2011-08-30 15:32:19 +0200}, + Date-Modified = {2011-08-30 15:32:19 +0200}, + Doi = {10.1038/nprot.2007.99}, + Journal = {Nat Protoc}, + Journal-Full = {Nature protocols}, + Mesh = {Cells; Computational Biology; Computer Simulation; Metabolic Networks and Pathways; Models, Biological; Software; Systems Biology}, + Number = {3}, + Pages = {727--738}, + Pmid = {17406635}, + Pst = {ppublish}, + Title = {Quantitative prediction of cellular metabolism with constraint-based models: the {COBRA Toolbox}}, + Volume = {2}, + Year = {2007}, + Bdsk-Url-1 = {http://dx.doi.org/10.1038/nprot.2007.99}} + +@article{Schellenberger:2011fk, + Author = {Schellenberger, Jan and Que, Richard and Fleming, Ronan M T and Thiele, Ines and Orth, Jeffrey D and Feist, Adam M and Zielinski, Daniel C and Bordbar, Aarash and Lewis, Nathan E and Rahmanian, Sorena and Kang, Joseph and Hyduke, Daniel R and Palsson, Bernhard {\O}}, + Date-Added = {2011-08-30 15:28:24 +0200}, + Date-Modified = {2011-08-30 15:45:34 +0200}, + Doi = {10.1038/nprot.2011.308}, + Journal = {Nat Protoc}, + Number = {9}, + Pages = {1290--1307}, + Title = {Quantitative prediction of cellular metabolism with constraint-based models: the {COBRA Toolbox} v2.0}, + Volume = {6}, + Year = {2011}, + Bdsk-Url-1 = {http://dx.doi.org/10.1038/nprot.2011.308}} + +@article{Bornstein:2008uq, + Abstract = {LibSBML is an application programming interface library for reading, writing, manipulating and validating content expressed in the Systems Biology Markup Language (SBML) format. It is written in ISO C and C++, provides language bindings for Common Lisp, Java, Python, Perl, MATLAB and Octave, and includes many features that facilitate adoption and use of both SBML and the library. Developers can embed libSBML in their applications, saving themselves the work of implementing their own SBML parsing, manipulation and validation software. AVAILABILITY: LibSBML 3 was released in August 2007. Source code, binaries and documentation are freely available under LGPL open-source terms from http://sbml.org/software/libsbml.}, + Author = {Bornstein, Benjamin J and others}, + Date-Added = {2010-06-04 14:52:52 +0200}, + Date-Modified = {2010-06-10 15:09:30 +0200}, + Doi = {10.1093/bioinformatics/btn051}, + Journal = {Bioinformatics}, + Journal-Full = {Bioinformatics (Oxford, England)}, + Mesh = {Algorithms; Computer Simulation; Models, Biological; Programming Languages; Proteome; Signal Transduction; Software; Systems Biology; User-Computer Interface}, + Month = {Mar}, + Number = {6}, + Pages = {880--881}, + Pmc = {PMC2517632}, + Pmid = {18252737}, + Pst = {ppublish}, + Title = {{LibSBML: an API library for SBML}}, + Volume = {24}, + Year = {2008}, + Bdsk-Url-1 = {http://dx.doi.org/10.1093/bioinformatics/btn051}} -- GitLab