Skip to content

Commit 5f1606c

Browse files
committed
bacarena 1.8 cran release
1 parent 5082cc6 commit 5f1606c

12 files changed

+36
-12
lines changed

DESCRIPTION

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: BacArena
22
Title: Modeling Framework for Cellular Communities in their Environments
3-
Version: 1.7
3+
Version: 1.8
44
Authors@R: c( person("Eugen", "Bauer", , "eugen.bauer@uni.lu", role = c("aut")),
55
person("Johannes", "Zimmermann", , "j.zimmermann@iem.uni-kiel.de", role = c("aut", "cre")))
66
Author: Eugen Bauer [aut],
@@ -37,7 +37,7 @@ Suggests:
3737
LinkingTo: Rcpp,
3838
RcppArmadillo,
3939
RcppEigen
40-
License: GPL-3
40+
License: GPL-3 | file LICENSE
4141
VignetteBuilder: knitr
4242
RoxygenNote: 6.1.0
4343
LazyData: true

NEWS

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
BacArena v.1.8 (Release data: 2019-02-15)
2+
Changes:
3+
- improved detection of limiting substances (shadow costs)
4+
- shadow costs analysis now possible with cplex, too
5+
- support for non-default objective functions
6+
- fixed interaction finding in findfeeding3()
7+
- occupied arena cells valid also for human cells (bug in emptyHood)
8+
9+
* github reference: https://github.com/euba/BacArena/releases/tag/v1.8
10+
11+
112
BacArena v.1.7 (Release date: 2018-05-09)
213
==============
314
Changes:

R/Arena.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ setMethod("addOrg", "Arena", function(object, specI, amount=1, x=NULL, y=NULL, p
230230
neworgdat[(lastind+1):(amount+lastind),'type']=rep(type, amount)
231231
neworgdat[(lastind+1):(amount+lastind),'phenotype']=rep(NA, amount)
232232
}else{
233-
if(x<1 || x>n || y<1 || y>m){stop("The positions of the individuals are beyond the dimensions of the environment.")}
233+
if( any(x<1) || any(x>n) || any(y<1) || any(y>m) ){stop("The positions of the individuals are beyond the dimensions of the environment.")}
234234
neworgdat[(lastind+1):(amount+lastind),'x']=x
235235
neworgdat[(lastind+1):(amount+lastind),'y']=y
236236
if(is.numeric(biomass)) neworgdat[(lastind+1):(amount+lastind),'biomass'] = rep(biomass, amount)

R/BacArena.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ NULL
2222

2323

2424
.onAttach <- function(libname, pkgname) {
25-
packageStartupMessage("BacArena paper: https://doi.org/10.1371/journal.pcbi.1005544\n Tutorial: https://CRAN.R-project.org/package=BacArena/vignettes/BacArena-Introduction.pdf\n Development and help: https://github.com/euba/bacarena")
25+
packageStartupMessage("BacArena paper: https://doi.org/10.1371/journal.pcbi.1005544\n Tutorials: https://bacarena.github.io\n Model import from SBML: https://github.com/euba/BacArena/wiki/Model-import\n Development and help: https://github.com/euba/bacarena")
2626
}

R/Organism.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ setMethod("growth_par", "Bac", function(object, population, j, fbasol, tstep){
832832
#' @param population An object of class Arena.
833833
#' @param j The number of the iteration of interest.
834834
#' @param chemo The vector that contains the prefered substrate.
835-
835+
#' @param occupyM A matrix indicating grid cells that are obstacles
836836
#' @details Bacteria move to a position in the Moore neighbourhood which has the highest concentration of the prefered substrate, which is not occupied by other individuals. The prefered substance is given by slot \code{chem} in the \code{Bac} object. If there is no free space the individuals stays in the same position. If the concentration in the Moore neighbourhood has the same concentration in every position, then random movement is implemented.
837837
#' @seealso \code{\link{Bac-class}} and \code{\link{emptyHood}}
838838
#' @examples

examples/dev.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ devtools::document()
1313

1414
devtools::check() # includes document()
1515

16-
install_local(path="~/uni/bacarena", quick=TRUE, threads=2, quiet=F)
16+
install_local(path="~/uni/bacarena", quick=TRUE, threads=2, quiet=F, force=T)
1717
#install_github(repo="euba/bacarena", quick=TRUE)
1818

1919

examples/ecoli.R

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
library(BacArena)
22
data("Ec_core")
33

4+
SYBIL_SETTINGS("SOLVER", "cplexAPI")
5+
#SYBIL_SETTINGS("SOLVER", "glpkAPI")
6+
47
bac <- Bac(Ec_core)
58
arena <- Arena(n=20, m=20)
69
arena <- addOrg(arena,bac,amount=20)
710
arena <- addSubs(arena, smax=0.005, mediac="EX_glc(e)", unit="mM")
811
arena <- addSubs(arena, smax=1, mediac=c("EX_pi(e)", "EX_h2o(e)",
912
"EX_o2(e)", "EX_nh4(e)"), unit="mM")
10-
sim <- simEnv(arena, time=5, with_shadow = T, sec_obj = T)
13+
sim <- simEnv(arena, time=5, with_shadow = T, sec_obj = F)
1114

1215
getSubHist(sim, "EX_glc(e)")
1316

1417
sim@shadowlist[[3]]
15-
plotShadowCost(sim, 1)[[2]]
18+
plotShadowCost(sim, 1)[[2]] # fru, glc -2
19+
20+
plotGrowthCurve(sim.old)

examples/sihumi_test.R

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
library(BacArena)
2+
SYBIL_SETTINGS("SOLVER", "cplexAPI")
23

34
#sihumi <- readRDS("~/uni/dat/mod/r/sihumi.RDS")
45
#latest_agora <- readRDS("~/uni/dat/mod/r/agora1.01.western.SWcorr.RDS")
@@ -16,7 +17,8 @@ for(i in seq_along(sihumi)){
1617
}
1718
sihumi_test <- simEnv(arena, time=7, sec_obj = "mtf", with_shadow = T)
1819

19-
save(sihumi_test, file = "~/uni/bacarena/data/sihumi_test.rda")
20+
#save(sihumi_test, file = "~/uni/bacarena/data/sihumi_test.rda")
21+
#load("~/uni/bacarena/data/sihumi_test.rda")
2022

2123
plotGrowthCurve(sihumi_test)[[1]]
2224
plotSpecActivity(sihumi_test)[[2]]

man/chemotaxis.Rd

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/findrBiomass.Rd

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/plotGrowthCurve.Rd

+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/plotSpecActivity.Rd

+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)