Skip to content
Permalink
Browse files

bacarena 1.8 cran release

  • Loading branch information...
jotech committed Feb 15, 2019
1 parent 5082cc6 commit 5f1606cf33ba97020a107ddb136b9177ae49cd29
Showing with 36 additions and 12 deletions.
  1. +2 −2 DESCRIPTION
  2. +11 −0 NEWS
  3. +1 −1 R/Arena.R
  4. +1 −1 R/BacArena.R
  5. +1 −1 R/Organism.R
  6. +1 −1 examples/dev.R
  7. +7 −2 examples/ecoli.R
  8. +3 −1 examples/sihumi_test.R
  9. +2 −0 man/chemotaxis.Rd
  10. +1 −1 man/findrBiomass.Rd
  11. +3 −1 man/plotGrowthCurve.Rd
  12. +3 −1 man/plotSpecActivity.Rd
@@ -1,6 +1,6 @@
Package: BacArena
Title: Modeling Framework for Cellular Communities in their Environments
Version: 1.7
Version: 1.8
Authors@R: c( person("Eugen", "Bauer", , "eugen.bauer@uni.lu", role = c("aut")),
person("Johannes", "Zimmermann", , "j.zimmermann@iem.uni-kiel.de", role = c("aut", "cre")))
Author: Eugen Bauer [aut],
@@ -37,7 +37,7 @@ Suggests:
LinkingTo: Rcpp,
RcppArmadillo,
RcppEigen
License: GPL-3
License: GPL-3 | file LICENSE
VignetteBuilder: knitr
RoxygenNote: 6.1.0
LazyData: true
11 NEWS
@@ -1,3 +1,14 @@
BacArena v.1.8 (Release data: 2019-02-15)
Changes:
- improved detection of limiting substances (shadow costs)
- shadow costs analysis now possible with cplex, too
- support for non-default objective functions
- fixed interaction finding in findfeeding3()
- occupied arena cells valid also for human cells (bug in emptyHood)

* github reference: https://github.com/euba/BacArena/releases/tag/v1.8


BacArena v.1.7 (Release date: 2018-05-09)
==============
Changes:
@@ -230,7 +230,7 @@ setMethod("addOrg", "Arena", function(object, specI, amount=1, x=NULL, y=NULL, p
neworgdat[(lastind+1):(amount+lastind),'type']=rep(type, amount)
neworgdat[(lastind+1):(amount+lastind),'phenotype']=rep(NA, amount)
}else{
if(x<1 || x>n || y<1 || y>m){stop("The positions of the individuals are beyond the dimensions of the environment.")}
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.")}
neworgdat[(lastind+1):(amount+lastind),'x']=x
neworgdat[(lastind+1):(amount+lastind),'y']=y
if(is.numeric(biomass)) neworgdat[(lastind+1):(amount+lastind),'biomass'] = rep(biomass, amount)
@@ -22,5 +22,5 @@ NULL


.onAttach <- function(libname, pkgname) {
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")
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")
}
@@ -832,7 +832,7 @@ setMethod("growth_par", "Bac", function(object, population, j, fbasol, tstep){
#' @param population An object of class Arena.
#' @param j The number of the iteration of interest.
#' @param chemo The vector that contains the prefered substrate.

#' @param occupyM A matrix indicating grid cells that are obstacles
#' @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.
#' @seealso \code{\link{Bac-class}} and \code{\link{emptyHood}}
#' @examples
@@ -13,7 +13,7 @@ devtools::document()

devtools::check() # includes document()

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


@@ -1,15 +1,20 @@
library(BacArena)
data("Ec_core")

SYBIL_SETTINGS("SOLVER", "cplexAPI")
#SYBIL_SETTINGS("SOLVER", "glpkAPI")

bac <- Bac(Ec_core)
arena <- Arena(n=20, m=20)
arena <- addOrg(arena,bac,amount=20)
arena <- addSubs(arena, smax=0.005, mediac="EX_glc(e)", unit="mM")
arena <- addSubs(arena, smax=1, mediac=c("EX_pi(e)", "EX_h2o(e)",
"EX_o2(e)", "EX_nh4(e)"), unit="mM")
sim <- simEnv(arena, time=5, with_shadow = T, sec_obj = T)
sim <- simEnv(arena, time=5, with_shadow = T, sec_obj = F)

getSubHist(sim, "EX_glc(e)")

sim@shadowlist[[3]]
plotShadowCost(sim, 1)[[2]]
plotShadowCost(sim, 1)[[2]] # fru, glc -2

plotGrowthCurve(sim.old)
@@ -1,4 +1,5 @@
library(BacArena)
SYBIL_SETTINGS("SOLVER", "cplexAPI")

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

save(sihumi_test, file = "~/uni/bacarena/data/sihumi_test.rda")
#save(sihumi_test, file = "~/uni/bacarena/data/sihumi_test.rda")
#load("~/uni/bacarena/data/sihumi_test.rda")

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

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

0 comments on commit 5f1606c

Please sign in to comment.
You can’t perform that action at this time.