-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path5sp_analysis_outline.R
76 lines (76 loc) · 3.06 KB
/
5sp_analysis_outline.R
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
#' ---
#' title: Analysis outline
#' author: Melissa Chen
#' output: github_document
#' ---
#'
#'
#' EDA:
#' - How should you adjust BD estimates (done)
#' - Check for duplicates, missing data, etc (done)
#' - ** Check controls and contaminants; plot **
#' -
#'
#'
#' How many otus are shared over time on the same individual? \
#' How does this compare to how many otus are shared between individuals at the same time point? \
#' Can we use structural equation modelling to determine whether BD influences microbiome or microbiome influences BD? \
#'
#' Part I: Microbiome state and effect on the microbiome\
#' \
#' (1a) Does overall diversity of microbiome influence BD infection rate?\
#' - OTU richness vs infection rate\
#' - Shannon diversity vs infection rate\
#' - Chao1 vs infection rate\
#' - PD vs infection rate\
#' --> Use distribution of diversity prior to BD exposure as a predictor for infection rate\
#' --> P/A bd infection of entire "after" exposure\
#'
#'\
#' (1b) Does overall diversity of microbiome influence BD infection intensity?\
#' - OTU richness vs infection intensity\
#' - Shannon diversity vs infection intensity\
#' - Chao1 vs infection intensity\
#' - PD vs infection intensity\
#' --> use distribution of diversity prior to BD exposure as a predictor for infection intensity\
#' --> max bd infection of entire "after" exposure\
#'
#' \
#' (2a) Does instability of microbiome influence BD infection rate?\
#' - Bray-curtis distance travelled vs infection rate\
#' - Weighted unifrav distance travelled vs infeciton rate\
#' - Manual calculation of seq turnovervs infection rate\
#' --> Use a GLM (binomial) where each distance travelled "X" time points away from BD exposure\
#' --> P/A bd infection of entire "after" exposure\
#'
#' \
#' (2b) Does instability of microbiome influence BD infection intensity?\
#' - Bray-curtis distance travelled vs infection intensity\
#' - Weighted unifrav distance travelled vs infeciton intensity\
#' - Manual calculation of seq turnovervs infection intensity\
#' --> Use a GLM (binomial) where each distance travelled "X" time points away from BD exposure\
#' --> max bd infection of entire "after" exposure\
#'
#' \
#' (3a) Does composition of microbiome influence BD infection intensity?\
#' - Inhibitory OTU richness vs infection rate\
#' - Percent inhibitory otus vs infection rate\
#' - "Other" OTUs vs infection rate\
#' --> For inhibitory OTUs, calculate distribution of richness/percent inhibitory prior to exposure as predictor for infection rate
#' --> for "Other" OTUs, try very elaborate linear model of entire microbiome? Use AIC to find best predictor for BD infection?
#'
#'
#' Part II: Affect of BD infection on microbiome state
#'
#' (1a) Does BD infection state affect microbiome diversity?
#' - OTU richness vs BD infection
#' - Chao1 richness vs BD infection
#' - Shannon richness vs BD infection
#' - PD vs BD infection
#'
#' (1b) Does BD infection intensity affect microbiome diversity?
#' - OTU richness vs BD infection
#' - Chao1 richness vs BD infection
#' - Shannon richness vs BD infection
#' - PD vs BD infection
#'