-
Notifications
You must be signed in to change notification settings - Fork 0
/
microbiome_food.Rmd
106 lines (70 loc) · 2.1 KB
/
microbiome_food.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
---
title: "Relationship between Microbiome and Food"
output:
workflowr::wflow_html:
toc: true
editor_options:
chunk_output_type: console
---
This page contains the investigation of the changes over time.
```{r data, include=FALSE, echo=FALSE}
# load packages
source("code/load_packages.R")
# get data
source("code/get_cleaned_data.R")
theme_set(theme_bw())
pal = "Set1"
scale_colour_discrete <- function(palname=pal, ...){
scale_colour_brewer(palette=palname, ...)
}
scale_fill_discrete <- function(palname=pal, ...){
scale_fill_brewer(palette=palname, ...)
}
knitr::opts_chunk$set(out.width = "225%")
```
# Phylum Level Microbiome and Food
Get the phylum level data
```{r}
data.phylum <-get_combined_data(mydata=microbiome_data,
taxa.level="Phylum")
#phylum
bugs <- data.phylum$bug.list
bugs
```
## Correlation between Phylum and HEI scores
### Start of Study (Baseline, Week 1)
```{r}
subdat <- filter(data.phylum$full_data, Week == "1")
ggplot(subdat, aes(x=Abundance, y=HEI_Total,
color=Intervention))+
geom_point(size=3)+
facet_wrap(.~Bug, scales = "free")+
theme(axis.text.x = element_text(angle=20, size=7, vjust=0.1))
```
### 1st follw-up (Week 4)
```{r}
subdat <- filter(data.phylum$full_data, Week == "4")
ggplot(subdat, aes(x=Abundance, y=HEI_Total,
color=Intervention))+
geom_point(size=3)+
facet_wrap(.~Bug, scales = "free")+
theme(axis.text.x = element_text(angle=20, size=7, vjust=0.1))
```
### Second follw-up (Week 8)
```{r}
subdat <- filter(data.phylum$full_data, Week == "8")
ggplot(subdat, aes(x=Abundance, y=HEI_Total,
color=Intervention))+
geom_point(size=3)+
facet_wrap(.~Bug, scales = "free")+
theme(axis.text.x = element_text(angle=20, size=7, vjust=0.1))
```
### Third follw-up (Week 12)
```{r}
subdat <- filter(data.phylum$full_data, Week == "12")
ggplot(subdat, aes(x=Abundance, y=HEI_Total,
color=Intervention))+
geom_point(size=3)+
facet_wrap(.~Bug, scales = "free")+
theme(axis.text.x = element_text(angle=20, size=7, vjust=0.1))
```