generateReleaseVector: Make List of Modified Mosquito Releases

Description Usage Arguments Examples

View source: R/MGDrivE-Releases.R

Description

Sets up a release schedule for a single patch, calls basicRepeatedReleases internally.

Usage

1
generateReleaseVector(driveCube, releasesParameters, nameGenotypes = NULL)

Arguments

driveCube

Gene-drive cube

releasesParameters

A list containing the releasesStart, releasesNumber releasesInterval, and releaseProportion named values.

nameGenotypes

Optional list to specify different genotypes for egg/male/female releases. This is required for mated female releases. This parameter overrides the default release type.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# setup a drive cube, using Mendelian as the example
cube <- cubeMendelian()

# setup release parameter list
#  releasesStart is the time of first release
#  releasesNumber is the number of releases
#  releasesInterval is the number of days between releases
#  releaseProportion is the number of mosquitoes released
relParams <- list(releasesStart = 25, releasesNumber = 1,
                  releasesInterval = 0, releaseProportion = 10)

# generate male releases
mRelVec <- generateReleaseVector(driveCube = cube,
                                 releasesParameters = relParams)

# generate mated female releases
fRelVec <- generateReleaseVector(driveCube = cube,
                                 releasesParameters = relParams,
                                 nameGenotypes = list(c("AA","AA", 10),
                                                      c("AA","aa", 10)))

MGDrivE documentation built on Oct. 23, 2020, 7:28 p.m.