From 36c80bc83897c84adad8716e0dc6b9b5100cce37 Mon Sep 17 00:00:00 2001 From: Claus Jonathan Fritzemeier <clausjonathan.fritzemeier@hhu.de> Date: Fri, 24 Mar 2017 16:14:56 +0100 Subject: [PATCH] bug in mod2irrev when models have one gene only --- DESCRIPTION | 6 +++--- R/mod2irrev.R | 2 +- inst/NEWS.Rd | 6 ++++++ man/checkOptSol-methods.Rd | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e0b94d9..a1ac9ad 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: sybil Type: Package Title: Efficient Constrained Based Modelling in R -Version: 2.0.1 -Date: 2016-05-25 +Version: 2.0.2 +Date: 2017-03-24 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")), @@ -53,7 +53,7 @@ Collate: generics.R validmodelorg.R validoptsol.R validreactId.R sysBiolAlg_lmomaClass.R sysBiolAlg_momaClass.R sysBiolAlg_mtfClass.R sysBiolAlg_mtfEasyConstraintClass.R sysBiolAlg_roomClass.R sybilLogClass.R upgradeModelorg.R -Packaged: 2016-05-25 12:34:14 UTC; jonathan +Packaged: 2017-03-24 12:34:14 UTC; jonathan Author: C. Jonathan Fritzemeier [cre, ctb], Gabriel Gelius-Dietrich [aut], Rajen Piernikarczyk [ctb], diff --git a/R/mod2irrev.R b/R/mod2irrev.R index 0d63548..658b10a 100644 --- a/R/mod2irrev.R +++ b/R/mod2irrev.R @@ -245,7 +245,7 @@ mod2irrev <- function(model, exex = FALSE) { allGenes(modelIr) <- allGenes(model) rxnG_temp <- rxnGeneMat(model) - rxnG_temp <- rxnG_temp[irrev2rev(modelIr),] + rxnG_temp <- rxnG_temp[irrev2rev(modelIr), ,drop=FALSE] #rxnG_temp <- rxnG_temp[irrev2rev,] rxnGeneMat(modelIr) <- rxnG_temp diff --git a/inst/NEWS.Rd b/inst/NEWS.Rd index 7e44a59..c98743f 100644 --- a/inst/NEWS.Rd +++ b/inst/NEWS.Rd @@ -6,6 +6,12 @@ \newcommand{\CRANpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}} +\section{Changes in version 2.0.2 2017-03-24}{ + \itemize{ + \item The function \code{mod2irrev} crashed when using models with just one gene. + } +} +% ---------------------------------------------------------------------------- % \section{Changes in version 2.0.1 2016-07-05}{ \itemize{ \item After \code{rmReact} the columns of \code{rxnGeneMat} and diff --git a/man/checkOptSol-methods.Rd b/man/checkOptSol-methods.Rd index ae86bd4..35afd4e 100644 --- a/man/checkOptSol-methods.Rd +++ b/man/checkOptSol-methods.Rd @@ -50,7 +50,7 @@ } \value{ - TRUE or FALSE if \code{onlywarn} is set to TRUE, otherwisw an object of class + TRUE or FALSE if \code{onlywarn} is set to TRUE, otherwise an object of class \code{\linkS4class{checksol}}. } -- GitLab