scenario: Checks input list for problems and throw an error or returns...

Description Usage Arguments Details Value

View source: R/scenario.R

Description

The main goal of this function is to perform sanity checks on a scenario specification and to provide documentation for the input parameters

Usage

1
2
3
4
5
6
7
8
  scenario(timeStep, timeStop, systemName,
    systemDescription, kBase, treatments, N_S, offStrains,
    stochasticEventThresholdSource = function() {
        runif(1) }, mutMat = NULL,
    mutationAcceleration = 1, Td = 0.5, er = 10^(-4),
    mu_T = 0.02, mu_P = 0.5, S_T = 2 * 10^8, f = 0.37,
    deathThreshold = 0.01, offThreshold = 0.1,
    deathModifier = 1.001, newStrainLevel = 1)

Arguments

timeStep

The size of the steps in the output data

timeStop

Run the system until this time

systemName

A name for the system

systemDescription

A description for the system

kBase

Fitnesses of the different strains.

treatments

The treatment specification. A list of lists. Each inner list is the details of a single treatment regine. When did it start (t), How how does the patient adhere (A) and how suceptible is each strain to this treatment? (Ts) (vector with susceptibility for each strain). The outer list loops over each regime change.

mutationAcceleration

A factor that accellerates the rate of mutaton. Needed to get the timescales for when mutations arises right

Td

Tcell depletion - ratio of pre-infected to post-infected equilibria. It also sets the scale for the acceptible range of the relative fitnesses of the strains.

N_S

Number of strains in system

offStrains

Strains not present in the initial system

stochasticEventThresholdSource

A function that returns the threshold used to determine if a mutation occurred

mutMat

The mutation matrix.

er

The error rate when transcription occurs

mu_T

The death rate for healthy T Cells

mu_P

The death rate of infected T Cells

S_T

The replenishment rate of T Cells

f

The faithful transcription probability for a single virus replication

deathThreshold

Any strain with a population below this will be treated as extinct

offThreshold

Any strain that decreases below this level will be made extinct (by triggering an event) in the next time step.

deathModifier

When a strain is made extinct, it is population is set to deathThreshold / deathModifier

newStrainLevel

When a strain arises from a mutation, its initial population will be set to this value

Details

When the effective invasion rates are computed kBase*(1 - Ts*A), then the effective invasion rates must be greater than Td and smaller than 1. Where Ts is the treatment suceptibility and A is the treatment effect

The mutMat mutation matrix contains the number of mutation event that must occur to mutate from one strain to another. mutMat = [ E_ij ]. E_ii = 0 since no mutation is required if the exact same strain is replicated. E_ij = 1 if a single mutation is required to mutate from strain i to strain j. Likewise E_ij = 2 of two mutations are required to mutate from strain i to j and so forth. E_ij = E_ji since mutating from strain i to j requires the same number of mutations as mutating from strain j to i. Infinite values are allow to indicate impossible mutations

mutationAcceleration and Td will both be retired. Setting them away from default values will cause warnings.

Value

A list with validated parameter settings


philliplab/hdsResistanceModel documentation built on May 25, 2019, 5:05 a.m.