From 69dc3fd2852e358ff6fca3a83f68a7e17c732bdb Mon Sep 17 00:00:00 2001
From: Claus Jonathan Fritzemeier <clausjonathan.fritzemeier@hhu.de>
Date: Fri, 22 Jun 2018 12:54:00 +0200
Subject: [PATCH] corrections for cran submission

---
 DESCRIPTION                      |  4 +-
 R/mergeReact2Modelorg.R          |  2 +-
 R/reactClass.R                   | 52 +++++++++----------
 README.md                        |  2 +-
 inst/NEWS.Rd                     | 12 ++++-
 man/addReact.Rd                  | 20 ++++++--
 man/modelorg-class.Rd            | 88 ++++++++++++++++++++++++++++++++
 man/optsol_blockedReact-class.Rd |  1 -
 man/printReaction-methods.Rd     |  5 ++
 9 files changed, 148 insertions(+), 38 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index 1ea3272..d84c1c9 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 2f4f586..0c7cb3a 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 029bf1a..29ac5e8 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 4ddeacb..105f078 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 a841bbc..a6c0a7e 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 2470300..597e078 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 dfeb47d..ad83d5f 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 4f0450b..2a611e2 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 715779a..e4e1880 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}}.
+    }
   }
 }
 
-- 
GitLab