Skip to content

Commit

Permalink
improved concentration estimates in example
Browse files Browse the repository at this point in the history
  • Loading branch information
ec363 committed Nov 24, 2024
1 parent 3deea14 commit 8b0d677
Show file tree
Hide file tree
Showing 8 changed files with 190 additions and 171 deletions.
266 changes: 138 additions & 128 deletions docs/articles/fpcountr.html

Large diffs are not rendered by default.

Binary file modified docs/articles/fpcountr_files/figure-html/unnamed-chunk-43-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ articles:
data_parsing: data_parsing.html
fpcountr: fpcountr.html
path_lengths: path_lengths.html
last_built: 2024-11-22T00:31Z
last_built: 2024-11-24T13:45Z
urls:
reference: https://ec363.github.io/fpcountr/reference
article: https://ec363.github.io/fpcountr/articles
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/search.json

Large diffs are not rendered by default.

Binary file modified man/figures/getconc_plot6b_ecmax_models_all_logplot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 22 additions & 22 deletions vignettes/data/example_fluorescence_parsed.csv
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
"instrument","plate","seal","channel_name","channel_ex","channel_em","media","calibrant","protein","replicate","volume","dilution","mw_gmol1","concentration_ngul","well","blueblue040","blueblue050","blueblue060","blueblue070","blueblue080","blueblue090","blueblue100","blueblue110","blueblue120","row","column"
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",1,200,1,27777.46784,4.84232780960869,"A1",133,737,2960,9097,22595,50522,NA,NA,NA,"A",1
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",1,200,0.5,27777.46784,2.42116390480435,"A2",68,394,1588,4875,12140,27526,57864,NA,NA,"A",2
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",1,200,0.25,27777.46784,1.21058195240217,"A3",36,219,886,2739,6849,15485,32882,64351,NA,"A",3
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",1,200,0.125,27777.46784,0.605290976201086,"A4",19,131,540,1662,4154,9504,20037,39740,NA,"A",4
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",1,200,0.0625,27777.46784,0.302645488100543,"A5",11,88,370,1153,2868,6530,13895,27655,51126,"A",5
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",1,200,0.03125,27777.46784,0.151322744050272,"A6",7,65,278,861,2168,4945,10525,20781,38599,"A",6
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",1,200,0.015625,27777.46784,0.0756613720251358,"A7",4,54,233,730,1830,4166,8822,17547,32679,"A",7
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",1,200,0.0078125,27777.46784,0.0378306860125679,"A8",4,49,213,663,1668,3787,8036,15969,29849,"A",8
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",1,200,0.00390625,27777.46784,0.018915343006284,"A9",3,46,200,631,1582,3604,7658,15187,28256,"A",9
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",1,200,0.001953125,27777.46784,0.00945767150314198,"A10",3,45,198,625,1555,3547,7516,14953,27956,"A",10
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",1,200,0.000976563,27777.46784,0.00472883817273489,"A11",3,45,194,608,1523,3502,7404,14721,27357,"A",11
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",1,200,1,27777.46784,6.8188846127161,"A1",133,737,2960,9097,22595,50522,NA,NA,NA,"A",1
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",1,200,0.5,27777.46784,3.40944230635805,"A2",68,394,1588,4875,12140,27526,57864,NA,NA,"A",2
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",1,200,0.25,27777.46784,1.70472115317902,"A3",36,219,886,2739,6849,15485,32882,64351,NA,"A",3
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",1,200,0.125,27777.46784,0.852360576589512,"A4",19,131,540,1662,4154,9504,20037,39740,NA,"A",4
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",1,200,0.0625,27777.46784,0.426180288294756,"A5",11,88,370,1153,2868,6530,13895,27655,51126,"A",5
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",1,200,0.03125,27777.46784,0.213090144147378,"A6",7,65,278,861,2168,4945,10525,20781,38599,"A",6
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",1,200,0.015625,27777.46784,0.106545072073689,"A7",4,54,233,730,1830,4166,8822,17547,32679,"A",7
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",1,200,0.0078125,27777.46784,0.0532725360368445,"A8",4,49,213,663,1668,3787,8036,15969,29849,"A",8
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",1,200,0.00390625,27777.46784,0.0266362680184223,"A9",3,46,200,631,1582,3604,7658,15187,28256,"A",9
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",1,200,0.001953125,27777.46784,0.0133181340092111,"A10",3,45,198,625,1555,3547,7516,14953,27956,"A",10
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",1,200,0.000976563,27777.46784,0.00665907041404787,"A11",3,45,194,608,1523,3502,7404,14721,27357,"A",11
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","none",1,200,0,27777.46784,0,"A12",3,43,191,595,1504,3400,7237,14436,26968,"A",12
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",2,200,1,27777.46784,4.84232780960869,"B1",134,751,2986,9180,22769,50846,NA,NA,NA,"B",1
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",2,200,0.5,27777.46784,2.42116390480435,"B2",74,431,1720,5292,13175,29736,62560,NA,NA,"B",2
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",2,200,0.25,27777.46784,1.21058195240217,"B3",35,219,889,2718,6806,15475,32743,64286,NA,"B",3
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",2,200,0.125,27777.46784,0.605290976201086,"B4",19,132,546,1676,4197,9541,20245,40142,NA,"B",4
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",2,200,0.0625,27777.46784,0.302645488100543,"B5",11,93,385,1199,2984,6775,14413,28567,53189,"B",5
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",2,200,0.03125,27777.46784,0.151322744050272,"B6",6,66,282,874,2213,5043,10656,21174,39288,"B",6
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",2,200,0.015625,27777.46784,0.0756613720251358,"B7",5,55,238,741,1859,4213,9000,17952,33177,"B",7
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",2,200,0.0078125,27777.46784,0.0378306860125679,"B8",3,48,212,666,1669,3798,8077,16088,29973,"B",8
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",2,200,0.00390625,27777.46784,0.018915343006284,"B9",3,46,203,628,1584,3608,7668,15222,28389,"B",9
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",2,200,0.001953125,27777.46784,0.00945767150314198,"B10",3,45,195,612,1541,3506,7426,14741,27555,"B",10
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",2,200,0.000976563,27777.46784,0.00472883817273489,"B11",3,44,195,611,1519,3491,7389,14785,27489,"B",11
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",2,200,1,27777.46784,6.8188846127161,"B1",134,751,2986,9180,22769,50846,NA,NA,NA,"B",1
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",2,200,0.5,27777.46784,3.40944230635805,"B2",74,431,1720,5292,13175,29736,62560,NA,NA,"B",2
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",2,200,0.25,27777.46784,1.70472115317902,"B3",35,219,889,2718,6806,15475,32743,64286,NA,"B",3
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",2,200,0.125,27777.46784,0.852360576589512,"B4",19,132,546,1676,4197,9541,20245,40142,NA,"B",4
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",2,200,0.0625,27777.46784,0.426180288294756,"B5",11,93,385,1199,2984,6775,14413,28567,53189,"B",5
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",2,200,0.03125,27777.46784,0.213090144147378,"B6",6,66,282,874,2213,5043,10656,21174,39288,"B",6
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",2,200,0.015625,27777.46784,0.106545072073689,"B7",5,55,238,741,1859,4213,9000,17952,33177,"B",7
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",2,200,0.0078125,27777.46784,0.0532725360368445,"B8",3,48,212,666,1669,3798,8077,16088,29973,"B",8
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",2,200,0.00390625,27777.46784,0.0266362680184223,"B9",3,46,203,628,1584,3608,7668,15222,28389,"B",9
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",2,200,0.001953125,27777.46784,0.0133181340092111,"B10",3,45,195,612,1541,3506,7426,14741,27555,"B",10
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","mTagBFP2",2,200,0.000976563,27777.46784,0.00665907041404787,"B11",3,44,195,611,1519,3491,7389,14785,27489,"B",11
"spark1","clear","qpcrseal","blueblue","400/20","465/35","T5N15_pi","mTagBFP2","none",2,200,0,27777.46784,0,"B12",3,46,201,634,1577,3593,7657,15177,28279,"B",12
"spark1","clear","qpcrseal","blueblue","400/20","465/35","","","",NA,NA,NA,NA,NA,"C1",NA,NA,NA,NA,NA,NA,NA,NA,NA,"C",1
"spark1","clear","qpcrseal","blueblue","400/20","465/35","","","",NA,NA,NA,NA,NA,"C2",NA,NA,NA,NA,NA,NA,NA,NA,NA,"C",2
Expand Down
47 changes: 28 additions & 19 deletions vignettes/fpcountr.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ proteinconcs <- get_conc_ecmax(
protein_seq = "MVHHHHHHGSGVSKGEELIKENMHMKLYMEGTVDNHHFKCTSEGEGKPYEGTQTMRIKVVEGGPLPFAFDILATSFLYGSKTFINHTQGIPDFFKQSFPEGFTWERVTTYEDGGVLTATQDTSLQDGCLIYNVKIRGVNFTSNGPVMQKKTLGWEAFTETLYPADGGLEGRNDMALKLVGGSHLIANAKTTYRSKKPAKNLKMPGVYYVDYRLERIKEANNETYVEQHEVAVARYCDLPSKLGHKLN",
processed_spectrum_csv = "fp_quantification/example_absorbance_parsed_processed.csv",
# wells_to_remove = c(),
corr_method = "scatter", wav_to_use1 = 500, wav_to_use2 = 315,
corr_method = "scatter", wav_to_use1 = 500, wav_to_use2 = 450,
outfolder = "fp_quantification/concentration",
)
```
Expand All @@ -405,7 +405,7 @@ proteinconcs <- get_conc_ecmax(
protein_seq = "MVHHHHHHGSGVSKGEELIKENMHMKLYMEGTVDNHHFKCTSEGEGKPYEGTQTMRIKVVEGGPLPFAFDILATSFLYGSKTFINHTQGIPDFFKQSFPEGFTWERVTTYEDGGVLTATQDTSLQDGCLIYNVKIRGVNFTSNGPVMQKKTLGWEAFTETLYPADGGLEGRNDMALKLVGGSHLIANAKTTYRSKKPAKNLKMPGVYYVDYRLERIKEANNETYVEQHEVAVARYCDLPSKLGHKLN",
processed_spectrum_csv = "fp_quantification/example_absorbance_parsed_processed.csv",
# wells_to_remove = c(),
corr_method = "scatter", wav_to_use1 = 500, wav_to_use2 = 315,
corr_method = "scatter", wav_to_use1 = 500, wav_to_use2 = 450,
outfolder = "fp_quantification/concentration",
csv_only = TRUE
)
Expand Down Expand Up @@ -507,12 +507,16 @@ data_to_display |>
# gt::tab_options(container.height = gt::px(350)) # this is approx 10 rows: the header + 9 rows
```

