-
Notifications
You must be signed in to change notification settings - Fork 0
/
nqhp_model.Rmd
254 lines (206 loc) · 5.32 KB
/
nqhp_model.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
---
title: "Gut parasite disease transmission model in host-trematode systems with explicit nutrient exchange and recycling"
author: |
| Matt Malishev, Emory University, USA
| David Civitello, Emory University, USA
| J. Trevor Vannatta, Purdue University, USA
#bibliography:/Users/malishev/Documents/Melbourne Uni/Thesis_2016/library.bib
fontsize: 10
geometry: margin=1in
documentclass: article
linkcolor: pink
urlcolor: blue
citecolor: red
output:
html_document:
highlight: tango
code_folding: hide
toc: yes
toc_depth: 4
number_sections: no
toc_float: yes
pdf_document:
includes:
in_header: # add .tex file with header content
highlight: tango
template: null
toc: yes
toc_depth: 4
number_sections: false
fig_width: 4
fig_height: 5
fig_caption: true
df_print: tibble
citation_package: biblatex # natbib
latex_engine: xelatex #pdflatex # lualatex
keep_tex: true # keep .tex file in dir
word_document:
highlight: tango
keep_md: yes
pandoc_args: --smart
#reference: mystyles.docx
toc: yes
toc_depth: 4
inludes:
before_body: before_body.tex
subtitle:
tags:
- nothing
- nothingness
params:
dir: "/Users/malishev/Documents/Emory/research/workshops/stl/model"
date: !r Sys.Date()
version: !r getRversion()
email: "[email protected]"
doi: https://github.com/darwinanddavis/tictactoe
classoption: portrait
# ^['https://github.com/darwinanddavis/UsefulCode'] # footnote
vignette: >
%\VignetteIndexEntry{tictactoe}
%\VignetteEncoding{UTF-8}
%\VignetteEngine{knitr::rmarkdown}
---
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ TeX: { equationNumbers: {autoNumber: "all"} } });
</script>
```{r echo = FALSE}
# library(rmarkdown)
# setwd("")
# f <- list.files()[1]
# render(f, output_format='pdf_document')
```
```{r, set-options, echo = FALSE, cache = FALSE}
options(width=100)
knitr::opts_chunk$set(
eval = F, # run all code
# echo = FALSE, # show code chunks in output
comment = "",
tidy.opts=list(width.cutoff=100), # set width of code chunks in output
tidy=TRUE, # make output as tidy
message = FALSE, # mask all messages
warning = FALSE, # mask all warnings
size="small" # set code chunk size
)
# https://github.com/ucb-stat133/stat133-fall-2016/blob/master/hws/hw02-tables-ggplot.Rmd
knitr::opts_knit$set(root.dir=paste0(params$dir,"/")) # set working dir
setwd(paste0(params$dir,"/")) # for running just in R not knitr
```
\
Date: `r params$date`
`R` version: `r params$version`
*Corresponding author: `r params$email`
\newpage
## Overview
A disease transmission consumer-resource model for host populations exposed to and infected by gut parasites that tracks growth of food (autotrophs) in the environment, quantity (biomass) and quality (nutrient levels) of food consumed by hosts, within-host parasite biomass of infected host populations, and nutrient recycling back into the environment that is explicit in the ratio of carbon to total nutrient biomass.
## Methods
### Model description
**State variables (units = nutrient biomass)**
$N$ = nutrients in the landscape (biomass)
$R$ = food in the landscape (food biomass)
$Q_R$ = nutrient quota in food source (nutrient/carbon ratio)$Q_F \cdot$ is total nutrients in food.
$H$ = host consumer population (host biomass)
$Q_H$ = nutrient quota in hosts (nutrient/carbon ratio)
$P$ = parasite population (within-host parasite biomass)
**Parameters**
$\alpha$ = virulence
$d_H$ = death rate of hosts
$d_P$ = death rate of parasites
$l$ = nutrient loss
$m_F$ = maximum food biomass
$m_H$ maximum host biomass
$\mu_M$ = maximum uptake rate of biomass
$F$ = carbon biomass in food biomass
$Q_R$ = nutrient to carbon $(\frac{N}{C})$ ratio in food biomass, so that $Q_R \cdot R$ is the nutrient level in food biomass.
![Figure 1. Model schematic with state variables](img/gutworm_model_schematic.png)
\newpage
## State variable ODEs
### Nutrient growth (biomass) (Eq. 1)
$$
\frac
{dN}
{dt} =
a -
\mu_M(1 - \frac{m_F}{Q_F})FQ_F +
Recycling -
l
$$
\
\
where the $\mu_M(1 - \frac{m_F}{Q_F})$ term is the quota of nutrient uptake based on a functional uptake response.
\
\
### Food growth (biomass) (Eq. 2)
\
\
$$
\frac
{dF}
{dt} =
\mu_MF(1 -
\frac
{m_F}
{Q_F}) -
f F H
$$
\
\
### Nutrient quota of food source (Eq. 3)
\
\
$$
\frac
{dQ_F}
{dt} =
\mu_M N \text (r) -
\mu_M Q_F(1 - \frac
{m_F}
{Q_F})
$$
\
\
### Host population growth (host biomass) (Eq. 4)
\
\
$$
\frac
{dH}
{dt} =
e Q_F f F H -
d_H H -
\alpha P
$$
where $\alpha P$ is the virulence level.
\
\
### Nutrient quota in hosts (nutrient/carbon ratio) (Eq. 5)
\
\
$$
\frac
{dQ_H}
{dt} =
e Q_F f F H -
\mu_M Q_H (1 - \frac
{m_H}
{Q_H})
$$
The $e Q_F f F H$ term are the recycled nutrients feeding back into the $N$ biomass (Eq. 1).
\
\
### Parasite population (within-host parasite biomass) (Eq. 6)
\
\
$$
\frac
{dP}
{dt} =
e Q_H P H -
d_P P -
\alpha(\frac
{P^2}
{H})
\cdot (\frac
{k + 1}
{k})
$$
The $e Q_H$ terms is for body tissue parasites. This term will change to $e Q_F$ if it becomes a gut parasite. The $\alpha(\frac{P^2}{H})\cdot (\frac{k + 1} {k})$ term is the virulence level.