Commit c292ae47 authored by Vallo Varik's avatar Vallo Varik
Browse files

Add fourth task

parent 18459463
......@@ -49,3 +49,25 @@ control i.e. you know now that there is nothing extra suspicious goin on. Raw OD
were two biological replicates on third day. There are multiple ways to
overcome this, but for now, I recommend to solve by using `group` parameter
of `aes` e.g. `ggplot(aes(..., group = Plt))`.
## Transform
To quantify the growth (either rate or yield) one needs to substract the
background from raw OD. There are two ways to do that: 1) using a readout from
just the medium; 2) using the smallest value per well (across the time). I
prefer to use the former whenever possible.
3. Add an `OD` variable to your dataframe for background subtracted OD. You
need two things: 1) to `group` the data and 2) a way to point to background
wells. Since grouping takes a bit practice until it becomes easy, I will
just say that you need to subtract background on each day, on each plate,
in each timepoint. The wells with no bacteria were encoded to have `uM =
-1` i.e. after appropriate grouping it comes down to: `OD = OD/OD[uM ==
-1]`. Input [data](doc/tasks/03_dat.csv) is the same as in step 3 above.
And output should look like shown below (first six rows and only subset of columns shown).
```{r}
read_csv('doc/tasks/04_out.csv') %>%
select(Date:Well, Time_h, RawOD, uM, OD)
```
......@@ -33,3 +33,33 @@ goin on. Raw OD will suffice for that.
multiple ways to overcome this, but for now, I recommend to solve by
using `group` parameter of `aes`
e.g. `ggplot(aes(..., group = Plt))`.
## Transform
To quantify the growth (either rate or yield) one needs to substract the
background from raw OD. There are two ways to do that: 1) using a
readout from just the medium; 2) using the smallest value per well
(across the time). I prefer to use the former whenever possible.
1. Add an `OD` variable to your dataframe for background subtracted OD.
You need two things: 1) to `group` the data and 2) a way to point to
background wells. Since grouping takes a bit practice until it
becomes easy, I will just say that you need to subtract background
on each day, on each plate, in each timepoint. The wells with no
bacteria were encoded to have `uM = -1` i.e. after appropriate
grouping it comes down to: `OD = OD/OD[uM == -1]`. Input
[data](doc/tasks/03_dat.csv) is the same as in step 3 above. And
output should look like shown below (first six rows and only subset
of columns shown).
<!-- -->
## # A tibble: 6 × 7
## Date Plt Well Time_h RawOD uM OD
## <date> <dbl> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 2022-05-04 4 M1 0 0.217 100 0.03
## 2 2022-05-04 4 M1 1.08 0.233 100 0.04
## 3 2022-05-04 4 M1 2.16 0.213 100 0.018
## 4 2022-05-04 4 M1 3.24 0.213 100 0.021
## 5 2022-05-04 4 M1 4.32 0.212 100 0.022
## 6 2022-05-04 4 M1 5.41 0.211 100 0.022
Date,Plt,Well,WellID,Time_h,RawOD,Col,Row,Cpd,Qrt,uM,Species,Strain,Nick,Dil,OD
2022-05-04,4,M1,1-4-M1,0,0.217,1,M,Azithromycin,1,100,S. flexneri,M90T,Sf,100x,0.03
2022-05-04,4,M1,1-4-M1,1.08,0.233,1,M,Azithromycin,1,100,S. flexneri,M90T,Sf,100x,0.04
2022-05-04,4,M1,1-4-M1,2.16,0.213,1,M,Azithromycin,1,100,S. flexneri,M90T,Sf,100x,0.018
2022-05-04,4,M1,1-4-M1,3.24,0.213,1,M,Azithromycin,1,100,S. flexneri,M90T,Sf,100x,0.021
2022-05-04,4,M1,1-4-M1,4.32,0.212,1,M,Azithromycin,1,100,S. flexneri,M90T,Sf,100x,0.022
2022-05-04,4,M1,1-4-M1,5.41,0.211,1,M,Azithromycin,1,100,S. flexneri,M90T,Sf,100x,0.022
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment