Skip to content
R C++ M4
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R
data
inst
man
src
tools
.Rbuildignore
.gitlab-ci.yml
DESCRIPTION
LICENSE
NAMESPACE
README.md
configure
configure.ac

README.md

pipeline status


output: pdf_document: default word_document: default html_document: default

R package landsepi

Landscape Epidemiology and Evolution

Description

A spatio-temporal stochastic model to assess resistance deployment strategies against plant pathogens. The model is based on stochastic geometry for describing the landscape and the resistant hosts, a dispersal kernel for the dissemination of the pathogen, and a SEIR (Susceptible-Exposed-Infectious-Removed) architecture to simulate plant response to disease.

Authors

Institutes :

People :

License

The package landsepi is under GNU GPL V2.
See LICENSE file.

References

When referencing the simulation model, please cite the following article:

Rimbaud L., Papaïx J., Rey J.-F., Barrett L. G. and Thrall P. H. (2018). Assessing the durability and efficiency of landscape-based strategies to deploy plant resistance to pathogens. \emph{PLoS Computational Biology} 14(4):e1006067. https://doi.org/10.1371/journal.pcbi.1006067.

When referencing the R package, please cite the following package:

Rimbaud L., Papaïx J. and Rey J.-F. (2018). landsepi: Landscape Epidemiology and Evolution. R package, url: https://cran.r-project.org/package=landsepi.

Installation

Configuration and dependencies

Read file "DESCRIPTION" for details on configuration requirements (with linux and R).
The package for compiling needs g++, gsl dev library, gdal dev library >= 2.0.0, and ffmpeg (for videos).

Under Linux OS:

sudo apt-get install g++ libgsl2 libgsl-dev gdal-bin libgdal-dev ffmpeg

Under Windows use the zip.

You can install Rtools and get gdal sources and compile it under Windows.

R packages dependencies :

  • Rcpp
  • sp
  • rgdal
  • Matrix
  • MASS
  • rgeos
  • maptools
  • fields
  • splancs
  • sf

To install :

install.packages(c("Rcpp","sp","rgdal","Matrix","MASS","rgeos","maptools","fields","splancs","sf"))

Install landsepi

To install the last version :

# linux
R CMD INSTALL landsepi_*.*.*.tar.gz
# windows
R CMD INSTALL landsepi_*.*.*.zip

Development

Generate documentation before build and install

Open R :

library(Rcpp)
library(roxygen2)
Rcpp::compileAttributes(pkg=".")
roxygen2::roxygenize('.', roclets=c('rd', 'namespace'))

Build and install the package

R CMD build . --resave-data
R CMD check --as-cran landsepi_*.*.*.tar.gz
R CMD INSTALL landsepi_*.*.*tar.gz

For debug mode :

R CMD INSTALL landsepi_*.*.*.tar.gz --with-keep.source --configure-args="--enable-debug=yes"

Package users: Running simulations

Documentation and demonstration

A complete description of the package and its functions is provided in the R documentation. Open R:

library(landsepi)
??landsepi   
## select <landsepi::landsepi-package> for a complete description of the package

Run a demonstration (a 30-year simulation of a mosaic deployment strategy of two resistant cultivars in balanced proportions and high level of spatial aggregation):

demo_landsepi()

Simulations with data included in the package

The package includes 5 landscape structures and a parameterisation to represent plant pathogens as typified by rusts of cereal crops (e.g. stripe rust, stem rust and leaf rust of wheat and barley). These data can be used to simulate the deployment of plant resistance in an agricultural lansdcape in the context of biotrophic foliar pathogens of cereal crops. The R documentation provides details on all parameters.

## complete description of the parameters
?simul_landsepi 
## Default parameterisation (5-year simulation of a mosaic deployment strategy 
## of two resistant cultivars in balanced proportions and high level of 
## spatial aggregation
simul_landsepi()

Strategies combining qualitative and quantitative resistance

Examples of combinations in a 50-year period using landscape #1:

