You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the schematic overview figure, and was made manually in Inkscape using images from FlatIcon (see references in main manuscript).
269
272
270
273
## Figure 2
@@ -338,6 +341,11 @@ p.histogram.figure.2
338
341
dev.off()
339
342
```
340
343
344
+
345
+
### Subsampling to non-human hosts
346
+
347
+
To examine whether sampling bias could be influencing this result, we look at the effect of subsampling to only non-human hosts (both domestic and non-domestic).
We want to produce an analagous version of Figure 1 from Olival et al. (2017) with our data.
429
+
We produce an analagous version of Figure 1 from Olival et al. (2017) based on our dataset. Ordering of mammal orders is the same to allow easy comparison with their viral figure.
First we do GAMs for host traits which predict viral and bacterial richness.
553
+
We fit generalized additive models (GAMs) for host traits which predict viral and bacterial richness. To do this we use a dataset of host traits collected by Olival et al. to predict pathogen richness (bacterial and viral) per species. These host traits included a phylogenetic eigenvector regression (PVR) of body mass. As Olival et al. collected information for an analysis of only viral pathogens, we found there was better overlap for viruses in our dataset (n=613 host wild mammals) than for bacteria (n=274).
547
554
548
555
```{r GAMs, cache=cachedata, message=FALSE}
549
556
options(warn=-1) # Turn off warnings
@@ -554,7 +561,7 @@ allplots
554
561
555
562
## Figure 5
556
563
557
-
Then GAMs for predicting zoonotic potential.
564
+
We also fit GAMs to predict zoonotic potential. For bacteria, GAMs could include terms for host range (PHB_mean, PHB_median, or PHB_max), research effort (NCBI PubMed, Nucleotide, or SRA results), motility, sporulation, being vector-borne, oxygen requirements, and Gram stain. We excluded cellular lifestyle (intra/extracellular) as a predictor due to low numbers, and excluded pathogens of unknown motility (n=50) or sporulation (n=17). For viruses, GAMs could include terms for host range, research effort, genome size (number of proteins and length), being vector-borne, and genome type (Baltimore classification). We excluded pathogens with unknown genome size (n=253). We observed structure in some partial effect residuals in the best-fit GAMs: research effort for bacteria (Figure 6b) and host range for viruses (Figure 6d). This structure was driven by pathogen taxonomy, with families (orders) for bacteria (viruses) having different zoonotic potential; e.g. the Staphylococcaceae contain a high proportion of generalists. Attempts to include taxonomy as a categorical predictor produced best fit models which excluded all lifestyle factors (not shown), although host range and research effort were still the strongest predictors.
We make a plot of the host switching for bacteria and viruses together (left panel of figure). We restrict
618
+
We make a plot of the host switching for bacteria and viruses together (left panel of figure).
619
+
620
+
If we denote the set of pathogens seen at least once in a host taxon a as p_a (where the taxon could be a species, genus, family etc.), we define the fraction of shared pathogens between two taxa a and b as
Note that this definition is symmetric in a, b. It can therefore be compared with the (mean) phylogenetic distance between taxa using a Mantel test to determine the correlation.
This is a summary of the best-fit GAMs (see `intermediates/*rds') for host traits which predict viral/bacterial richness (Figure 4) and pathogen traits which predict zoonotic potential (Figure 5).
1432
+
This is a summary of the best-fit GAMs (see `intermediates/*rds') for host traits which predict viral/bacterial richness (Figure 4) and pathogen traits which predict zoonotic potential (Figure 5). This table was manually edited and prettified in Excel but contains all the same information as in the manuscript.
Copy file name to clipboardExpand all lines: scripts/06-fit-GAM-viral-zoonotic-potential.R
+1-1
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@
15
15
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
16
16
17
17
# Make ideal data frames for predicting zoonotic potential
18
-
source('scripts/Olival_fit_gam.R')
18
+
source('scripts/Olival-functions.R')
19
19
20
20
# Read in viral zoonotic potential dataset
21
21
# N.B. Generated from pathogen_vs_host_db association dataset, with additional
Copy file name to clipboardExpand all lines: scripts/07-fit-GAM-bacterial-zoonotic-potential.R
+1-1
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@
15
15
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
16
16
17
17
# Make ideal data frames for predicting zoonotic potential
18
-
source('scripts/Olival_fit_gam.R')
18
+
source('scripts/Olival-functions.R')
19
19
20
20
# Read in viral zoonotic potential dataset
21
21
# N.B. Generated from pathogen_vs_host_db association dataset, with additional
Copy file name to clipboardExpand all lines: scripts/08-tables-GAMs.R
+16-1
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,24 @@
1
+
# This code was originally written by Olival et al. (2017)
2
+
# and was adapted (lightly) by Liam Shaw 2019 (liam.philip.shaw at gmail dot com)
3
+
# for this project.
4
+
5
+
# See: https://zenodo.org/record/807517 for the original code repository this code was sourced from
6
+
7
+
# This file is based on: scripts/11-make-ExtendedTable01-models.R
8
+
# from that repository
9
+
10
+
# I am grateful to Olival et al. for making their original code available under an MIT License, which also applies here.
11
+
# https://opensource.org/licenses/MIT
12
+
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
13
+
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
14
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0 commit comments