The example data should give 4.8 ng/ul for the top concentration.
The example data should give 6.8 ng/ul for the top concentration.

Plot3a that illustrates the model fitting to the spectra and identification of the excitation maximum of mTagBFP2:

<p align="center">
<img src="../man/figures/getconc_plot3a_abs_spectra_geomsmooth.png" width="600" />
</p>

Plot6b that compares the linear fit of the concentrations across normalisation techniques:

<p align="center">
<img src="../man/figures/getconc_plot6b_ecmax_models_all_logplot.png" width="500" />
</p>
Expand Down Expand Up @@ -1299,7 +1303,7 @@ data_to_display |>
# gt::tab_options(container.height = gt::px(350)) # this is approx 10 rows: the header + 9 rows
```

At the final timepoint, we can see that the abundance of mTagBFP2 in these samples was in the range of 40,000 to over 200,000 molecules per cell.
At the final timepoint, we can see that the abundance of mTagBFP2 in these samples was in the range of 50,000 to over 300,000 molecules per cell.

<br>

Expand Down Expand Up @@ -1425,7 +1429,7 @@ data_to_display |>
# gt::tab_options(container.height = gt::px(350)) # this is approx 10 rows: the header + 9 rows
```

Concentration values are estimated at 8.5 - 52 uM.
Concentration values are estimated at 10-70 uM.