## Combination of two major resistance genes
simul_landsepi(seed=1, idLan=1, nYears=50, strat="PY", nHost=2
    , propSR=0.8, isolSR=1, resistance1=c(1,1,0,0,0,0,0,0)
    , costInfect=0.5, MGeff=1.0, taumut=1e-7)
    
## Combination major gene and quantitative resistance against infection rate
simul_landsepi(seed=1, idLan=1, nYears=50, strat="PY", nHost=2
    , propSR=0.8, isolSR=1, resistance1=c(1,0,0,0,1,0,0,0), taumut=1e-7
    , costInfect=0.5, costAggr=0.5, MGeff=1.0, QReff=0.5, beta=1.0, nAggr=6)
    
## Combination major gene and quantitative resistance against latent period
simul_landsepi(seed=1, idLan=1, nYears=50, strat="PY", nHost=2
    , propSR=0.8, isolSR=1, resistance1=c(1,0,0,0,0,1,0,0), taumut=1e-7
    , costInfect=0.5, costAggr=0.5, MGeff=1.0, QReff=0.5, beta=1.0, nAggr=6)
    
## Combination major gene and quantitative resistance against sporulation rate
simul_landsepi(seed=1, idLan=1, nYears=50, strat="PY", nHost=2
    , propSR=0.8, isolSR=1, resistance1=c(1,0,0,0,0,0,1,0), taumut=1e-7
    , costInfect=0.5, costAggr=0.5, MGeff=1.0, QReff=0.5, beta=1.0, nAggr=6)
    
## Combination major gene and quantitative resistance against sporulation duration
simul_landsepi(seed=1, idLan=1, nYears=50, strat="PY", nHost=2
    , propSR=0.8, isolSR=1, resistance1=c(1,0,0,0,0,0,0,1), taumut=1e-7
    , costInfect=0.5, costAggr=0.5, MGeff=1.0, QReff=0.5, beta=1.0, nAggr=6)

Spatiotemporal strategies to deploy 2 major resistance genes

Examples of spatiotemporal strategies in a 50-year period using landscape #1:

## Mosaic
simul_landsepi(seed=1, idLan=1, nYears=50, propSR=2/3, strat="MO", nHost=3
    , isolSR=3, propRR=1/2, isolRR=3
    , resistance1=c(1,0,0,0,0,0,0,0), resistance2=c(0,1,0,0,0,0,0,0)
    , costInfect=0.5, taumut=1e-7)
    
## Mixture
simul_landsepi(seed=1, idLan=1, nYears=50, strat="MI", nHost=3
    , propSR=2/3, isolSR=3, propRR=1/2
    , resistance1=c(1,0,0,0,0,0,0,0), resistance2=c(0,1,0,0,0,0,0,0)
    , costInfect=0.5, taumut=1e-7)
    
## Rotations
simul_landsepi(seed=1, idLan=1, nYears=50, strat="RO", nHost=3
    , propSR=2/3, isolSR=3, isolRR=1
    , resistance1=c(1,0,0,0,0,0,0,0), resistance2=c(0,1,0,0,0,0,0,0)
    , costInfect=0.5, taumut=1e-7)
    
## Pyramiding
simul_landsepi(seed=1, idLan=1, nYears=50, strat="PY", nHost=2
    , propSR=2/3, isolSR=3, resistance1=c(1,1,0,0,0,0,0,0)
    , costInfect=0.5, taumut=1e-7)

Simulation with other data

It is possible to use any landscape stored in a shapefile, and parameterise to model to any other pathosystem. For this, users need to use the following functions: (1) AgriLand: to allocate the different cultivars in the fields of the landscape within a specific spatiotemporal deployment of resistance; (2) model_landsepi: to run the demo-genetic simulation model; (3) HLIRdynamics: to generate epidemiological and evolutionary outputs. See R documentation to see how to use these functions.

?AgriLand       ## Allocation of cultivars in the landscape
?model_landsepi  ## Run the demo-genetic model
?HLIRdynamics   ## Generate the output

Future versions

Future versions of the package will include a more generic parameterisation of the functions. In particular, the package will allow the allocation of more than 3 cultivars with different genotypes in the landscape.

You can’t perform that action at this time.