-
Notifications
You must be signed in to change notification settings - Fork 0
/
exercise-02_yeast.qmd
541 lines (403 loc) · 35.9 KB
/
exercise-02_yeast.qmd
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
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
---
webr:
packages: ["ggplot2", "tidyverse"]
filters:
- webr
---
# Yeast Growth Experiment {#sec-yeast-expt}
```{webr-r}
#| context: setup
# Download code generated by generate_yeast_growth_data.ipynb
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_01/AM_Bay_01_01.csv', 'AM_Bay_01_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_01/AM_Bay_01_02.csv', 'AM_Bay_01_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_01/AM_Bay_01_03.csv', 'AM_Bay_01_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_01/AM_Bay_01_04.csv', 'AM_Bay_01_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_02/AM_Bay_02_01.csv', 'AM_Bay_02_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_02/AM_Bay_02_02.csv', 'AM_Bay_02_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_02/AM_Bay_02_03.csv', 'AM_Bay_02_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_02/AM_Bay_02_04.csv', 'AM_Bay_02_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_03/AM_Bay_03_01.csv', 'AM_Bay_03_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_03/AM_Bay_03_02.csv', 'AM_Bay_03_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_03/AM_Bay_03_03.csv', 'AM_Bay_03_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_03/AM_Bay_03_04.csv', 'AM_Bay_03_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_04/AM_Bay_04_01.csv', 'AM_Bay_04_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_04/AM_Bay_04_02.csv', 'AM_Bay_04_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_04/AM_Bay_04_03.csv', 'AM_Bay_04_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_04/AM_Bay_04_04.csv', 'AM_Bay_04_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_05/AM_Bay_05_01.csv', 'AM_Bay_05_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_05/AM_Bay_05_02.csv', 'AM_Bay_05_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_05/AM_Bay_05_03.csv', 'AM_Bay_05_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_05/AM_Bay_05_04.csv', 'AM_Bay_05_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_06/AM_Bay_06_01.csv', 'AM_Bay_06_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_06/AM_Bay_06_02.csv', 'AM_Bay_06_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_06/AM_Bay_06_03.csv', 'AM_Bay_06_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_06/AM_Bay_06_04.csv', 'AM_Bay_06_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_07/AM_Bay_07_01.csv', 'AM_Bay_07_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_07/AM_Bay_07_02.csv', 'AM_Bay_07_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_07/AM_Bay_07_03.csv', 'AM_Bay_07_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_07/AM_Bay_07_04.csv', 'AM_Bay_07_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_08/AM_Bay_08_01.csv', 'AM_Bay_08_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_08/AM_Bay_08_02.csv', 'AM_Bay_08_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_08/AM_Bay_08_03.csv', 'AM_Bay_08_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_08/AM_Bay_08_04.csv', 'AM_Bay_08_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_09/AM_Bay_09_01.csv', 'AM_Bay_09_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_09/AM_Bay_09_02.csv', 'AM_Bay_09_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_09/AM_Bay_09_03.csv', 'AM_Bay_09_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_09/AM_Bay_09_04.csv', 'AM_Bay_09_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_10/AM_Bay_10_01.csv', 'AM_Bay_10_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_10/AM_Bay_10_02.csv', 'AM_Bay_10_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_10/AM_Bay_10_03.csv', 'AM_Bay_10_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_10/AM_Bay_10_04.csv', 'AM_Bay_10_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_11/AM_Bay_11_01.csv', 'AM_Bay_11_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_11/AM_Bay_11_02.csv', 'AM_Bay_11_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_11/AM_Bay_11_03.csv', 'AM_Bay_11_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_11/AM_Bay_11_04.csv', 'AM_Bay_11_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_12/AM_Bay_12_01.csv', 'AM_Bay_12_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_12/AM_Bay_12_02.csv', 'AM_Bay_12_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_12/AM_Bay_12_03.csv', 'AM_Bay_12_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_12/AM_Bay_12_04.csv', 'AM_Bay_12_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_13/AM_Bay_13_01.csv', 'AM_Bay_13_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_13/AM_Bay_13_02.csv', 'AM_Bay_13_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_13/AM_Bay_13_03.csv', 'AM_Bay_13_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_13/AM_Bay_13_04.csv', 'AM_Bay_13_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_14/AM_Bay_14_01.csv', 'AM_Bay_14_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_14/AM_Bay_14_02.csv', 'AM_Bay_14_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_14/AM_Bay_14_03.csv', 'AM_Bay_14_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_14/AM_Bay_14_04.csv', 'AM_Bay_14_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_15/AM_Bay_15_01.csv', 'AM_Bay_15_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_15/AM_Bay_15_02.csv', 'AM_Bay_15_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_15/AM_Bay_15_03.csv', 'AM_Bay_15_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_15/AM_Bay_15_04.csv', 'AM_Bay_15_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_16/AM_Bay_16_01.csv', 'AM_Bay_16_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_16/AM_Bay_16_02.csv', 'AM_Bay_16_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_16/AM_Bay_16_03.csv', 'AM_Bay_16_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_16/AM_Bay_16_04.csv', 'AM_Bay_16_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_17/AM_Bay_17_01.csv', 'AM_Bay_17_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_17/AM_Bay_17_02.csv', 'AM_Bay_17_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_17/AM_Bay_17_03.csv', 'AM_Bay_17_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_17/AM_Bay_17_04.csv', 'AM_Bay_17_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_18/AM_Bay_18_01.csv', 'AM_Bay_18_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_18/AM_Bay_18_02.csv', 'AM_Bay_18_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_18/AM_Bay_18_03.csv', 'AM_Bay_18_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/AM_Bay_18/AM_Bay_18_04.csv', 'AM_Bay_18_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_01/PM_Bay_01_01.csv', 'PM_Bay_01_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_01/PM_Bay_01_02.csv', 'PM_Bay_01_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_01/PM_Bay_01_03.csv', 'PM_Bay_01_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_01/PM_Bay_01_04.csv', 'PM_Bay_01_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_02/PM_Bay_02_01.csv', 'PM_Bay_02_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_02/PM_Bay_02_02.csv', 'PM_Bay_02_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_02/PM_Bay_02_03.csv', 'PM_Bay_02_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_02/PM_Bay_02_04.csv', 'PM_Bay_02_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_03/PM_Bay_03_01.csv', 'PM_Bay_03_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_03/PM_Bay_03_02.csv', 'PM_Bay_03_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_03/PM_Bay_03_03.csv', 'PM_Bay_03_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_03/PM_Bay_03_04.csv', 'PM_Bay_03_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_04/PM_Bay_04_01.csv', 'PM_Bay_04_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_04/PM_Bay_04_02.csv', 'PM_Bay_04_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_04/PM_Bay_04_03.csv', 'PM_Bay_04_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_04/PM_Bay_04_04.csv', 'PM_Bay_04_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_05/PM_Bay_05_01.csv', 'PM_Bay_05_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_05/PM_Bay_05_02.csv', 'PM_Bay_05_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_05/PM_Bay_05_03.csv', 'PM_Bay_05_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_05/PM_Bay_05_04.csv', 'PM_Bay_05_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_06/PM_Bay_06_01.csv', 'PM_Bay_06_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_06/PM_Bay_06_02.csv', 'PM_Bay_06_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_06/PM_Bay_06_03.csv', 'PM_Bay_06_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_06/PM_Bay_06_04.csv', 'PM_Bay_06_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_07/PM_Bay_07_01.csv', 'PM_Bay_07_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_07/PM_Bay_07_02.csv', 'PM_Bay_07_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_07/PM_Bay_07_03.csv', 'PM_Bay_07_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_07/PM_Bay_07_04.csv', 'PM_Bay_07_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_08/PM_Bay_08_01.csv', 'PM_Bay_08_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_08/PM_Bay_08_02.csv', 'PM_Bay_08_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_08/PM_Bay_08_03.csv', 'PM_Bay_08_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_08/PM_Bay_08_04.csv', 'PM_Bay_08_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_09/PM_Bay_09_01.csv', 'PM_Bay_09_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_09/PM_Bay_09_02.csv', 'PM_Bay_09_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_09/PM_Bay_09_03.csv', 'PM_Bay_09_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_09/PM_Bay_09_04.csv', 'PM_Bay_09_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_10/PM_Bay_10_01.csv', 'PM_Bay_10_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_10/PM_Bay_10_02.csv', 'PM_Bay_10_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_10/PM_Bay_10_03.csv', 'PM_Bay_10_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_10/PM_Bay_10_04.csv', 'PM_Bay_10_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_11/PM_Bay_11_01.csv', 'PM_Bay_11_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_11/PM_Bay_11_02.csv', 'PM_Bay_11_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_11/PM_Bay_11_03.csv', 'PM_Bay_11_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_11/PM_Bay_11_04.csv', 'PM_Bay_11_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_12/PM_Bay_12_01.csv', 'PM_Bay_12_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_12/PM_Bay_12_02.csv', 'PM_Bay_12_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_12/PM_Bay_12_03.csv', 'PM_Bay_12_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_12/PM_Bay_12_04.csv', 'PM_Bay_12_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_13/PM_Bay_13_01.csv', 'PM_Bay_13_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_13/PM_Bay_13_02.csv', 'PM_Bay_13_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_13/PM_Bay_13_03.csv', 'PM_Bay_13_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_13/PM_Bay_13_04.csv', 'PM_Bay_13_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_14/PM_Bay_14_01.csv', 'PM_Bay_14_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_14/PM_Bay_14_02.csv', 'PM_Bay_14_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_14/PM_Bay_14_03.csv', 'PM_Bay_14_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_14/PM_Bay_14_04.csv', 'PM_Bay_14_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_15/PM_Bay_15_01.csv', 'PM_Bay_15_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_15/PM_Bay_15_02.csv', 'PM_Bay_15_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_15/PM_Bay_15_03.csv', 'PM_Bay_15_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_15/PM_Bay_15_04.csv', 'PM_Bay_15_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_16/PM_Bay_16_01.csv', 'PM_Bay_16_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_16/PM_Bay_16_02.csv', 'PM_Bay_16_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_16/PM_Bay_16_03.csv', 'PM_Bay_16_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_16/PM_Bay_16_04.csv', 'PM_Bay_16_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_17/PM_Bay_17_01.csv', 'PM_Bay_17_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_17/PM_Bay_17_02.csv', 'PM_Bay_17_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_17/PM_Bay_17_03.csv', 'PM_Bay_17_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_17/PM_Bay_17_04.csv', 'PM_Bay_17_04.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_18/PM_Bay_18_01.csv', 'PM_Bay_18_01.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_18/PM_Bay_18_02.csv', 'PM_Bay_18_02.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_18/PM_Bay_18_03.csv', 'PM_Bay_18_03.csv')
download.file('https://raw.githubusercontent.com/sipbs-compbiol/BM214-Workshop-3/main/assets/data/PM_Bay_18/PM_Bay_18_04.csv', 'PM_Bay_18_04.csv')
library(ggplot2)
library(tidyverse)
```
## Introduction
In this exercise you will use the absorbance data obtained from your yeast growth experiment in Laboratory 3 to draw growth curves for your three _Saccharomyces cerevisiae_ strains, using the `R` language.
::: { .callout-note collapse="true" }
## Why use `R`?
There are many great tools capable of plotting your data (Numbers, Excel, Prism, GNUplot, Minitab, SPSS, MatLab, Python, JavaScript, etc.) and the choice of tool should in general reflect your data presentation needs, and your level of comfort with the tool.
Here, we use `R` because it is a very powerful means of carrying out many computational aspects of biology, including data visualisation, quickly and easily. Many of the topics you may meet later in your degree - phylogenetic, pharmacokinetics, microbial genomics, and so on - are supported by _packages_ in `R` designed specifically for those subjects, and can make your work much easier. Also, skills in `R` are highly sought-after by industrial and other employers. Having some experience of `R` is an advantage.
`R` may be unfamiliar to you just now, but we provide step-by-step instructions for completing the exercise and, by the end of it, we hope you feel a bit more confident in how to use it.
:::
In your experiment you saw that as the yeast grew in your liquid culture, the cuvette became _turbid_ (@fig-turbidity), proportionally to the density of cells in the culture. The turbidities of your samples were measured over a 24 hour period using a spectrophotometer, as _optical density_ (OD600).
![Yeast cell growth causes turbidity in liquid medium, proportional to cell density.](assets/images/turbidity.png){#fig-turbidity width=80%}
::: { .callout-important }
In this part of the workshop, you will plot the absorbance of your control (no carbon), lactose, and glucose medium samples over time, using `R`.
:::
## Load and inspect your data
You will have been assigned a filename that corresponds to the absorbance data obtained from your yeast cultures. This will be in the form `<session>_Bay_<bay_number>_<strain_number>.csv`, such as
- `AM_Bay_24_03.csv` or
- `PM_Bay_02_01.csv`
To load your data into the `WebR` instance below, you would issue the command:
```{r}
#| eval: false
# Of course, you would substitute the name of your own file
data <- read.csv("AM_Bay_24_03.csv")
```
and, to get information about the contents of the dataset, you could use the `glimpse()` function:
```{r}
#| eval: false
glimpse(data)
```
or the `head()` function to view the first few lines of the dataset:
```{r}
#| eval: false
# The n=10 argument tells head() to show the first 10 lines.
# Try varying this to see more or fewer lines of your dataset
head(data, n=10)
```
::: { .callout-note }
In the code cell above, the `#` symbol at the start of the line means it is a **comment** and not executed by `R` when the cell runs.
If you put a `#` at the start of a line in the WebR cell, that line will not run - watch out for that!
:::
::: { .callout-important title="Task" }
**Use the `WebR` cell below to load your dataset and inspect its contents.**
:::
```{webr-r}
# Load your yeast growth data.
# If your filename is, e.g. PM_Bay_40_03.csv, you would enter the command below
# data = read.csv("PM_Bay_40_03.csv")
```
::: { .callout-tip collapse="true" }
## I need a hint!
- If you can't see what your data looks like, don't forget to load your data and `glimpse()` it in the same cell
```r
data = read.csv("PM_Bay_40_03.csv")
glimpse(data)
```
:::
## Plot your growth curves
::: { .callout-warning }
You will be using the `ggplot2` `R` package to plot your data in this workshop. Normally, you would need to _import_ this package by using the command:
```{r}
#| eval: false
library(ggplot2)
```
but it has been pre-imported for you, for this workshop.
:::
### Plot a basic `ggplot2` growth curve
`ggplot2` plots are composed of a sequence of _layers_. The _base layer_ is a declaration of the dataset, and which variables in the dataset will be used to draw the figure.
When you inspected your dataset in the `WebR` cell above, you will have seen that there are three _variables_ in the dataset:
- `time` (the time in hours after the experiment started at which the measurement was taken)
- `OD600` (the absorbance measurement)
- `medium` (the liquid medium in which the yeast were grown)
We want to plot this data in the following way:
- `time` should extend along the $x$-axis from left to right to indicate the progression of the experiment
- `OD600` should extend up the $y$-axis to indicate how much light was absorbed by the yeast at each timepoint
- `medium` will be used to separate datapoints into distinct curves in the graph
To _declare_ the base dataset, we can create a `ggplot()` object, specifying the dataset we will be using (the `data` argument), and the variables to be used along the `x` and `y` axes in the _aesthetics_ `aes()` argument:
```{r}
#| eval: false
fig <- ggplot(data, aes(x=time, y=OD600)) # Declare the dataset/base layer
```
The `fig` variable we create this way has a single _layer_, this data declaration. It does not yet have any visualisation or graphics. To generate a plot, we must _add a new layer_ - a _geometry layer_, such as `geom_point()`:
```{r}
#| eval: false
fig <- ggplot(data, aes(x=time, y=OD600)) + # Declare the dataset/base layer
geom_point() # Add a marker for each datapoint
```
::: { .callout-note }
In `ggplot2` we **add** layers together to filter the data into an image, like lenses in a telescope.
**We have to use the `+` character to join layers together.**
:::
`geom_point()` will add a visualisation layer to the plot, but we won't be able to see it until we tell `R` to show us the figure. We can do this in a number of ways, such as with a `print()` statement:
```{r}
#| eval: false
fig <- ggplot(data, aes(x=time, y=OD600)) + # Declare the dataset/base layer
geom_point() # Add a marker for each datapoint
# Show the figure
print(fig)
```
or just using the variable name
```{r}
#| eval: false
fig <- ggplot(data, aes(x=time, y=OD600)) + # Declare the dataset/base layer
geom_point() # Add a marker for each datapoint
# Show the figure
fig
```
::: { .callout-important title="Task" }
**Use the `WebR` cell below to visualise your data with a basic plot.**
:::
```{webr-r}
# Plot your yeast growth data by entering code in this cell
```
::: { .callout-caution collapse="true" }
## Result
The figure you generate probably won't look very impressive (@fig-ggplot-01). The datapoints are all there and, because we know that there are three growth curves we can - as humans - interpret the data accordingly.
![A basic `ggplot()` graph of three growth curves. There is much room for improvement.](assets/images/ggplot-01.png){#fig-ggplot-01 width=80%}
There are nice things about this figure. The axis labels have already been added, and the gridlines help orient the viewer to the actual data values. But we can't _really_ see which datapoints belong to which media, or to which curves. We might want to improve this in a few ways:
- colour the datapoints by medium
- fit a line through the datapoints so we can see the growth curve trends
- use a semilog (logarithmic $y$-axis) plot
We will go through all these improvements, below.
:::
### Colouring datapoints by medium
To colour our data representation by a variable, we assign that variable to the `color` argument when setting up the plot _aesthetics_:
```{r}
#| eval: false
fig <- ggplot(data, aes(x=time, y=OD600, color=medium)) # Colour data by the medium
```
Doing this with our plot code above:
```{r}
#| eval: false
fig <- ggplot(data, aes(x=time, y=OD600, color=medium)) + # Declare the dataset/base layer
geom_point() # Add a marker for each datapoint
# Show the figure
fig
```
::: { .callout-important title="Task" }
**Use the `WebR` cell below to visualise your data using colour to separate data points by growth medium.**
:::
```{webr-r}
# Plot yeast growth data with different colours for each medium by entering code in this cell
```
::: { .callout-caution collapse="true" }
## Result
The figure you generated now clearly shows which datapoint belongs to which growth curve (@fig-ggplot-02). `ggplot2` has automatically added a legend to the plot, and the data is much more interpretable.
![A `ggplot()` graph of three growth curves, with growth medium indicated by colour.](assets/images/ggplot-02.png){#fig-ggplot-02 width=80%}
This is obviously an improvement, but we still have things that we want to do to make the plot better:
- fit a line through the datapoints so we can see the growth curve trends
- use a semilog (logarithmic $y$-axis) plot
:::
### Fit a model to the data
One of the things that makes `R` so powerful is the ready availability of many statistical tools, including the ability to fit statistical models to datasets.
The `ggplot2` package provides a layer called `geom_smooth()` which allows us to fit a model to each curve in our dataset. By default `geom_smooth()` uses a method called `loess` to estimate a best fit to the data. You can add this layer using the code below:
```{r}
#| eval: false
fig <- ggplot(data, aes(x=time, y=OD600, color=medium)) + # Declare the dataset/base layer
geom_point() + # Add a marker for each datapoint
geom_smooth() # Fit a default curve to the data
# Show the figure
fig
```
::: { .callout-important title="Task" }
**Use the `WebR` cell below to fit a curve to your data, using `geom_smooth()`.**
:::
```{webr-r}
# Fit a default geom_smooth() curve to the dataset, using this cell
```
::: { .callout-caution collapse="true" }
## Result
The resulting figure has added a model curve, estimated using `loess` to the dataset for each medium (@fig-ggplot-03). The coloured line shows the model fit, and the semitransparent ribbon shows the _standard error_ (se) of the fit - an estimate of fit accuracy.
![A `ggplot()` graph of three growth curves, with growth medium indicated by colour and a best-fit `loess` curve.](assets/images/ggplot-03.png){#fig-ggplot-03 width=80%}
This kind of curve tends to _overfit_ the dataset, as might be seen by the tendency of the curve to "kick" up or down at the end of the graph. Generally-speaking, we should always try to fit a suitable model to our data, and `loess` is not necessarily the most suitable model.
:::
::: { .callout-note collapse="true"}
## What does that ribbom mean?
You will see that `geom_smoot()` has fitted a _line_ (the model fit), and a semitransparent _ribbon_ that looks like it might be describing error in your data.
However, the ribbon isn't describing error in your data - it's describing error in the model fit. Many models fit your data more-or-less well, and the ribbon shows the extent of what models might fit well.
More technically, the ribbon shows the **standard error** of the model fit.
:::
### Use a logarithmic $y$-axis
It is usual to draw growth curves using a logarithmic $y$-axis. There are a number of reasons for doing this, but the main one is that plotting OD on a _linear_ $y$-axis is misleading about the start of the logarithmic phase of growth.
The beginning of logarithmic growth - though logarithmic - involves small changes in absolute OD that are not easy to distinguish on a linear scale. Plotting OD on a _logarithmic_ scale makes it easier to identify the start of the log phase.
To set a logarithmic $y$-axis, we add a _style layer_: `scale_y_log10()`
```{r}
#| eval: false
fig <- ggplot(data, aes(x=time, y=OD600, color=medium)) + # Declare the dataset/base layer
geom_point() + # Add a marker for each datapoint
geom_smooth() + # Fit a default curve to the data
scale_y_log10() # Make the y-axis logarithmic
```
and, to make the graph easier to interpret we can add logarithmic $y$-axis ticks with the `annotation_logticks()` style layer:
```{r}
#| eval: false
fig <- ggplot(data, aes(x=time, y=OD600, color=medium)) + # Declare the dataset/base layer
geom_point() + # Add a marker for each datapoint
geom_smooth() + # Fit a default curve to the data
scale_y_log10() + # Make the y-axis logarithmic
annotation_logticks(sides="l") # Add logarithmic y-axis ticks
```
::: { .callout-important title="Task" }
**Use the `WebR` cell below to make the y-axis logarithmic and add logarithmic axis ticks.**
:::
```{webr-r}
# Make the y-axis of the graph logarithmic, using this cell
```
::: { .callout-caution collapse="true" }
## Result
The figure (@fig-ggplot-04) now has a logarithmic $y$-axis (and a linear $x$-axis, hence "semilog plot"), and it is clear that, compared to @fig-ggplot-04, the logarithmic growth visibly starts earlier.
![A `ggplot()` graph of three growth curves, with growth medium indicated by colour and a best-fit `loess` curve, using a logarithmic $y$-axis.](assets/images/ggplot-04.png){#fig-ggplot-04 width=80%}
:::
### Making a monochrome plot
The plot looks pretty good just now but, for publication, we might want to make the plot black and white, or _greyscale_ to suit a publisher's requirements. There are three things we can do to make our plot publication-ready in this way.
First, we need to set the colour scheme to greyscale. We can do this by adding the `scale_colour_grey()` style layer. Next, we change the overall `ggplot2` theme to be black-and-white, with the `theme_bw()` style layer. Finally, we turn off the grid markings, with specific `theme()` style layer instructions. Putting these together, we get:
```{r}
#| eval: false
fig <- ggplot(data, aes(x=time, y=OD600, color=medium)) + # Declare the dataset/base layer
geom_point() + # Add a marker for each datapoint
geom_smooth() + # Fit a default curve to the data
scale_y_log10() + # Make the y-axis logarithmic
annotation_logticks(sides="l") + # Add logarithmic y-axis ticks
scale_colour_grey() + # Convert colours to greyscale
theme_bw() + # Make the theme black and white
theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank()) # Remove grid lines
```
::: { .callout-important title="Task" }
**Use the `WebR` cell below to generate a black and white publication-ready plot.**
:::
```{webr-r}
# Make the plot monochrome, using this cell
```
::: { .callout-caution collapse="true" }
## Result
The resulting figure (@fig-ggplot-05) has replaced the colour scheme with greyscale, removed the gridlines, and changed the overall theme to black-and-white.
![A `ggplot()` graph of three growth curves, with growth medium indicated by grey level and a best-fit `loess` curve, plotted with a logarithmic $y$-axis.](assets/images/ggplot-05.png){#fig-ggplot-05 width=80%}
:::
## Summary
::: { .callout-note title="Well Done!"}
After successfully working through this section you should be able to:
- import microbial growth data into `R`
- use `R` and `ggplot2` to visualise microbial growth data
- interpret the meaning of microbial growth data
:::
::: { .callout-important }
**Please answer the questions below in the formative quiz on MyPlace**
- [MyPlace formative quiz]({{< var myplace.quiz1 >}})
:::