-
Notifications
You must be signed in to change notification settings - Fork 0
/
snail_mesocosm.tex
430 lines (337 loc) · 14.6 KB
/
snail_mesocosm.tex
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
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
\documentclass[10,portrait]{article}
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\usepackage{fixltx2e} % provides \textsubscript
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\else % if luatex or xelatex
\ifxetex
\usepackage{mathspec}
\else
\usepackage{fontspec}
\fi
\defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
\fi
% use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
% use microtype if available
\IfFileExists{microtype.sty}{%
\usepackage[]{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\PassOptionsToPackage{hyphens}{url} % url is loaded by hyperref
\usepackage[unicode=true]{hyperref}
\PassOptionsToPackage{usenames,dvipsnames}{color} % color is loaded by hyperref
\hypersetup{
pdftitle={Mesocosm experiment plots},
colorlinks=true,
linkcolor=blue,
citecolor=red,
urlcolor=blue,
breaklinks=true}
\urlstyle{same} % don't use monospace font for urls
\usepackage[margin=1in]{geometry}
\usepackage[]{biblatex}
\usepackage{color}
\usepackage{fancyvrb}
\newcommand{\VerbBar}{|}
\newcommand{\VERB}{\Verb[commandchars=\\\{\}]}
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}}
% Add ',fontsize=\small' for more characters per line
\usepackage{framed}
\definecolor{shadecolor}{RGB}{248,248,248}
\newenvironment{Shaded}{\begin{snugshade}}{\end{snugshade}}
\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.13,0.29,0.53}{\textbf{#1}}}
\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.13,0.29,0.53}{#1}}
\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.00,0.00,0.81}{#1}}
\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.00,0.00,0.81}{#1}}
\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.00,0.00,0.81}{#1}}
\newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
\newcommand{\CharTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
\newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
\newcommand{\StringTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
\newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
\newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.31,0.60,0.02}{#1}}
\newcommand{\ImportTok}[1]{#1}
\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textit{#1}}}
\newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{#1}}}}
\newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{#1}}}}
\newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{#1}}}}
\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{#1}}
\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
\newcommand{\VariableTok}[1]{\textcolor[rgb]{0.00,0.00,0.00}{#1}}
\newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.13,0.29,0.53}{\textbf{#1}}}
\newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.81,0.36,0.00}{\textbf{#1}}}
\newcommand{\BuiltInTok}[1]{#1}
\newcommand{\ExtensionTok}[1]{#1}
\newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textit{#1}}}
\newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.77,0.63,0.00}{#1}}
\newcommand{\RegionMarkerTok}[1]{#1}
\newcommand{\InformationTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{#1}}}}
\newcommand{\WarningTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{\textbf{\textit{#1}}}}
\newcommand{\AlertTok}[1]{\textcolor[rgb]{0.94,0.16,0.16}{#1}}
\newcommand{\ErrorTok}[1]{\textcolor[rgb]{0.64,0.00,0.00}{\textbf{#1}}}
\newcommand{\NormalTok}[1]{#1}
\usepackage{graphicx,grffile}
\makeatletter
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
\makeatother
% Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{}
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
\usepackage[normalem]{ulem}
% avoid problems with \sout in headers with hyperref:
\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
\IfFileExists{parskip.sty}{%
\usepackage{parskip}
}{% else
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}
}
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{0}
% Redefines (sub)paragraphs to behave more like sections
\ifx\paragraph\undefined\else
\let\oldparagraph\paragraph
\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
\fi
\ifx\subparagraph\undefined\else
\let\oldsubparagraph\subparagraph
\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
\fi
% set default figure placement to htbp
\makeatletter
\def\fps@figure{htbp}
\makeatother
\title{Mesocosm experiment plots}
\author{Matthew Malishev\textsuperscript{1}* \& David Civitello
\textsuperscript{1}\\[2\baselineskip]\emph{\textsuperscript{1}
Department of Biology, Emory University, 1510 Clifton Road NE, Atlanta,
GA, USA, 30322}}
\date{}
\begin{document}
\maketitle
{
\hypersetup{linkcolor=black}
\setcounter{tocdepth}{3}
\tableofcontents
}
~
Date: 2018-08-17\\
R version: 3.5.0\\
Corresponding author:
\href{mailto:matthew.malishev@gmail.com}{\nolinkurl{matthew.malishev@gmail.com}}\\
This document can be found at
\url{https://github.com/darwinanddavis/SchistoMesocosm}
\newpage
\textbf{Follow instructions in code chunks labelled `fileoutput' to
toggle pdf of plots saved to directory on/off
(`Size\_per\_tank\_over\_time.pdf')}
~
\paragraph{TO DO}\label{to-do}
\begin{itemize}
\tightlist
\item
How much of the population does the sampling effort capture?
\item
\sout{Scale diameter densities per tank over time to upper limit of
each tank (set ylim to highest value for each tank)}\\
\item
Scale diameter densities per tank over time to upper limit of all
tanks (set ylim to highest value for all tanks)\\
\item
Split plots by line color code showing point where snails are
reproductive viable (8 mm and above).
\item
Which tanks and conditions reach reproductive size?\\
\item
\sout{Replot by size class and resource combo e.g.~low resources and
small size class v low resources and large size class}
\end{itemize}
\subsection{Overview}\label{overview}
This document uses the schisto mesocosm 2016 data to explore cercariae
production from snail hosts of different body sizes (diameter in mm and
mass in mg) over a 14 week period under high and low N/P nutrient
conditions. Host reproduction (egg masses) is also calculated.
\subsubsection{Install dependencies}\label{install-dependencies}
\subsubsection{Get data}\label{get-data}
\begin{Shaded}
\begin{Highlighting}[]
\NormalTok{wd <-}\StringTok{ }\NormalTok{params}\OperatorTok{$}\NormalTok{dir }\CommentTok{# working dir is set in yaml header}
\KeywordTok{setwd}\NormalTok{(}\KeywordTok{paste0}\NormalTok{(wd,}\StringTok{"/"}\NormalTok{))}
\NormalTok{f <-}\StringTok{ "meso1_.csv"}
\NormalTok{f2 <-}\StringTok{ "meso2_.csv"}
\end{Highlighting}
\end{Shaded}
\subsubsection{Load data}\label{load-data}
\begin{verbatim}
'data.frame': 720 obs. of 13 variables:
$ Tank : int 1 2 3 4 5 6 7 8 9 10 ...
$ NP : chr "High" "Low" "Low" "High" ...
$ Size : chr "Small" "Intermediate" "Intermediate" "Small" ...
$ Schisto : chr "No" "Yes" "Yes" "Yes" ...
$ Week : int 0 0 0 0 0 0 0 0 0 0 ...
$ Snail : int 60 60 60 60 60 60 60 60 60 60 ...
$ Total_Biomass : num 96 620.6 670.5 86.7 121.4 ...
$ Cercarial_production: int 0 0 0 0 0 0 0 0 0 0 ...
$ Infected_abundance : int 0 0 0 0 0 0 0 0 0 0 ...
$ Sampling_Effort : int NA NA NA NA NA NA NA NA NA NA ...
$ Eggs : int NA NA NA NA NA NA NA NA NA NA ...
$ Phyto_F : num NA NA NA NA NA NA NA NA NA NA ...
$ Peri_F : num NA NA NA NA NA NA NA NA NA NA ...
\end{verbatim}
\subsubsection{Set plotting graphics}\label{set-plotting-graphics}
Set plotting parameters
Get only infected snails
\begin{center}\rule{0.5\linewidth}{\linethickness}\end{center}
~
\textbf{Mesocosm 1 data sheet}
\subsubsection{Snail size per tank}\label{snail-size-per-tank}
Shell diameter (mm) per tank\\
\includegraphics{snail_mesocosm_files/figure-latex/unnamed-chunk-10-1.pdf}
\begin{verbatim}
Welch Two Sample t-test
data: Diameter and Tank
t = -292.67, df = 54609, p-value < 2.2e-16
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-19.45879 -19.19989
sample estimates:
mean of x mean of y
5.821956 25.151292
\end{verbatim}
\subsubsection{Snail diameter (mm)
distribution}\label{snail-diameter-mm-distribution}
\includegraphics{snail_mesocosm_files/figure-latex/unnamed-chunk-11-1.pdf}
\includegraphics{snail_mesocosm_files/figure-latex/unnamed-chunk-11-2.pdf}
\begin{verbatim}
xchar= 0.9529 ; (yextra,ychar)= -0.004785 0.004785
points2( 29.8 29.8 , 0.1 0.09522 , pch= 20 20 , ...)
\end{verbatim}
\subsubsection{Snail size over time
(weeks)}\label{snail-size-over-time-weeks}
Shell diameter (mm) over time (weeks)\\
\textasciitilde{}1000 eggs inoculated at 0,2,4,6 weeks
\includegraphics{snail_mesocosm_files/figure-latex/unnamed-chunk-12-1.pdf}
\subsubsection{Snail size over time (weeks) per
tank}\label{snail-size-over-time-weeks-per-tank}
\textbf{For all tanks (n = 48), see `Size\_per\_tank\_over\_time.pdf' ~
in /Users/malishev/Documents/Emory/research/mesocosm}
~ \textasciitilde{}1000 eggs inoculated at 0,2,4,6 weeks
Select tank. Max 48
\begin{Shaded}
\begin{Highlighting}[]
\NormalTok{tank <-}\StringTok{ }\DecValTok{12} \CommentTok{# Select tank #. Max 48 }
\KeywordTok{paste0}\NormalTok{(}\StringTok{"Tank "}\NormalTok{,tank) }
\end{Highlighting}
\end{Shaded}
\begin{verbatim}
[1] "Tank 12"
\end{verbatim}
\includegraphics{snail_mesocosm_files/figure-latex/unnamed-chunk-15-1.pdf}
\subsubsection{Snail size over time (weeks) per tank (High
resources)}\label{snail-size-over-time-weeks-per-tank-high-resources}
~ \textbf{See ``Size\_per\_tank\_over\_time\_HIGH.pdf'' ~ in
/Users/malishev/Documents/Emory/research/mesocosm}
\subsubsection{Snail size over time (weeks) per tank (Low
resources)}\label{snail-size-over-time-weeks-per-tank-low-resources}
~ \textbf{See ``Size\_per\_tank\_over\_time\_LOW.pdf'' ~ in
/Users/malishev/Documents/Emory/research/mesocosm}
\subsubsection{Large snails over time (weeks) per tank (High
resources)}\label{large-snails-over-time-weeks-per-tank-high-resources}
~ \textbf{See ``Size\_per\_tank\_over\_time\_HIGH\_LARGE.pdf'' ~ in
/Users/malishev/Documents/Emory/research/mesocosm}
\subsubsection{Large snails over time (weeks) per tank (low
resources)}\label{large-snails-over-time-weeks-per-tank-low-resources}
~ \textbf{See ``Size\_per\_tank\_over\_time\_LOW\_LARGE.pdf'' ~ in
/Users/malishev/Documents/Emory/research/mesocosm}
\subsubsection{Small snails over time (weeks) per tank (High
resources)}\label{small-snails-over-time-weeks-per-tank-high-resources}
~ \textbf{See ``Size\_per\_tank\_over\_time\_HIGH\_SMALL.pdf'' ~ in
/Users/malishev/Documents/Emory/research/mesocosm}
\subsubsection{Small snails over time (weeks) per tank (low
resources)}\label{small-snails-over-time-weeks-per-tank-low-resources}
~ \textbf{See ``Size\_per\_tank\_over\_time\_LOW\_SMALL.pdf'' ~ in
/Users/malishev/Documents/Emory/research/mesocosm}
\subsubsection{Body mass (mg) over time
(weeks)}\label{body-mass-mg-over-time-weeks}
(Soft tissue dry mass in mg = 0.0096 * Diameter{[}in mm{]}\^{}3)\\
\textasciitilde{}1000 eggs inoculated at 0,2,4,6 weeks
\includegraphics{snail_mesocosm_files/figure-latex/unnamed-chunk-16-1.pdf}
\begin{verbatim}
# A tibble: 1 x 2
Biomass Cercariae
* <dbl> <int>
1 245. 0
\end{verbatim}
\textbf{Without max value of \texttt{as.numeric(outer){[}1{]}}}
\includegraphics{snail_mesocosm_files/figure-latex/unnamed-chunk-18-1.pdf}
\subsubsection{Snail size and number of cercariae
produced}\label{snail-size-and-number-of-cercariae-produced}
Point size by cercariae number\\
\includegraphics{snail_mesocosm_files/figure-latex/unnamed-chunk-19-1.pdf}
Linear log
\subsubsection{Snail mass and cercariae produced
(mg)}\label{snail-mass-and-cercariae-produced-mg}
\includegraphics{snail_mesocosm_files/figure-latex/unnamed-chunk-21-1.pdf}
\subsubsection{Snail size per tank}\label{snail-size-per-tank-1}
Shell diameter (mm)\\
Select tank. Max 48
\begin{verbatim}
[1] "Tank 24"
\end{verbatim}
\includegraphics{snail_mesocosm_files/figure-latex/unnamed-chunk-23-1.pdf}
\subsubsection{Cercariae production over
time}\label{cercariae-production-over-time}
Cercariae shed over 90 mins per week\\
\textasciitilde{}1000 eggs inoculated at 0,2,4,6 weeks\\
Snail abundance over time (weeks)\\
\includegraphics{snail_mesocosm_files/figure-latex/unnamed-chunk-24-1.pdf}
\subsubsection{Tank cercariae production over time per
tank}\label{tank-cercariae-production-over-time-per-tank}
Select tank. Max 48
\begin{verbatim}
[1] "Tank 24"
\end{verbatim}
\begin{verbatim}
[1] 2300
\end{verbatim}
\includegraphics{snail_mesocosm_files/figure-latex/unnamed-chunk-26-1.pdf}
\newpage
\textbf{Mesocosm 2 data sheet}
\subsubsection{Egg mass distribution}\label{egg-mass-distribution}
\includegraphics{snail_mesocosm_files/figure-latex/unnamed-chunk-27-1.pdf}
\subsubsection{N/P concentration v egg
mass}\label{np-concentration-v-egg-mass}
\includegraphics{snail_mesocosm_files/figure-latex/unnamed-chunk-28-1.pdf}
\subsubsection{Phyto and Peri
Distribution}\label{phyto-and-peri-distribution}
phyto = flourescence units\\
peri = flourescence per 2 weeks / 3.5 inch\^{}2 tile (gross productivity
biomass rate)\\
\includegraphics{snail_mesocosm_files/figure-latex/unnamed-chunk-29-1.pdf}
\subsubsection{Egg Mass over time v presence of
schisto}\label{egg-mass-over-time-v-presence-of-schisto}
\textasciitilde{}1000 eggs inoculated at 0,2,4,6 weeks
\includegraphics{snail_mesocosm_files/figure-latex/unnamed-chunk-30-1.pdf}
\subsubsection{Size class vs Egg mass (with
schisto)}\label{size-class-vs-egg-mass-with-schisto}
\includegraphics{snail_mesocosm_files/figure-latex/unnamed-chunk-31-1.pdf}
\begin{verbatim}
xchar= 4.765 ; (yextra,ychar)= -0.001435 0.001435
points2( 141.7 141.7 141.7 , 0.03072 0.02928 0.02785 , pch= 20 20 20 , ...)
\end{verbatim}
\subsubsection{Egg Mass over time
(weeks)}\label{egg-mass-over-time-weeks}
\textasciitilde{}1000 eggs inoculated at 0,2,4,6 weeks
\includegraphics{snail_mesocosm_files/figure-latex/unnamed-chunk-32-1.pdf}
\includegraphics{snail_mesocosm_files/figure-latex/unnamed-chunk-32-2.pdf}
\includegraphics{snail_mesocosm_files/figure-latex/unnamed-chunk-32-3.pdf}
\printbibliography
\end{document}