-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfig_S9.R
More file actions
24 lines (21 loc) · 770 Bytes
/
fig_S9.R
File metadata and controls
24 lines (21 loc) · 770 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
require('functions.R')
gr.communities <- fread('data/data_comm_mixes_growth.csv')
aux <- gr.communities[,c('C','E','M','P','S','T')]
aux <- as.matrix(aux)
aux <- apply(aux, 2, as.numeric)
aux <- melt(aux)
gr.sncond <- fread('data/data_SN_conditioning.csv')
minvals <- gr.sncond[, min(cfu.m, na.rm=TRUE), by='strain']
names(minvals) <- c('Var2', 'value')
minvals[, value:= value/2]
p <- 'results/fig_S9.pdf'
pdf(p, 6,4, family = 'CM Sans')
ggplot(aux, aes(Var2, value)) + geom_jitter(width=.1, shape=19) +
scale_y_log10() +
geom_point(data = minvals, colour = 'red') +
annotation_logticks(sides="l", size=.4) +
theme_bw() + labs(y = 'CFU in communities' ,
x = 'Strain') +
theme(panel.grid = element_blank(), aspect.ratio=1)
dev.off()
embed_fonts(p)