<br>

Expand All @@ -1435,7 +1439,7 @@ Concentration values are estimated at 8.5 - 52 uM.

<br>

These files can then be used to analyse data in absolute quantities...
These files can then be used to analyse data in absolute quantities... Note that arbitrary values (left hand axis) tell us nothing about mTagBFP2 abundance or its likely effect on the cell, since the values are biologically meaningless. Absolute values (right hand axis) however, allow us to compare mTagBFP2 levels to the cellular context. For example, our vector effectively overproduces proteins to levels higher than the most abundant native protein (EF-Tu), or up to 20% of the proteome.

```{r eval=TRUE, echo=FALSE, warning=FALSE}
Expand All @@ -1455,34 +1459,38 @@ data.to.plot <- data.to.plot |>
dplyr::ungroup()
# plot 2 axes for arbitrary and absolute values
scale = 350000/24000
# scale # 14.66
# percent_of_all_proteins <- 500000/2.36e6 https://book.bionumbers.org/how-many-proteins-are-in-a-cell/
# percent_of_all_proteins # 21%
# if 500,000 = 21%, what is ef-tu at 6% total?
# 0.06*2.36e6
# 141,600 proteins/cell
scale = 500000/24000 # 20.83
# % of proteins that is 500,000? # 500000/2.36e6 # 21% # https://book.bionumbers.org/how-many-proteins-are-in-a-cell/
# if 500,000 = 21%, what is ef-tu at 6% total? # 0.06*2.36e6 # 141,600 proteins/cell
plot1 <- ggplot2::ggplot(data.to.plot |>
dplyr::filter(time_h == 10)) +
# arbitrary values:
# ggplot2::geom_point(ggplot2::aes(x = ara_pc, y = blueblue/OD700), size = 0.5, colour = "#7ABF26") + # 0 - 30,000
# # test only:
# # arbitrary values:
# # ggplot2::geom_point(ggplot2::aes(x = ara_pc, y = blueblue/OD700), size = 0.5, colour = "#7ABF26") + # 0 - 30,000
# ggplot2::geom_point(ggplot2::aes(x = ara_pc, y = (normalised_blueblue/normalised_OD_cm1), colour = "raw"), size = 0.5) + # 0-24,000
# absolutes:
ggplot2::geom_point(ggplot2::aes(x = ara_pc, y = calibratedmTagBFP2_perCell/scale #, colour = "absolute"
), size = 0.5) + # 0-350,000
# # absolutes:
# ggplot2::geom_point(ggplot2::aes(x = ara_pc, y = calibratedmTagBFP2_perCell, colour = "absolute"), size = 0.5) + # 0-500,000
# absolutes with scaling:
ggplot2::geom_point(ggplot2::aes(x = ara_pc, y = calibratedmTagBFP2_perCell/scale), size = 0.5) + # 0-500,000
ggplot2::geom_point(ggplot2::aes(x = ara_pc, y = mean/scale), shape = 1, size = 2) +
# ggplot2::geom_errorbar(ggplot2::aes(x = ara_pc, ymin = mean-sd, ymax=mean+sd), size = 0.5) +
ggplot2::scale_x_discrete("arabinose (%)") +
# # test only:
# ggplot2::scale_y_continuous() +
ggplot2::scale_y_continuous(sec.axis = ggplot2::sec_axis(~.*scale, name = "molecules/cell")) +
ggplot2::ylab("arbitrary units") +
ggplot2::theme_bw() +
ggplot2::theme(
aspect.ratio = 0.5,
panel.grid = ggplot2::element_blank(),
axis.text.x = ggplot2::element_text(angle = 90, hjust = 1, vjust = 0.5),
# axis.line.y.right = ggplot2::element_line(color = "#D63C79"),
axis.ticks.y.right = ggplot2::element_line(color = "#D63C79"),
axis.text.y.right = ggplot2::element_text(color = "#D63C79"),
axis.title.y.right = ggplot2::element_text(color = "#D63C79")
Expand All @@ -1496,6 +1504,7 @@ plot1 <- ggplot2::ggplot(data.to.plot |>
ggplot2::ggtitle('Abundance of mTagBFP2 and relationship to the E. coli proteome') # produced in DH10B from a SEVA vector set
plot1
```

<br>
Expand Down

0 comments on commit 8b0d677

Please sign in to comment.