diff --git a/DESCRIPTION b/DESCRIPTION index 1ea327271ab20571f46eef746538556cd0514256..d84c1c9bc08bed830bca2999d34fda4218076a6e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: sybil Type: Package Title: Efficient Constrained Based Modelling in R Version: 2.1.1 -Date: 2018-03-26 +Date: 2018-05-14 Authors@R: c( person(c("C.", "Jonathan"), "Fritzemeier", role = c("cre", "ctb"), email = "clausjonathan.fritzemeier@uni-duesseldorf.de"), person("Gabriel", "Gelius-Dietrich", role = c("aut")), @@ -55,7 +55,7 @@ Collate: generics.R validmodelorg.R validoptsol.R validreactId.R validreact.R sysBiolAlg_mtfClass.R sysBiolAlg_mtfEasyConstraintClass.R sysBiolAlg_roomClass.R sybilLogClass.R upgradeModelorg.R mergeReact2Modelorg.R -Packaged: 2018-03-26 12:34:14 UTC; jonathan +Packaged: 2018-05-14 12:34:14 UTC; jonathan Author: C. Jonathan Fritzemeier [cre, ctb], Gabriel Gelius-Dietrich [aut], Rajen Piernikarczyk [ctb], diff --git a/R/mergeReact2Modelorg.R b/R/mergeReact2Modelorg.R index 2f4f58644c0da9e9e241016d26b6baaad8734285..0c7cb3aab0676b98ee8695a2d4604f2ddae70613 100644 --- a/R/mergeReact2Modelorg.R +++ b/R/mergeReact2Modelorg.R @@ -35,7 +35,7 @@ #------------------------------------------------------------------------------# -# definition of the class mergeReact2Modelorg # +# definition of the function mergeReact2Modelorg # #------------------------------------------------------------------------------# diff --git a/R/reactClass.R b/R/reactClass.R index 029bf1a85c45af831ff15eb9384169be999280ad..29ac5e840e90261bfc93e37b90ee5cbf099a7c07 100644 --- a/R/reactClass.R +++ b/R/reactClass.R @@ -438,36 +438,34 @@ setMethod("printReaction", signature(object = "react"), mat <- s(object) reaction <- character(1) - for (j in seq(along = cind)) { - met <- met_id(object) - nzv <- mat - - ed <- nzv < 0 - pd <- nzv > 0 - - if (sum(ed) > 0) { - educt <- paste(paste("(", abs(nzv[ed]), ")", sep = ""), - met[ed], collapse = " + ") - } - else { - educt = "" - } - - if (sum(pd) > 0) { - product <- paste(paste("(", nzv[pd], ")", sep = ""), - met[pd], collapse = " + ") - } - else { - product = "" - } - - arrow <- ifelse(react_rev(object)[cind[j]], " <==> ", " --> ") - - reaction[j] <- paste(react_id(check)[j], - paste(educt, product, sep = arrow), sep = "\t") + met <- met_id(object) + nzv <- mat + + ed <- nzv < 0 + pd <- nzv > 0 + + if (sum(ed) > 0) { + educt <- paste(paste("(", abs(nzv[ed]), ")", sep = ""), + met[ed], collapse = " + ") + } + else { + educt = "" } + if (sum(pd) > 0) { + product <- paste(paste("(", nzv[pd], ")", sep = ""), + met[pd], collapse = " + ") + } + else { + product = "" + } + + arrow <- ifelse(react_rev(object), " <==> ", " --> ") + + reaction <- paste(react_id(object), + paste(educt, product, sep = arrow), sep = "\t") + if (isTRUE(printOut)) { cat("abbreviation\tequation", reaction, sep = "\n", ...) } diff --git a/README.md b/README.md index 4ddeacb919d4d63e2363c1a50ba2997f98a59168..105f078ac9a71e70be98118999a69b453b7b02db 100644 --- a/README.md +++ b/README.md @@ -5,4 +5,4 @@ The package sybil is a Systems Biology Library for R, implementing algorithms fo Please consider downloading and installing the package via the R internal package management: `install.packages("sybil")` -Alternatively you can visit the [CRAN pakage website](http://cran.r-project.org/package=sybil). +Alternatively you can visit the [CRAN pakage website](https://cran.r-project.org/package=sybil). diff --git a/inst/NEWS.Rd b/inst/NEWS.Rd index a841bbcceea70a93215c48610080d7a5e0496487..a6c0a7e0e7101c3b58fd42d56d362aeeb8f27231 100644 --- a/inst/NEWS.Rd +++ b/inst/NEWS.Rd @@ -4,7 +4,17 @@ \title{sybil News} \encoding{UTF-8} -\newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}} +\newcommand{\CRANpkg}{\href{https://CRAN.R-project.org/package=#1}{\pkg{#1}}} + +\section{Changes in version 2.1.1 2018-07-17}{ + \itemize{ + \item Package sybilSBML gets rejected on CRAN, but can be downloaded + at \url{http://www.cs.hhu.de/en/research-groups/computational-cell-biology/software.html}. + \item Documentation for \code{react-class} and related methods. + \ + } +} +% ---------------------------------------------------------------------------- % \section{Changes in version 2.1.0 2017-07-17}{ \itemize{ diff --git a/man/addReact.Rd b/man/addReact.Rd index 2470300238be767f106697b71ef271d54d8a27dc..597e0788d64c35b03d416e9527f0121559009a2c 100644 --- a/man/addReact.Rd +++ b/man/addReact.Rd @@ -1,8 +1,12 @@ -\name{addReact} -\alias{addReact} - +\name{addReact,modelorg-method} +\docType{methods} \encoding{utf8} + +\alias{addReact} +\alias{addReact,modelorg-method} +\alias{addReact,modelorg,ANY-method} + \title{ Add/Change Reactions in a Model } @@ -11,9 +15,15 @@ The function \code{addReact} adds one reaction to a metabolic model, or changes one reaction in a metabolic model. } - +\section{Methods}{ + \describe{ + \item{\code{addReact}:}{ + \code{signature(object = "modelorg")}: adds a new reaction to a \code{modelorg} object. + } + } +} \usage{ - addReact(model, +\S4method{addReact}{modelorg}(model, id, met, Scoef, diff --git a/man/modelorg-class.Rd b/man/modelorg-class.Rd index dfeb47d779bbd9cd0189f77d9ff4c2d13b05cad5..ad83d5f1a42ccdfe626c48f9eeefdcebd06f715f 100644 --- a/man/modelorg-class.Rd +++ b/man/modelorg-class.Rd @@ -139,6 +139,90 @@ \alias{version<-} \alias{version} +\alias{react-class} +\alias{react} +\alias{comp_attr,react-method} +\alias{comp_attr} +\alias{comp_attr<-,react-method} +\alias{comp_attr<-} +\alias{genes,react-method} +\alias{genes} +\alias{genes<-,react-method} +\alias{genes<-} +\alias{gpr,react-method} +\alias{gpr} +\alias{gpr<-,react-method} +\alias{gpr<-} +\alias{gprRule,react-method} +\alias{gprRule} +\alias{gprRule<-,react-method} +\alias{gprRule<-} +\alias{lowbnd,react-method} +\alias{lowbnd} +\alias{lowbnd<-,react-method} +\alias{lowbnd<-} +\alias{met_attr,react-method} +\alias{met_attr} +\alias{met_attr<-,react-method} +\alias{met_attr<-} +\alias{met_comp,react-method} +\alias{met_comp} +\alias{met_comp<-,react-method} +\alias{met_comp<-} +\alias{met_id,react-method} +\alias{met_id} +\alias{met_id<-,react-method} +\alias{met_id<-} +\alias{met_name,react-method} +\alias{met_name} +\alias{met_name<-,react-method} +\alias{met_name<-} +\alias{mod_attr,react-method} +\alias{mod_attr} +\alias{mod_attr<-,react-method} +\alias{mod_attr<-} +\alias{obj_coef,react-method} +\alias{obj_coef} +\alias{obj_coef<-,react-method} +\alias{obj_coef<-} +\alias{react_attr,react-method} +\alias{react_attr} +\alias{react_attr<-,react-method} +\alias{react_attr<-} +\alias{react_de,react-method} +\alias{react_de} +\alias{react_de<-,react-method} +\alias{react_de<-} +\alias{react_id,react-method} +\alias{react_id} +\alias{react_id<-,react-method} +\alias{react_id<-} +\alias{react_name,react-method} +\alias{react_name} +\alias{react_name<-,react-method} +\alias{react_name<-} +\alias{react_rev,react-method} +\alias{react_rev} +\alias{react_rev<-,react-method} +\alias{react_rev<-} +\alias{react_single,react-method} +\alias{react_single} +\alias{react_single<-,react-method} +\alias{react_single<-} +\alias{s,react-method} +\alias{s} +\alias{s<-,react-method} +\alias{s<-} +\alias{subSys,react-method} +\alias{subSys} +\alias{subSys<-,react-method} +\alias{subSys<-} +\alias{uppbnd,react-method} +\alias{uppbnd} +\alias{uppbnd<-,react-method} +\alias{uppbnd<-} + + \encoding{utf8} \title{Structure of Class "modelorg"} @@ -146,6 +230,10 @@ \description{ Structure of the class \code{"modelorg"}. Objects of that class are returned by functions like \code{\link{readTSVmod}}. + + Structure of the class \code{"react"}. This depicts a subset of a metabolic model + that contains only one reaction. Multiple \code{react} objects can be combined to an + \code{"modelorg"} object. } \section{Objects from the Class}{ diff --git a/man/optsol_blockedReact-class.Rd b/man/optsol_blockedReact-class.Rd index 4f0450be7700183b3a2be87f953bd530aee89247..2a611e2c419d6ed29dccbd9e158a207b21fa2e6e 100644 --- a/man/optsol_blockedReact-class.Rd +++ b/man/optsol_blockedReact-class.Rd @@ -11,7 +11,6 @@ \alias{blocked<-} \alias{react,optsol_blockedReact-method} \alias{react<-,optsol_blockedReact-method} -\alias{react} \alias{react<-} \alias{maxSol,optsol_blockedReact-method} \alias{minSol,optsol_blockedReact-method} diff --git a/man/printReaction-methods.Rd b/man/printReaction-methods.Rd index 715779ac2661ba3eca2a3e1f10a78952a0ceae79..e4e1880af15664da340698ef9bcccd3feea8d61e 100644 --- a/man/printReaction-methods.Rd +++ b/man/printReaction-methods.Rd @@ -7,6 +7,7 @@ \alias{printReaction-methods} \alias{printReaction,modelorg,ANY-method} \alias{printReaction,summaryOptsol,modelorg-method} +\alias{printReaction,react,ANY-method} \title{Print Columns of the Stoichiometric Matrix} @@ -17,6 +18,7 @@ \usage{ \S4method{printReaction}{modelorg,ANY}(object, react, printOut = TRUE, ...) \S4method{printReaction}{summaryOptsol,modelorg}(object, mod, j, ...) +\S4method{printReaction}{react,ANY}(object, printOut = TRUE, ...) } \section{Methods}{ @@ -27,6 +29,9 @@ \item{\code{signature(object = "summaryOptsol", mod = "modelorg")}}{ method to use with objects of class \code{\linkS4class{summaryOptsol}}. } + \item{\code{signature(object = "react", ...)}}{ + method to use with objects of class \code{\linkS4class{react}}. + } } }