This page includes a full overview of fpcountr
starting
from package installation, through all steps of an example calibration
and experimental data analysis. For more detail on the steps of this
workflow, see the Articles.
Installation
The package is written in R and can be installed straight from GitHub:
# install.packages("devtools") # run this if you don't have devtools installed already
devtools::install_github("ec363/fpcountr") # run this to install fpcountr
You should only need to run the above code once.
Example Scenario
Example Scenario: We wish to work out how many molecules of fluorescent protein are being produced from a vector expressing mTagBFP2.
What we have: experimental data of mTagBFP2 expression, as well as an mTagBFP2 calibration carried out using the FPCountR method.
What we want to do is:
- create conversion factors that describe how blue fluorescence from mTagBFP2 relates to its molecule number in our instrument.
- use these conversion factors to interpret our experiment file, to work out the number of proteins per cell expressed by our mTagBFP2 expression vectors across different conditions.
The package comes with example data of exactly this type, and example code that will allow you to calculate protein numbers.
Example Data
The following example data files are provided with this package:
file | contents |
---|---|
example_absorbance.csv | absorbance spectrum of a dilution series of mTagBFP2 |
example_absorbance_meta.csv | metadata for the above |
example_fluorescence.csv | blue fluorescence data at a range of gains for the dilution series of mTagBFP2 |
example_fluorescence_meta.csv | metadata for the above |
example_experiment.csv | plate reader experiment, using two mTagBFP2 vectors with different origins of replication, induced across a range of inducer concentrations and tracked for 16 hours |
example_experiment_meta.csv | metadata for the above |
This example data will be used in the script below.
To try it yourself, create a new folder for running the script in
this vignette (e.g. call it fpcountr_example
). Open a new R
script in RStudio (File > New File > R Script), save it to that
folder, and navigate to its current working directory (Session > Set
Working Directory > To Source File Location).
To find the example data, run:
system.file("extdata", "", package = "fpcountr", mustWork = TRUE)
This gives you the location of the files. Find this folder, copy all
of the files listed here into a subfolder of the
fpcountr_example
called data
.
Example Code
All the code from here to the end of this vignette can be copied into your own script and run line by line. Most of these functions will take existing data files, process them, and save new files (data as CSV files, and plots as PDF files). The data files will be required for subsequent functions, whereas the plots are intended to let you check the progress of the functions and identify if something has gone wrong.
Load the fpcountr
package and verify that you are in the
fpcountr_example
directory.
Protein concentration determination with the ECmax assay
1. Parse absorbance spectrum data
The first thing we need to do is to process our absorbance spectrum data file, but the exported data file is not in the right format for our processing function. So before we can process the data, we need to extract the data from the exported data file, tidy it and join it to metadata. This process is called parsing.
Parsing: All raw data files exported from plate readers require ‘parsing’ before they can be processed by downstream functions. See
vignette("data_parsing")
for more details.
Metadata: Parsing requires that metadata be joined to the data. While it is largely up to you what aspects of your experiments you record as metadata, each data-processing function in FPCountR expects a a minimum amount of metadata that is required for downstream analysis. See
vignette("data_parsing")
for details on what these are.
If using a Tecan Spark plate reader running Magellan software: use
parse_magellan_spectrum()
. If using other plate readers:
see vignette("data_parsing")
.
We used a Spark, so we’ll use parse_magellan_spectrum()
:
this takes the absorbance data file
(example_absorbance.csv
), in the export format provided by
our plate reader, and a user-produced metadata file
(example_absorbance_meta.csv
), and parses it into the
correct format.
parsed_data_spectrum <- parse_magellan_spectrum(
data_csv = "data/example_absorbance.csv",
metadata_csv = "data/example_absorbance_meta.csv",
wellstart = "A1", wellend = "B12"
)
## 24 wells identified.
Arguments required:
-
data_csv
- file path of the absorbance data file -
metadata_csv
- file path of the metadata file -
wellstart
= “A1”,wellend
= “B12” - first and last wells of the data
Warnings expected:
- You will likely get the warning
NAs introduced by coercion
. This just means that empty wells were filled in withNA
values.
Outputs produced:
- A processed data file of the name
[raw data filename]_parsed.csv
(here,example_absorbance_parsed_processed.csv
), in the same location where the data was found. - A dataframe (which we called
parsed_data_spectrum
) of the parsed data is returned, which can be used to inspect the parsing.
View a fragment of the data frame to check.
parsed_data_spectrum[1:24,c(1:100)] # view a fragment of the dataframe
instrument | plate | seal | media | calibrant | protein | replicate | dilution | volume | well | 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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
spark1 | uvclear | noseal | T5N15_pi | mTagBFP2 | mTagBFP2 | 1 | 1.000000000 | 225 | A1 | 3.2934 | 3.2799 | 3.3390 | 3.3396 | 3.3812 | 3.3875 | 3.4014 | 3.3519 | 3.3743 | 3.3190 | 3.4634 | 3.3941 | 3.3317 | 3.3466 | 3.6045 | 3.3346 | 3.3385 | 3.3678 | 3.4163 | 3.4045 | 3.3693 | 3.3348 | 3.5089 | 3.3959 | 3.4013 | 3.4789 | 3.5905 | 3.7117 | 3.7253 | 3.7382 | 3.6253 | 3.4443 | 3.3550 | 3.1695 | 2.8252 | 2.4266 | 2.0124 | 1.6102 | 1.2596 | 0.9745 | 0.7787 | 0.6370 | 0.5589 | 0.5031 | 0.4586 | 0.4224 | 0.4064 | 0.4018 | 0.4022 | 0.4070 | 0.4187 | 0.4318 | 0.4473 | 0.4626 | 0.4797 | 0.5015 | 0.5268 | 0.5512 | 0.5748 | 0.5920 | 0.6062 | 0.6182 | 0.6289 | 0.6525 | 0.6715 | 0.6958 | 0.7082 | 0.7030 | 0.6658 | 0.6275 | 0.5976 | 0.5883 | 0.5898 | 0.5914 | 0.5731 | 0.5318 | 0.4451 | 0.3631 | 0.2895 | 0.2397 | 0.1733 | 0.1359 | 0.1166 | 0.1039 | 0.0951 | 0.0886 | 0.0841 | 0.0820 | 0.0806 | 0.0782 |
spark1 | uvclear | noseal | T5N15_pi | mTagBFP2 | mTagBFP2 | 1 | 0.500000000 | 225 | A2 | 3.2612 | 3.3153 | 3.3262 | 3.3553 | 3.4475 | 3.3497 | 3.3685 | 3.3631 | 3.3890 | 3.3843 | 3.3826 | 3.4219 | 3.3178 | 3.3496 | 3.3306 | 3.4271 | 3.3804 | 3.3450 | 3.3397 | 3.3883 | 3.3744 | 3.3622 | 3.5758 | 3.4990 | 3.4029 | 3.5028 | 3.6401 | 3.6825 | 3.9397 | 3.7502 | 3.6304 | 3.5345 | 3.3159 | 3.1504 | 2.7906 | 2.4168 | 2.0340 | 1.6039 | 1.2347 | 0.9573 | 0.7499 | 0.6123 | 0.5355 | 0.4833 | 0.4405 | 0.4033 | 0.3888 | 0.3859 | 0.3876 | 0.3936 | 0.4054 | 0.4200 | 0.4363 | 0.4533 | 0.4717 | 0.4947 | 0.5182 | 0.5455 | 0.5691 | 0.5896 | 0.6035 | 0.6147 | 0.6277 | 0.6436 | 0.6715 | 0.6964 | 0.7092 | 0.7038 | 0.6644 | 0.6260 | 0.5996 | 0.5877 | 0.5900 | 0.5912 | 0.5754 | 0.5299 | 0.4455 | 0.3667 | 0.2840 | 0.2191 | 0.1654 | 0.1314 | 0.1099 | 0.0981 | 0.0882 | 0.0813 | 0.0778 | 0.0765 | 0.0739 | 0.0714 |
spark1 | uvclear | noseal | T5N15_pi | mTagBFP2 | mTagBFP2 | 1 | 0.250000000 | 225 | A3 | 3.2943 | 3.3587 | 3.3668 | 3.3376 | 3.3925 | 3.3521 | 3.3763 | 3.3388 | 3.3662 | 3.3503 | 3.3968 | 3.3796 | 3.3023 | 3.3271 | 3.4081 | 3.3153 | 3.2824 | 3.3790 | 3.5070 | 3.3855 | 3.3766 | 3.3514 | 3.4241 | 3.4321 | 3.3681 | 3.4388 | 3.5811 | 3.8147 | 3.8244 | 3.6775 | 3.5795 | 3.5555 | 3.3279 | 3.0927 | 2.7866 | 2.4192 | 1.9948 | 1.5810 | 1.1987 | 0.9367 | 0.7338 | 0.5980 | 0.5226 | 0.4671 | 0.4252 | 0.3936 | 0.3782 | 0.3755 | 0.3770 | 0.3835 | 0.3958 | 0.4108 | 0.4282 | 0.4450 | 0.4646 | 0.4867 | 0.5119 | 0.5387 | 0.5649 | 0.5838 | 0.5972 | 0.6102 | 0.6216 | 0.6428 | 0.6663 | 0.6919 | 0.7047 | 0.7002 | 0.6616 | 0.6236 | 0.5943 | 0.5833 | 0.5858 | 0.5890 | 0.5723 | 0.5235 | 0.4426 | 0.3617 | 0.2852 | 0.2174 | 0.1596 | 0.1256 | 0.1051 | 0.0940 | 0.0844 | 0.0779 | 0.0752 | 0.0720 | 0.0709 | 0.0687 |
spark1 | uvclear | noseal | T5N15_pi | mTagBFP2 | mTagBFP2 | 1 | 0.125000000 | 225 | A4 | 3.2608 | 3.3900 | 3.3016 | 3.3737 | 3.4401 | 3.3511 | 3.4485 | 3.3411 | 3.5792 | 3.4078 | 3.4102 | 3.3064 | 3.8285 | 3.3917 | 3.2961 | 3.2814 | 3.8080 | 3.3650 | 3.2824 | 3.3944 | 3.4117 | 3.3063 | 3.3953 | 3.4396 | 3.4291 | 3.4860 | 3.5467 | 3.7367 | 3.9342 | 3.7427 | 3.6230 | 3.4140 | 3.3619 | 3.1178 | 2.7753 | 2.3828 | 1.9684 | 1.5515 | 1.2404 | 0.9234 | 0.7298 | 0.5899 | 0.5132 | 0.4657 | 0.4245 | 0.3868 | 0.3728 | 0.3699 | 0.3718 | 0.3793 | 0.3921 | 0.4073 | 0.4246 | 0.4395 | 0.4611 | 0.4835 | 0.5076 | 0.5378 | 0.5621 | 0.5821 | 0.5958 | 0.6071 | 0.6205 | 0.6389 | 0.6650 | 0.6903 | 0.7032 | 0.6985 | 0.6590 | 0.6188 | 0.5916 | 0.5822 | 0.5843 | 0.5864 | 0.5712 | 0.5252 | 0.4418 | 0.3550 | 0.2787 | 0.2143 | 0.1593 | 0.1272 | 0.1047 | 0.0905 | 0.0821 | 0.0761 | 0.0720 | 0.0706 | 0.0684 | 0.0662 |
spark1 | uvclear | noseal | T5N15_pi | mTagBFP2 | mTagBFP2 | 1 | 0.062500000 | 225 | A5 | 3.2948 | 3.3343 | 3.3076 | 3.5574 | 3.7229 | 3.8790 | 3.4160 | 3.3230 | 3.8098 | 3.3552 | 3.3509 | 3.6952 | 3.4518 | 3.3204 | 3.2846 | 3.5490 | 3.5252 | 3.3531 | 3.3292 | 3.5832 | 3.3807 | 3.3015 | 3.4221 | 3.5056 | 3.4159 | 3.4701 | 3.4884 | 3.6432 | 3.9620 | 3.6865 | 3.6345 | 3.4748 | 3.3218 | 3.1609 | 2.7651 | 2.3884 | 1.9838 | 1.5570 | 1.2196 | 0.9282 | 0.7199 | 0.5845 | 0.5100 | 0.4606 | 0.4194 | 0.3833 | 0.3695 | 0.3660 | 0.3690 | 0.3761 | 0.3896 | 0.4046 | 0.4223 | 0.4389 | 0.4581 | 0.4824 | 0.5056 | 0.5352 | 0.5614 | 0.5802 | 0.5943 | 0.6065 | 0.6195 | 0.6391 | 0.6637 | 0.6893 | 0.7022 | 0.6956 | 0.6598 | 0.6208 | 0.5922 | 0.5801 | 0.5835 | 0.5864 | 0.5704 | 0.5233 | 0.4363 | 0.3568 | 0.2754 | 0.2136 | 0.1568 | 0.1198 | 0.1011 | 0.0903 | 0.0810 | 0.0752 | 0.0698 | 0.0686 | 0.0679 | 0.0656 |
spark1 | uvclear | noseal | T5N15_pi | mTagBFP2 | mTagBFP2 | 1 | 0.031250000 | 225 | A6 | 3.2894 | 3.3136 | 3.3454 | 3.4588 | 3.3556 | 3.3564 | 3.3910 | 3.4368 | 3.2939 | 3.3150 | 3.4114 | 3.4220 | 3.2776 | 3.3441 | 3.7313 | 3.3467 | 3.3102 | 3.3344 | 3.5875 | 3.3132 | 3.3724 | 3.3894 | 3.4423 | 3.3552 | 3.4170 | 3.4920 | 3.5895 | 3.6536 | 3.7007 | 3.6798 | 3.6098 | 3.4690 | 3.2665 | 3.1443 | 2.7748 | 2.3897 | 1.9684 | 1.5552 | 1.1968 | 0.9244 | 0.7280 | 0.5852 | 0.5114 | 0.4653 | 0.4180 | 0.3853 | 0.3694 | 0.3672 | 0.3690 | 0.3768 | 0.3893 | 0.4050 | 0.4230 | 0.4392 | 0.4600 | 0.4830 | 0.5086 | 0.5360 | 0.5611 | 0.5821 | 0.5952 | 0.6074 | 0.6182 | 0.6423 | 0.6644 | 0.6903 | 0.7041 | 0.6947 | 0.6601 | 0.6205 | 0.5935 | 0.5815 | 0.5844 | 0.5861 | 0.5713 | 0.5281 | 0.4392 | 0.3565 | 0.2826 | 0.2217 | 0.1548 | 0.1222 | 0.1038 | 0.0918 | 0.0811 | 0.0755 | 0.0711 | 0.0698 | 0.0664 | 0.0645 |
spark1 | uvclear | noseal | T5N15_pi | mTagBFP2 | mTagBFP2 | 1 | 0.015625000 | 225 | A7 | 3.2930 | 3.3226 | 3.3383 | 3.3680 | 3.3786 | 3.4243 | 3.4188 | 3.2832 | 3.3297 | 3.3482 | 3.4077 | 3.1910 | 3.2515 | 3.3426 | 3.2928 | 3.2119 | 3.5754 | 3.3134 | 3.3321 | 3.3449 | 3.4932 | 3.3675 | 3.3166 | 3.3769 | 3.3969 | 3.4915 | 3.4730 | 3.6856 | 3.9582 | 3.6629 | 3.6329 | 3.4022 | 3.3242 | 3.1102 | 2.7530 | 2.3679 | 1.9701 | 1.5259 | 1.1940 | 0.9354 | 0.7292 | 0.5946 | 0.5090 | 0.4588 | 0.4169 | 0.3837 | 0.3693 | 0.3661 | 0.3683 | 0.3750 | 0.3888 | 0.4044 | 0.4210 | 0.4376 | 0.4577 | 0.4818 | 0.5064 | 0.5335 | 0.5582 | 0.5800 | 0.5944 | 0.6060 | 0.6192 | 0.6390 | 0.6635 | 0.6904 | 0.7033 | 0.6958 | 0.6567 | 0.6200 | 0.5912 | 0.5817 | 0.5826 | 0.5858 | 0.5685 | 0.5221 | 0.4389 | 0.3539 | 0.2804 | 0.2150 | 0.1568 | 0.1218 | 0.1037 | 0.0906 | 0.0802 | 0.0734 | 0.0707 | 0.0680 | 0.0672 | 0.0658 |
spark1 | uvclear | noseal | T5N15_pi | mTagBFP2 | mTagBFP2 | 1 | 0.007812500 | 225 | A8 | 3.2936 | 3.3589 | 3.3350 | 3.3625 | 3.4282 | 3.3435 | 3.3975 | 3.3195 | 3.4037 | 3.3506 | 3.4429 | 3.4356 | 3.2514 | 3.3542 | 3.3768 | 3.2911 | 3.3065 | 3.3331 | 3.3948 | 3.4013 | 3.3414 | 3.3657 | 3.4822 | 3.4367 | 3.4058 | 3.4393 | 3.5555 | 3.8083 | 3.9582 | 3.6781 | 3.6301 | 3.5082 | 3.3226 | 3.1112 | 2.7751 | 2.3880 | 1.9582 | 1.5468 | 1.1743 | 0.9332 | 0.7239 | 0.5811 | 0.5105 | 0.4567 | 0.4144 | 0.3808 | 0.3666 | 0.3638 | 0.3664 | 0.3737 | 0.3863 | 0.4020 | 0.4196 | 0.4357 | 0.4558 | 0.4791 | 0.5056 | 0.5329 | 0.5572 | 0.5755 | 0.5917 | 0.6031 | 0.6166 | 0.6322 | 0.6617 | 0.6866 | 0.6987 | 0.6945 | 0.6564 | 0.6157 | 0.5907 | 0.5797 | 0.5811 | 0.5841 | 0.5661 | 0.5249 | 0.4395 | 0.3510 | 0.2789 | 0.2101 | 0.1550 | 0.1239 | 0.1017 | 0.0905 | 0.0794 | 0.0725 | 0.0699 | 0.0680 | 0.0658 | 0.0639 |
spark1 | uvclear | noseal | T5N15_pi | mTagBFP2 | mTagBFP2 | 1 | 0.003906250 | 225 | A9 | 3.2909 | 3.2733 | 3.3648 | 3.3259 | 3.4149 | 3.3244 | 3.4223 | 3.3273 | 3.3610 | 3.3466 | 3.4147 | 3.2290 | 3.2530 | 3.2955 | 3.2818 | 3.2407 | 3.3298 | 3.2760 | 3.3033 | 3.2598 | 3.3459 | 3.3107 | 3.3930 | 3.3258 | 3.3735 | 3.4647 | 3.5510 | 3.6056 | 3.8181 | 3.6571 | 3.6330 | 3.5236 | 3.3329 | 3.1459 | 2.7684 | 2.4014 | 1.9585 | 1.5504 | 1.2033 | 0.9280 | 0.7252 | 0.5899 | 0.5081 | 0.4628 | 0.4157 | 0.3826 | 0.3698 | 0.3668 | 0.3696 | 0.3763 | 0.3897 | 0.4051 | 0.4225 | 0.4397 | 0.4593 | 0.4829 | 0.5110 | 0.5366 | 0.5626 | 0.5800 | 0.5964 | 0.6084 | 0.6219 | 0.6385 | 0.6692 | 0.6929 | 0.7060 | 0.7020 | 0.6609 | 0.6239 | 0.5949 | 0.5830 | 0.5861 | 0.5885 | 0.5710 | 0.5264 | 0.4487 | 0.3545 | 0.2783 | 0.2111 | 0.1568 | 0.1219 | 0.1015 | 0.0893 | 0.0806 | 0.0733 | 0.0706 | 0.0685 | 0.0666 | 0.0649 |
spark1 | uvclear | noseal | T5N15_pi | mTagBFP2 | mTagBFP2 | 1 | 0.001953125 | 225 | A10 | 3.2934 | 3.2913 | 3.3022 | 3.4590 | 3.4969 | 3.3739 | 3.3996 | 3.4085 | 3.3520 | 3.3454 | 3.5889 | 3.6304 | 3.4700 | 3.2959 | 3.6712 | 3.7322 | 3.3344 | 3.3244 | 3.8001 | 3.5168 | 3.3640 | 3.3831 | 3.6125 | 3.4212 | 3.3625 | 3.4817 | 3.6488 | 3.7420 | 3.8355 | 3.6123 | 3.6343 | 3.5446 | 3.3554 | 3.1459 | 2.7516 | 2.3730 | 1.9514 | 1.5284 | 1.1930 | 0.9165 | 0.7063 | 0.5809 | 0.5068 | 0.4559 | 0.4143 | 0.3815 | 0.3649 | 0.3626 | 0.3650 | 0.3717 | 0.3849 | 0.4007 | 0.4178 | 0.4339 | 0.4527 | 0.4764 | 0.5026 | 0.5306 | 0.5551 | 0.5744 | 0.5882 | 0.6002 | 0.6130 | 0.6295 | 0.6559 | 0.6821 | 0.6962 | 0.6911 | 0.6519 | 0.6162 | 0.5864 | 0.5756 | 0.5779 | 0.5799 | 0.5648 | 0.5195 | 0.4363 | 0.3490 | 0.2752 | 0.2122 | 0.1539 | 0.1232 | 0.1011 | 0.0886 | 0.0801 | 0.0753 | 0.0699 | 0.0683 | 0.0664 | 0.0667 |
spark1 | uvclear | noseal | T5N15_pi | mTagBFP2 | mTagBFP2 | 1 | 0.000976563 | 225 | A11 | 3.2608 | 3.2641 | 3.3324 | 3.3941 | 3.4011 | 3.3272 | 3.4094 | 3.3708 | 3.3890 | 3.3852 | 3.5078 | 3.6834 | 3.2936 | 3.2956 | NA | 3.5216 | 3.3097 | 3.2762 | 3.5876 | 3.4762 | 3.3349 | 3.3392 | 3.7558 | 3.4210 | 3.3445 | 3.4422 | 3.6096 | 3.7390 | 3.8251 | 3.6651 | 3.6157 | 3.4447 | 3.3665 | 3.1070 | 2.7651 | 2.3705 | 1.9636 | 1.5345 | 1.1645 | 0.9179 | 0.7197 | 0.5809 | 0.5052 | 0.4540 | 0.4128 | 0.3793 | 0.3652 | 0.3624 | 0.3653 | 0.3724 | 0.3849 | 0.4015 | 0.4184 | 0.4349 | 0.4551 | 0.4782 | 0.5036 | 0.5313 | 0.5545 | 0.5757 | 0.5891 | 0.6011 | 0.6120 | 0.6348 | 0.6574 | 0.6836 | 0.6972 | 0.6877 | 0.6551 | 0.6159 | 0.5874 | 0.5768 | 0.5790 | 0.5809 | 0.5670 | 0.5235 | 0.4407 | 0.3531 | 0.2765 | 0.2115 | 0.1571 | 0.1216 | 0.1015 | 0.0895 | 0.0797 | 0.0738 | 0.0703 | 0.0683 | 0.0660 | 0.0646 |
spark1 | uvclear | noseal | T5N15_pi | mTagBFP2 | none | 1 | NA | 225 | A12 | 3.2570 | 3.3090 | 3.3415 | 3.3510 | 3.3476 | 3.3447 | 3.4181 | 3.3793 | 3.3385 | 3.3196 | 3.6337 | 3.5760 | 3.2549 | 3.3214 | NA | 3.5654 | 3.3158 | 3.3305 | 3.6567 | 3.4572 | 3.3458 | 3.3636 | 3.7070 | 3.4361 | 3.3620 | 3.4791 | 3.7243 | 3.7038 | 3.7232 | 3.6674 | 3.6298 | 3.4699 | 3.3074 | 3.1031 | 2.7870 | 2.3795 | 1.9806 | 1.5580 | 1.1744 | 0.9180 | 0.7191 | 0.5871 | 0.5112 | 0.4584 | 0.4152 | 0.3805 | 0.3665 | 0.3637 | 0.3659 | 0.3735 | 0.3868 | 0.4011 | 0.4188 | 0.4356 | 0.4558 | 0.4794 | 0.5062 | 0.5319 | 0.5592 | 0.5771 | 0.5914 | 0.6043 | 0.6167 | 0.6377 | 0.6608 | 0.6860 | 0.6994 | 0.6904 | 0.6572 | 0.6177 | 0.5904 | 0.5790 | 0.5812 | 0.5832 | 0.5671 | 0.5220 | 0.4419 | 0.3535 | 0.2769 | 0.2147 | 0.1543 | 0.1202 | 0.1024 | 0.0897 | 0.0806 | 0.0731 | 0.0709 | 0.0679 | 0.0665 | 0.0652 |
spark1 | uvclear | noseal | T5N15_pi | mTagBFP2 | mTagBFP2 | 2 | 1.000000000 | 225 | B1 | 3.2622 | 3.3121 | 3.3903 | 3.6836 | 3.4257 | 3.3808 | 3.4499 | 3.4804 | 3.4558 | 3.3016 | 3.4034 | 3.5316 | 3.2732 | 3.3386 | NA | 3.4427 | 3.3662 | 3.3979 | 3.6061 | 3.5345 | 3.3747 | 3.3674 | 3.6928 | 3.4750 | 3.3723 | 3.4984 | 3.6710 | 3.7514 | 3.8388 | 3.6858 | 3.6241 | 3.6030 | 3.3409 | 3.1953 | 2.8693 | 2.4776 | 2.0870 | 1.6365 | 1.2872 | 0.9977 | 0.7943 | 0.6602 | 0.5714 | 0.5174 | 0.4694 | 0.4336 | 0.4139 | 0.4095 | 0.4110 | 0.4161 | 0.4264 | 0.4407 | 0.4570 | 0.4717 | 0.4905 | 0.5126 | 0.5371 | 0.5635 | 0.5869 | 0.6042 | 0.6212 | 0.6314 | 0.6434 | 0.6604 | 0.6849 | 0.7117 | 0.7229 | 0.7164 | 0.6823 | 0.6406 | 0.6109 | 0.6011 | 0.6024 | 0.6041 | 0.5863 | 0.5390 | 0.4661 | 0.3721 | 0.2979 | 0.2300 | 0.1828 | 0.1388 | 0.1203 | 0.1063 | 0.0965 | 0.0881 | 0.0857 | 0.0838 | 0.0813 | 0.0797 |
spark1 | uvclear | noseal | T5N15_pi | mTagBFP2 | mTagBFP2 | 2 | 0.500000000 | 225 | B2 | 3.2615 | 3.2786 | 3.3289 | 3.5397 | 3.4848 | 3.3831 | 3.4237 | 3.4103 | 3.4671 | 3.3550 | 3.4263 | 3.4997 | 3.2650 | 3.2978 | NA | 3.4055 | 3.3194 | 3.3829 | 3.6666 | 3.3555 | 3.3627 | 3.3949 | 3.5660 | 3.3634 | 3.4315 | 3.4951 | 3.6460 | 3.6147 | 3.8329 | 3.7620 | 3.6915 | 3.5492 | 3.3540 | 3.1385 | 2.8210 | 2.4422 | 2.0157 | 1.5962 | 1.2314 | 0.9604 | 0.7623 | 0.6233 | 0.5419 | 0.4882 | 0.4462 | 0.4109 | 0.3952 | 0.3909 | 0.3933 | 0.3996 | 0.4119 | 0.4263 | 0.4425 | 0.4583 | 0.4777 | 0.5004 | 0.5245 | 0.5520 | 0.5774 | 0.5980 | 0.6104 | 0.6231 | 0.6342 | 0.6559 | 0.6785 | 0.7045 | 0.7172 | 0.7108 | 0.6748 | 0.6353 | 0.6067 | 0.5956 | 0.5966 | 0.5989 | 0.5825 | 0.5382 | 0.4491 | 0.3661 | 0.2920 | 0.2292 | 0.1662 | 0.1335 | 0.1127 | 0.1009 | 0.0907 | 0.0838 | 0.0784 | 0.0774 | 0.0765 | 0.0740 |
spark1 | uvclear | noseal | T5N15_pi | mTagBFP2 | mTagBFP2 | 2 | 0.250000000 | 225 | B3 | 3.2896 | 3.3469 | 3.3185 | 3.3641 | 3.3797 | 3.2989 | 3.3664 | 3.3426 | 3.3452 | 3.3142 | 3.4726 | 3.4556 | 3.2925 | 3.3562 | 3.3578 | 3.3473 | 3.3256 | 3.3683 | 3.4075 | 3.4520 | 3.3756 | 3.3612 | 3.5242 | 3.3710 | 3.3664 | 3.4251 | 3.6084 | 3.6015 | 3.7987 | 3.6853 | 3.6437 | 3.6292 | 3.3103 | 3.1232 | 2.8008 | 2.4194 | 2.0022 | 1.5963 | 1.2389 | 0.9533 | 0.7439 | 0.6102 | 0.5312 | 0.4738 | 0.4319 | 0.3964 | 0.3818 | 0.3790 | 0.3808 | 0.3873 | 0.4006 | 0.4160 | 0.4320 | 0.4485 | 0.4670 | 0.4917 | 0.5197 | 0.5445 | 0.5682 | 0.5878 | 0.6032 | 0.6153 | 0.6273 | 0.6509 | 0.6703 | 0.6974 | 0.7105 | 0.7052 | 0.6684 | 0.6282 | 0.5995 | 0.5890 | 0.5907 | 0.5928 | 0.5759 | 0.5297 | 0.4575 | 0.3670 | 0.2902 | 0.2208 | 0.1618 | 0.1281 | 0.1081 | 0.0955 | 0.0862 | 0.0790 | 0.0754 | 0.0736 | 0.0716 | 0.0707 |
spark1 | uvclear | noseal | T5N15_pi | mTagBFP2 | mTagBFP2 | 2 | 0.125000000 | 225 | B4 | 3.2380 | 3.3249 | 3.3002 | 3.3603 | 3.4617 | 3.2994 | 3.4053 | 3.3191 | 3.4669 | 3.3457 | 3.4417 | 3.4639 | 3.2711 | 3.3551 | 3.4307 | 3.3425 | 3.3107 | 3.3406 | 3.3742 | 3.4077 | 3.3843 | 3.3964 | 3.4978 | 3.3612 | 3.3891 | 3.4826 | 3.5438 | 3.6611 | 3.8364 | 3.6908 | 3.6356 | 3.5090 | 3.3281 | 3.0877 | 2.7813 | 2.3816 | 1.9817 | 1.5605 | 1.2022 | 0.9505 | 0.7413 | 0.5976 | 0.5184 | 0.4692 | 0.4243 | 0.3897 | 0.3747 | 0.3723 | 0.3735 | 0.3802 | 0.3933 | 0.4094 | 0.4257 | 0.4424 | 0.4628 | 0.4856 | 0.5106 | 0.5375 | 0.5651 | 0.5828 | 0.5967 | 0.6085 | 0.6201 | 0.6415 | 0.6630 | 0.6901 | 0.7037 | 0.6967 | 0.6640 | 0.6234 | 0.5951 | 0.5832 | 0.5853 | 0.5872 | 0.5716 | 0.5289 | 0.4503 | 0.3601 | 0.2817 | 0.2221 | 0.1604 | 0.1257 | 0.1064 | 0.0931 | 0.0839 | 0.0762 | 0.0740 | 0.0717 | 0.0695 | 0.0674 |
spark1 | uvclear | noseal | T5N15_pi | mTagBFP2 | mTagBFP2 | 2 | 0.062500000 | 225 | B5 | 3.2873 | 3.3641 | 3.3029 | 3.4145 | 3.4475 | 3.3742 | 3.4139 | 3.3274 | NA | 3.3509 | 3.3497 | 3.2534 | 3.3395 | 3.3225 | 3.3712 | 3.6045 | 3.4193 | 3.3694 | 3.3676 | 3.5362 | 3.4696 | 3.3681 | 3.4208 | 3.5131 | 3.4326 | 3.4816 | 3.5418 | 3.8254 | 3.8425 | 3.7735 | 3.5762 | 3.4543 | 3.3098 | 3.1514 | 2.7632 | 2.3860 | 1.9686 | 1.5974 | 1.2111 | 0.9264 | 0.7275 | 0.5901 | 0.5169 | 0.4640 | 0.4191 | 0.3874 | 0.3715 | 0.3697 | 0.3715 | 0.3785 | 0.3913 | 0.4075 | 0.4243 | 0.4414 | 0.4594 | 0.4839 | 0.5117 | 0.5377 | 0.5622 | 0.5816 | 0.5970 | 0.6095 | 0.6223 | 0.6379 | 0.6672 | 0.6927 | 0.7051 | 0.7017 | 0.6616 | 0.6261 | 0.5955 | 0.5837 | 0.5862 | 0.5878 | 0.5735 | 0.5278 | 0.4612 | 0.3522 | 0.2828 | 0.2130 | 0.1636 | 0.1253 | 0.1043 | 0.0925 | 0.0825 | 0.0756 | 0.0722 | 0.0695 | 0.0680 | 0.0667 |
spark1 | uvclear | noseal | T5N15_pi | mTagBFP2 | mTagBFP2 | 2 | 0.031250000 | 225 | B6 | 3.2632 | 3.3036 | 3.3578 | 3.3831 | 3.4197 | 3.4162 | 3.3828 | 3.3283 | 3.2946 | 3.3496 | 3.4568 | 3.1970 | 3.2558 | 3.3001 | 3.3495 | 3.1916 | 3.3262 | 3.3750 | 3.3093 | 3.2897 | 3.3383 | 3.3137 | 3.4054 | 3.3669 | 3.3515 | 3.4877 | 3.6001 | 3.6764 | 3.9521 | 3.6147 | 3.5558 | 3.3958 | 3.2553 | 3.1254 | 2.7601 | 2.3841 | 1.9674 | 1.5712 | 1.2082 | 0.9383 | 0.7246 | 0.5899 | 0.5147 | 0.4571 | 0.4147 | 0.3824 | 0.3676 | 0.3646 | 0.3676 | 0.3738 | 0.3879 | 0.4031 | 0.4200 | 0.4376 | 0.4565 | 0.4791 | 0.5061 | 0.5325 | 0.5589 | 0.5781 | 0.5926 | 0.6045 | 0.6176 | 0.6363 | 0.6621 | 0.6877 | 0.7000 | 0.6955 | 0.6585 | 0.6197 | 0.5915 | 0.5809 | 0.5817 | 0.5843 | 0.5708 | 0.5196 | 0.4443 | 0.3568 | 0.2798 | 0.2163 | 0.1598 | 0.1215 | 0.1016 | 0.0893 | 0.0801 | 0.0740 | 0.0706 | 0.0684 | 0.0666 | 0.0659 |
spark1 | uvclear | noseal | T5N15_pi | mTagBFP2 | mTagBFP2 | 2 | 0.015625000 | 225 | B7 | 3.2952 | 3.4111 | 3.3145 | 3.3268 | 3.3382 | 3.3269 | 3.4227 | 3.3356 | 3.3215 | 3.3224 | 3.4519 | 3.5604 | 3.3040 | 3.3482 | NA | 3.4690 | 3.3356 | 3.3616 | 3.5512 | 3.3491 | 3.3703 | 3.3644 | 3.5594 | 3.4133 | 3.4359 | 3.4816 | 3.6516 | 3.6721 | 3.7369 | 3.6739 | 3.6804 | 3.5281 | 3.3265 | 3.1215 | 2.7994 | 2.3906 | 1.9799 | 1.5551 | 1.1862 | 0.9269 | 0.7188 | 0.5893 | 0.5091 | 0.4595 | 0.4159 | 0.3827 | 0.3688 | 0.3666 | 0.3687 | 0.3760 | 0.3893 | 0.4040 | 0.4223 | 0.4392 | 0.4576 | 0.4825 | 0.5103 | 0.5353 | 0.5618 | 0.5805 | 0.5948 | 0.6087 | 0.6205 | 0.6427 | 0.6647 | 0.6920 | 0.7054 | 0.7002 | 0.6616 | 0.6218 | 0.5938 | 0.5834 | 0.5851 | 0.5879 | 0.5715 | 0.5228 | 0.4402 | 0.3597 | 0.2774 | 0.2131 | 0.1582 | 0.1211 | 0.1017 | 0.0903 | 0.0801 | 0.0737 | 0.0703 | 0.0681 | 0.0657 | 0.0649 |
spark1 | uvclear | noseal | T5N15_pi | mTagBFP2 | mTagBFP2 | 2 | 0.007812500 | 225 | B8 | 3.2878 | 3.2837 | 3.3270 | 3.4123 | 3.3724 | 3.3476 | 3.4497 | 3.3785 | 3.3534 | 3.3298 | 3.3444 | 3.2938 | 3.2592 | 3.3133 | 3.2903 | 3.2847 | 3.3355 | 3.3083 | 3.2873 | 3.3393 | 3.3493 | 3.3279 | 3.3943 | 3.4185 | 3.4271 | 3.4915 | 3.4802 | 3.6436 | 3.8302 | 3.6619 | 3.6181 | 3.4146 | 3.3125 | 3.1098 | 2.7534 | 2.3873 | 1.9699 | 1.5688 | 1.1989 | 0.9274 | 0.7210 | 0.5900 | 0.5167 | 0.4629 | 0.4172 | 0.3829 | 0.3691 | 0.3667 | 0.3687 | 0.3764 | 0.3895 | 0.4055 | 0.4225 | 0.4386 | 0.4588 | 0.4823 | 0.5066 | 0.5373 | 0.5604 | 0.5830 | 0.5945 | 0.6078 | 0.6202 | 0.6371 | 0.6652 | 0.6911 | 0.7028 | 0.6968 | 0.6602 | 0.6205 | 0.5975 | 0.5832 | 0.5846 | 0.5869 | 0.5717 | 0.5298 | 0.4402 | 0.3555 | 0.2765 | 0.2163 | 0.1572 | 0.1218 | 0.1013 | 0.0898 | 0.0808 | 0.0740 | 0.0705 | 0.0681 | 0.0669 | 0.0648 |
spark1 | uvclear | noseal | T5N15_pi | mTagBFP2 | mTagBFP2 | 2 | 0.003906250 | 225 | B9 | 3.2595 | 3.2763 | 3.2816 | 3.3963 | 3.4222 | 3.3570 | 3.4114 | 3.3277 | 3.3779 | 3.3119 | 3.3452 | 3.4820 | 3.2909 | 3.3331 | 3.2984 | 3.2943 | 3.3058 | 3.2933 | 3.4052 | 3.3600 | 3.3792 | 3.3733 | 3.4822 | 3.5098 | 3.4510 | 3.4586 | 3.5993 | 3.7363 | 3.8326 | 3.6718 | 3.6061 | 3.5391 | 3.3263 | 3.1078 | 2.7524 | 2.3925 | 1.9586 | 1.5415 | 1.2125 | 0.9173 | 0.7182 | 0.5852 | 0.5077 | 0.4538 | 0.4134 | 0.3806 | 0.3659 | 0.3640 | 0.3666 | 0.3725 | 0.3867 | 0.4020 | 0.4192 | 0.4355 | 0.4547 | 0.4787 | 0.5070 | 0.5321 | 0.5572 | 0.5745 | 0.5907 | 0.6024 | 0.6153 | 0.6305 | 0.6607 | 0.6855 | 0.6974 | 0.6925 | 0.6544 | 0.6153 | 0.5893 | 0.5785 | 0.5799 | 0.5821 | 0.5659 | 0.5191 | 0.4370 | 0.3506 | 0.2755 | 0.2117 | 0.1559 | 0.1212 | 0.1017 | 0.0896 | 0.0809 | 0.0729 | 0.0712 | 0.0694 | 0.0669 | 0.0665 |
spark1 | uvclear | noseal | T5N15_pi | mTagBFP2 | mTagBFP2 | 2 | 0.001953125 | 225 | B10 | 3.2873 | 3.2803 | 3.3300 | 3.3002 | 3.3858 | 3.3193 | 3.4543 | 3.3469 | 3.4151 | 3.3207 | 3.4526 | 3.2234 | 3.2341 | 3.4165 | 3.3579 | 3.1899 | 3.3497 | 3.3472 | 3.3006 | 3.2550 | 3.3566 | 3.3508 | 3.3954 | 3.3293 | 3.4346 | 3.4808 | 3.5534 | 3.6273 | 3.7185 | 3.7585 | 3.6383 | 3.4241 | 3.2968 | 3.0707 | 2.7316 | 2.3400 | 1.9381 | 1.5190 | 1.1614 | 0.9027 | 0.7086 | 0.5744 | 0.4996 | 0.4499 | 0.4086 | 0.3759 | 0.3621 | 0.3592 | 0.3611 | 0.3683 | 0.3810 | 0.3964 | 0.4134 | 0.4301 | 0.4489 | 0.4717 | 0.4964 | 0.5227 | 0.5520 | 0.5677 | 0.5809 | 0.5933 | 0.6069 | 0.6260 | 0.6486 | 0.6742 | 0.6871 | 0.6802 | 0.6490 | 0.6081 | 0.5801 | 0.5683 | 0.5712 | 0.5730 | 0.5597 | 0.5124 | 0.4371 | 0.3463 | 0.2739 | 0.2071 | 0.1521 | 0.1203 | 0.1015 | 0.0899 | 0.0800 | 0.0736 | 0.0701 | 0.0693 | 0.0668 | 0.0648 |
spark1 | uvclear | noseal | T5N15_pi | mTagBFP2 | mTagBFP2 | 2 | 0.000976563 | 225 | B11 | 3.2873 | 3.2698 | 3.3276 | 3.3491 | 3.4232 | 3.3238 | 3.3816 | 3.3112 | 3.3709 | 3.3376 | 3.4112 | 3.4409 | 3.2723 | 3.2945 | 3.4030 | 3.3373 | 3.3586 | 3.2629 | 3.4046 | 3.3877 | 3.3526 | 3.3806 | 3.4712 | 3.4327 | 3.4091 | 3.4510 | 3.6081 | 3.6794 | 3.7067 | 3.6702 | 3.5075 | 3.4401 | 3.3460 | 3.1226 | 2.7646 | 2.3759 | 1.9478 | 1.5455 | 1.1979 | 0.9149 | 0.7150 | 0.5876 | 0.5051 | 0.4549 | 0.4131 | 0.3823 | 0.3660 | 0.3631 | 0.3659 | 0.3726 | 0.3854 | 0.4011 | 0.4183 | 0.4345 | 0.4539 | 0.4782 | 0.5024 | 0.5294 | 0.5546 | 0.5780 | 0.5886 | 0.6014 | 0.6138 | 0.6314 | 0.6584 | 0.6836 | 0.6978 | 0.6909 | 0.6540 | 0.6170 | 0.5886 | 0.5768 | 0.5789 | 0.5802 | 0.5657 | 0.5224 | 0.4401 | 0.3504 | 0.2779 | 0.2088 | 0.1562 | 0.1228 | 0.1015 | 0.0891 | 0.0795 | 0.0736 | 0.0696 | 0.0691 | 0.0671 | 0.0653 |
spark1 | uvclear | noseal | T5N15_pi | mTagBFP2 | none | 2 | NA | 225 | B12 | 3.2589 | 3.3362 | 3.3382 | 3.4187 | 3.4431 | 3.3702 | 3.3816 | 3.3774 | 3.4513 | 3.3236 | 3.3384 | 3.3047 | 3.2743 | 3.3238 | 3.3219 | 3.2346 | 3.3103 | 3.2979 | 3.3100 | 3.3378 | 3.3628 | 3.3484 | 3.3729 | 3.3852 | 3.3785 | 3.4300 | 3.5622 | 3.6803 | 3.8182 | 3.6186 | 3.6281 | 3.5383 | 3.2968 | 3.1263 | 2.7757 | 2.3849 | 1.9535 | 1.5513 | 1.2100 | 0.9199 | 0.7139 | 0.5836 | 0.5081 | 0.4572 | 0.4127 | 0.3797 | 0.3657 | 0.3631 | 0.3651 | 0.3721 | 0.3846 | 0.4003 | 0.4172 | 0.4336 | 0.4533 | 0.4763 | 0.5053 | 0.5307 | 0.5541 | 0.5734 | 0.5884 | 0.6009 | 0.6126 | 0.6355 | 0.6563 | 0.6826 | 0.6956 | 0.6901 | 0.6545 | 0.6141 | 0.5881 | 0.5760 | 0.5785 | 0.5829 | 0.5640 | 0.5187 | 0.4387 | 0.3521 | 0.2780 | 0.2119 | 0.1523 | 0.1214 | 0.1010 | 0.0882 | 0.0801 | 0.0733 | 0.0701 | 0.0690 | 0.0664 | 0.0647 |
As you can see, the data is now in tidy, with one column per variable, allowing automated processing in subsequent steps.
2. Process absorbance spectrum data
Parsed spectrum data can then be processed. This involves calculation of the path length of the samples, adjusting the raw values to a path length of 1cm, and normalising the data to the blanks.
Path lengths: Calculating path lengths accurately is an important part of this process. See
vignette("path_lengths")
for more information.
# Create folder to hold the FP quantification function output files
dir.create("fp_quantification")
# Process spectra
processed_data_spectrum <- process_absorbance_spectrum(
# basics
spectrum_csv = "data/example_absorbance_parsed.csv",
subset_rows = TRUE, rows_to_keep = c("A","B"), columns_to_keep = c(1:12),
xrange = c(250,1000),
# path length calcs
pl_method = "calc_blanks",
buffer_used = "TBS", concentration_used = 0.005, temperature_used = 30,
# saving
outfolder = "fp_quantification"
)
##
## Calculating k-factor for TBS at concentration 0.005 at temperature 30 oC.
##
## Reference k-factor 0.172.
##
## K-factors available for given buffer:
## buffer concentration units description kfactor fold_change
## 1 TBS 0.05 M TBS_50mM 0.166 0.9595376
##
## Values used for model (kfactor ~ concentration):
## buffer concentration units description kfactor fold_change
## 1 water 0.00 none Water 0.173 1.0000000
## 2 TBS 0.05 M TBS_50mM 0.166 0.9595376
##
## Change in k-factor required for given buffer: 0.996.
##
## Values used for model (fold_change ~ temperature):
## temperature kfactor fold_change
## 1 25 0.172 1.000
## 2 28 0.174 1.012
## 3 31 0.177 1.029
## 4 34 0.179 1.041
## 5 37 0.183 1.064
## 6 41 0.188 1.093
## 7 45 0.191 1.110
##
## Change in k-factor required for given temperature: 1.024.
##
## Overall k-factor: 0.175.
##
## Calculating path lengths using chosen method: calc_blanks.
## Path length will calculated from the blanks data.
Arguments required:
-
spectrum_csv
- location of the parsed spectrum data file -
subset_rows
,rows_to_keep
… - whether you want the function to consider only certain rows/columns of data. useful if you have multiple calibrants per plate, as this function can only handle one calibrant at a time -
xrange
- the range of wavelengths you want the function to restrict analysis to. Input the wavelength range you used for the experiment. If this causes errors, it is often beneficial to filter on the UV end, e.g. use 350-1000 or 400-1000. -
pl_method
- method to use for path length calculations. Options:"calc_each"
(calculate the path length of each well separately),"calc_blanks"
(calculate the path length of the blanks and use that for all wells),"volume"
(calculate path length from given volume in thevolume
column). Seevignette("path_lengths")
. -
buffer_used
,concentration_used
,temperature_used
- these related to path length calculation. Thebuffer_used
must come from the list inview_kfactors()
, so useview_kfactors()
to find the closest buffer. Similarly,concentration_used
must use the same units as the buffer it refers to in theview_kfactors()
table. Seevignette("path_lengths")
. -
outfolder
- where to save the files.
Warnings expected:
- You will likely get warnings about
rows containing missing values
. This is normal.
Outputs produced:
..in the designated outfolder
(here,
fp_quantification/
):
- A processed data file of the name
[raw data filename]_parsed_processed.csv
(here,example_absorbance_parsed_processed.csv
). - A list of plots in designated
outfolder
:-
plot1a_raw.pdf
- raw data overview -
plot1b_raw_blanks.pdf
- raw absorbance of the blank wells -
plot2a_a9001000.pdf
- raw data at 900-1000nm (relevant for path length calculation) -
plot2b_pathlengths.pdf
- path length estimations by all three methods (regardless of which was chosen) -
plot2c_rawcm1.pdf
- raw data normalised to pathlength = 1cm -
plot3_normcm1.pdf
- data normalised to blank wells (where the fluorescent protein peaks usually become visible) -
plot4_mean_normcm1.pdf
- mean of the normalised data, across replicates
-
..in RStudio:
- In the R console, messages will let you follow the progress of the data processing.
- A dataframe (which we called
processed_data_spectrum
) of the processed data is returned, which can be used to inspect the processing.
Let’s have a look at a fragment of the processed data:
processed_data_spectrum[195:225,c(1:3,7,9,10,12,13)] # view a fragment of the dataframe
instrument | plate | seal | dilution | measure | raw_value | raw_cm1_value | normalised_cm1_value |
---|---|---|---|---|---|---|---|
spark1 | uvclear | noseal | 1 | 394 | 0.04625 | 0.08629766 | 0.013714331 |
spark1 | uvclear | noseal | 1 | 395 | 0.04685 | 0.08741720 | 0.014460689 |
spark1 | uvclear | noseal | 1 | 396 | 0.04655 | 0.08685743 | 0.014087510 |
spark1 | uvclear | noseal | 1 | 397 | 0.04660 | 0.08695072 | 0.013527741 |
spark1 | uvclear | noseal | 1 | 398 | 0.04650 | 0.08676413 | 0.014180805 |
spark1 | uvclear | noseal | 1 | 399 | 0.04660 | 0.08695072 | 0.013527741 |
spark1 | uvclear | noseal | 1 | 400 | 0.04710 | 0.08788367 | 0.014553984 |
spark1 | uvclear | noseal | 1 | 401 | 0.04720 | 0.08807026 | 0.015113752 |
spark1 | uvclear | noseal | 1 | 402 | 0.04650 | 0.08676413 | 0.014087510 |
spark1 | uvclear | noseal | 1 | 403 | 0.04630 | 0.08639096 | 0.013807626 |
spark1 | uvclear | noseal | 1 | 404 | 0.04705 | 0.08779038 | 0.015113752 |
spark1 | uvclear | noseal | 1 | 405 | 0.04580 | 0.08545801 | 0.012688088 |
spark1 | uvclear | noseal | 1 | 406 | 0.04615 | 0.08611107 | 0.012874678 |
spark1 | uvclear | noseal | 1 | 407 | 0.04600 | 0.08583119 | 0.013994215 |
spark1 | uvclear | noseal | 1 | 408 | 0.04600 | 0.08583119 | 0.012221615 |
spark1 | uvclear | noseal | 1 | 409 | 0.04530 | 0.08452506 | 0.012314909 |
spark1 | uvclear | noseal | 1 | 410 | 0.04530 | 0.08452506 | 0.012408204 |
spark1 | uvclear | noseal | 1 | 411 | 0.04495 | 0.08387200 | 0.010822193 |
spark1 | uvclear | noseal | 1 | 412 | 0.04455 | 0.08312564 | 0.010728898 |
spark1 | uvclear | noseal | 1 | 413 | 0.04425 | 0.08256587 | 0.009516066 |
spark1 | uvclear | noseal | 1 | 414 | 0.04405 | 0.08219269 | 0.010075835 |
spark1 | uvclear | noseal | 1 | 415 | 0.04500 | 0.08396529 | 0.010169130 |
spark1 | uvclear | noseal | 1 | 416 | 0.04420 | 0.08247257 | 0.009702656 |
spark1 | uvclear | noseal | 1 | 417 | 0.04345 | 0.08107315 | 0.007836761 |
spark1 | uvclear | noseal | 1 | 418 | 0.04335 | 0.08088656 | 0.008209940 |
spark1 | uvclear | noseal | 1 | 419 | 0.04305 | 0.08032680 | 0.007836761 |
spark1 | uvclear | noseal | 1 | 420 | 0.04330 | 0.08079327 | 0.006623929 |
spark1 | uvclear | noseal | 1 | 421 | 0.04300 | 0.08023350 | 0.008769708 |
spark1 | uvclear | noseal | 1 | 422 | 0.04280 | 0.07986032 | 0.007650171 |
spark1 | uvclear | noseal | 1 | 423 | 0.04235 | 0.07902067 | 0.006717223 |
spark1 | uvclear | noseal | 1 | 424 | 0.04200 | 0.07836761 | 0.005690981 |
Note the new columns in red. The normalised_cm1_value
column will be used for calculating the concentration of the FP in the
next step.
While the absolute numbers are low, we can verify that the peak of absorbance of mTagBFP2 is 401 nm.
This is more easily evident in the plots, where we can also verify that the blanks are not too noisy and that the replicates were similar:
3. Get concentration using ECmax assay
Using this processed data, we can now work out the concentration of
the FP in each dilution using the get_conc_ecmax()
function. This takes the EC and excitation maximum of the FP in question
from FPbase, and calculates the concentration from the absorbance at
that position. It also normalises carefully for background signal in one
of 3 ways.
Code:
proteinconcs <- get_conc_ecmax(
protein_slug = "mtagbfp2",
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,
outfolder = "fp_quantification/concentration",
)
## FP data retrieved from FPbase.
Arguments required:
-
protein_slug
- the short / lower-case form name of your FP, used to search FPbase -
protein_seq
- the sequence of your protein, for molecular weight calculations -
processed_spectrum_csv
- location of the processed spectrum data file -
wells_to_remove
- list of wells you might want to remove (e.g. if identified as anomalous in previous step) -
corr_method
,wav_to_use1
,wav_to_use2
- correction method for path length correction. choose from “none” (no normalisation - absorbance at excitation maximum is used directly), “background” (subtract absorbance atwav_to_use1
wavelength) or “scatter” (extrapolate, usingwav_to_use2
wavelength, the precise background to subtract). -
outfolder
- where to save the files
Warnings expected:
- You will likely get warnings about
transformation : NaNs produced
,log-10 transformation introduced infinite values
androws containing missing values
. These are normal.
Outputs produced:
..in the designated outfolder
(here,
fp_quantification/concentration/
):
- A processed data file of the name
[raw data filename]_parsed_processed_ecmax.csv
(here,example_absorbance_parsed_processed_ecmax.csv
). - A small table containing estimated concentrations using all 3
normalisation methods:
ecmax_coeffs.csv
. - A table of protein concentrations joined to metadata,
protein_concs_ecmax.csv
, required for combining with fluorescence data in the next step, for calculating conversion factors. - A list of plots:
-
plot1_abs_spectra_replicates.pdf
- data normalised to blank wells (identical toplot3_normcm1.pdf
fromprocess_absorbance_spectrum()
) -
plot3a_abs_spectra_geomsmooth.pdf
- same data as in plot1 plotted with the geom_smooth plotting function and annotated with the excitation maximum wavelength from FPbase. this serves as a check in case model fitting fails in next steps. plot3b_abs_spectra_modelcheck.pdf
- the results of LOESS model fitting through the absorbance data and and annotated with the excitation maximum wavelength from FPbase. Good plot to check that the model fitting worked and the FPbase excitation maximum matches the observed excitation maximum.-
plot5a_ecmax.pdf
- illustrates steps of processing: raw data, normalised data (red) and fitted data (blue). -
plot5b_ecmax_stdmethod.pdf
- visualisation of the linear fitting of data normalised with correction method “none” -
plot5c_ecmax_baselinenorm.pdf
- visualisation of the linear fitting of data normalised with correction method “baseline” -
plot5c_ecmax_baselinenorm_baselinecheck.pdf
- visualisation of the normalisation procedure using scatter -
plot5d_ecmax_scatternorm.pdf
- visualisation of the linear fitting of data normalised with correction method “scatter” -
plot5d_ecmax_scatternorm_scattercheck.pdf
- visualisation of the normalisation procedure using scatter -
plot6a_ecmax_models_all.pdf
- comparison of concentration vs dilution relationships across all normalisation methods -
plot6b_ecmax_models_all_logplot.pdf
- comparison of concentration vs dilution relationships across all normalisation methods as a log plot. Best place to verify choice of normalisation method.
-
.. in RStudio:
- A dataframe (which we called
proteinconcs
) of the protein concentrations in each well, which can be used to inspect the processing.
proteinconcs[1:12,] # view a fragment of the dataframe
media | calibrant | protein | replicate | dilution | well | mw_gmol1 | concentration_ngul |
---|---|---|---|---|---|---|---|
T5N15_pi | mTagBFP2 | mTagBFP2 | 1 | 1.000000000 | A1 | 27777.47 | 4.842327810 |
T5N15_pi | mTagBFP2 | mTagBFP2 | 1 | 0.500000000 | A2 | 27777.47 | 2.421163905 |
T5N15_pi | mTagBFP2 | mTagBFP2 | 1 | 0.250000000 | A3 | 27777.47 | 1.210581952 |
T5N15_pi | mTagBFP2 | mTagBFP2 | 1 | 0.125000000 | A4 | 27777.47 | 0.605290976 |
T5N15_pi | mTagBFP2 | mTagBFP2 | 1 | 0.062500000 | A5 | 27777.47 | 0.302645488 |
T5N15_pi | mTagBFP2 | mTagBFP2 | 1 | 0.031250000 | A6 | 27777.47 | 0.151322744 |
T5N15_pi | mTagBFP2 | mTagBFP2 | 1 | 0.015625000 | A7 | 27777.47 | 0.075661372 |
T5N15_pi | mTagBFP2 | mTagBFP2 | 1 | 0.007812500 | A8 | 27777.47 | 0.037830686 |
T5N15_pi | mTagBFP2 | mTagBFP2 | 1 | 0.003906250 | A9 | 27777.47 | 0.018915343 |
T5N15_pi | mTagBFP2 | mTagBFP2 | 1 | 0.001953125 | A10 | 27777.47 | 0.009457672 |
T5N15_pi | mTagBFP2 | mTagBFP2 | 1 | 0.000976563 | A11 | 27777.47 | 0.004728838 |
T5N15_pi | mTagBFP2 | none | 1 | 0.000000000 | A12 | 27777.47 | 0.000000000 |
The example data should give 4.8 ng/ul for the top concentration.
Conversion factor calculation
Create a folder for this calculation:
dir.create("conversion_factors")
Assemble the metadata file, using the original metadata file, and the protein concentrations file just obtained from the ECmax assay above.
# Join files
fluorescence_meta1 <- read.csv("data/example_fluorescence_meta.csv")
fluorescence_meta2 <- read.csv("fp_quantification/concentration/protein_concs_ecmax.csv")
fluorescence_meta_joined <- dplyr::left_join(x = fluorescence_meta1, y = fluorescence_meta2)
## Joining with `by = join_by(media, calibrant, protein, replicate, well)`
fluorescence_meta_joined <- cbind(fluorescence_meta_joined[ , !names(fluorescence_meta_joined) %in% c("well")], fluorescence_meta_joined[ , "well"]) # move well column to right hand side - important for `generate_cfs()`
names(fluorescence_meta_joined)[ncol(fluorescence_meta_joined)] <- "well" # rename last column
write.csv(x = fluorescence_meta_joined,
file = "conversion_factors/example_fluorescence_meta_joined.csv",
row.names = FALSE)
fluorescence_meta_joined[1:12,c(1,4,7,8,10,12:15)]
instrument | channel_name | media | calibrant | replicate | dilution | mw_gmol1 | concentration_ngul | well |
---|---|---|---|---|---|---|---|---|
spark1 | blueblue | T5N15_pi | mTagBFP2 | 1 | 1.000000000 | 27777.47 | 4.842327810 | A1 |
spark1 | blueblue | T5N15_pi | mTagBFP2 | 1 | 0.500000000 | 27777.47 | 2.421163905 | A2 |
spark1 | blueblue | T5N15_pi | mTagBFP2 | 1 | 0.250000000 | 27777.47 | 1.210581952 | A3 |
spark1 | blueblue | T5N15_pi | mTagBFP2 | 1 | 0.125000000 | 27777.47 | 0.605290976 | A4 |
spark1 | blueblue | T5N15_pi | mTagBFP2 | 1 | 0.062500000 | 27777.47 | 0.302645488 | A5 |
spark1 | blueblue | T5N15_pi | mTagBFP2 | 1 | 0.031250000 | 27777.47 | 0.151322744 | A6 |
spark1 | blueblue | T5N15_pi | mTagBFP2 | 1 | 0.015625000 | 27777.47 | 0.075661372 | A7 |
spark1 | blueblue | T5N15_pi | mTagBFP2 | 1 | 0.007812500 | 27777.47 | 0.037830686 | A8 |
spark1 | blueblue | T5N15_pi | mTagBFP2 | 1 | 0.003906250 | 27777.47 | 0.018915343 | A9 |
spark1 | blueblue | T5N15_pi | mTagBFP2 | 1 | 0.001953125 | 27777.47 | 0.009457672 | A10 |
spark1 | blueblue | T5N15_pi | mTagBFP2 | 1 | 0.000976563 | 27777.47 | 0.004728838 | A11 |
spark1 | blueblue | T5N15_pi | mTagBFP2 | 1 | 0.000000000 | 27777.47 | 0.000000000 | A12 |
You should be able to see that the concentration values have been joined to the other metadata. This joined metadata file will be our metadata for the fluorescence assay.
1. Parse fluorescence data
Parse the data. Here we’re using a different parsing function that handles standard (endpoint) and timecourse (kinetic) data from Tecan Spark instruments running Magellan software. See Data Parsing article if you have a different setup.
parsed_data <- parse_magellan(data_csv = "data/example_fluorescence.csv",
metadata_csv = "conversion_factors/example_fluorescence_meta_joined.csv",
timeseries = FALSE
)
## 9 channel(s) identified.
## Channel 1: blueblue040.
## Channel 2: blueblue050.
## Channel 3: blueblue060.
## Channel 4: blueblue070.
## Channel 5: blueblue080.
## Channel 6: blueblue090.
## Channel 7: blueblue100.
## Channel 8: blueblue110.
## Channel 9: blueblue120.
Arguments required:
-
data_csv
- file path of the absorbance data file -
metadata_csv
- file path of the metadata file -
timeseries
- whether or not the data is a timeseries/timecourse/kinetic.
Warnings expected:
- You will likely get the warning
NAs introduced by coercion
. This just means that empty wells were filled in withNA
values.
Outputs produced:
- A processed data file of the name
[raw data filename]_parsed.csv
(here,example_fluorescence_parsed.csv
), in the same location where the data was found. - A dataframe (which we called
parsed_data
) of the parsed data is returned, which can be used to inspect the parsing.
View a fragment of the data frame to check.
parsed_data[1:12,c(1,4,8,12,14:24)] # view a fragment of the dataframe
instrument | channel_name | calibrant | dilution | concentration_ngul | well | blueblue040 | blueblue050 | blueblue060 | blueblue070 | blueblue080 | blueblue090 | blueblue100 | blueblue110 | blueblue120 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
spark1 | blueblue | mTagBFP2 | 1.000000000 | 4.842327810 | A1 | 133 | 737 | 2960 | 9097 | 22595 | 50522 | NA | NA | NA |
spark1 | blueblue | mTagBFP2 | 0.500000000 | 2.421163905 | A2 | 68 | 394 | 1588 | 4875 | 12140 | 27526 | 57864 | NA | NA |
spark1 | blueblue | mTagBFP2 | 0.250000000 | 1.210581952 | A3 | 36 | 219 | 886 | 2739 | 6849 | 15485 | 32882 | 64351 | NA |
spark1 | blueblue | mTagBFP2 | 0.125000000 | 0.605290976 | A4 | 19 | 131 | 540 | 1662 | 4154 | 9504 | 20037 | 39740 | NA |
spark1 | blueblue | mTagBFP2 | 0.062500000 | 0.302645488 | A5 | 11 | 88 | 370 | 1153 | 2868 | 6530 | 13895 | 27655 | 51126 |
spark1 | blueblue | mTagBFP2 | 0.031250000 | 0.151322744 | A6 | 7 | 65 | 278 | 861 | 2168 | 4945 | 10525 | 20781 | 38599 |
spark1 | blueblue | mTagBFP2 | 0.015625000 | 0.075661372 | A7 | 4 | 54 | 233 | 730 | 1830 | 4166 | 8822 | 17547 | 32679 |
spark1 | blueblue | mTagBFP2 | 0.007812500 | 0.037830686 | A8 | 4 | 49 | 213 | 663 | 1668 | 3787 | 8036 | 15969 | 29849 |
spark1 | blueblue | mTagBFP2 | 0.003906250 | 0.018915343 | A9 | 3 | 46 | 200 | 631 | 1582 | 3604 | 7658 | 15187 | 28256 |
spark1 | blueblue | mTagBFP2 | 0.001953125 | 0.009457672 | A10 | 3 | 45 | 198 | 625 | 1555 | 3547 | 7516 | 14953 | 27956 |
spark1 | blueblue | mTagBFP2 | 0.000976563 | 0.004728838 | A11 | 3 | 45 | 194 | 608 | 1523 | 3502 | 7404 | 14721 | 27357 |
spark1 | blueblue | mTagBFP2 | 0.000000000 | 0.000000000 | A12 | 3 | 43 | 191 | 595 | 1504 | 3400 | 7237 | 14436 | 26968 |
Note the fact that the data is now in Tidy Format, with each fluorescence reading (at gains of 40, 50, etc..) in its own column, ready for processing.
2. Generate conversion factors
Use generate_cfs()
to generate conversion factors that
relates fluorescence brightness to molecule number.
fp_conversion_factors <- generate_cfs(
calibration_csv = "data/example_fluorescence_parsed.csv",
subset_rows = TRUE, rows_to_keep = c("A","B"),
outfolder = "conversion_factors"
)
## Joining with `by = join_by(instrument, plate, seal, channel_name, channel_ex,
## channel_em, media, calibrant, measure)`
Arguments required:
-
calibration_csv
- location of the parsed fluorescent data file -
subset_rows
,rows_to_keep
… - whether you want the function to consider only certain rows/columns of data. useful if you have multiple calibrants per plate, as this function can only handle one calibrant at a time -
outfolder
- where to save the files
Warnings expected:
- You will likely get warnings about
NaNs produced
. These are normal.
Outputs produced:
..in the designated outfolder
(here,
conversion_factors/
):
- A processed data file of the name
[raw data filename]_parsed_cfs.csv
(here,example_fluorescence_parsed_cfs.csv
). - Four plots showing showing the fitting between normalised fluorescence and molecule number, and a gain vs conversion factor plot (if you have tested multiple gains).
.. in RStudio:
- A dataframe (which we called
fp_conversion_factors
) of the conversion factors at each concentration.
For Advanced options for this function, see
?generate_cfs()
.
Let’s check how the conversion factor table looks:
fp_conversion_factors[,c(1,4,8:13)] # view a fragment of the dataframe
instrument | channel_name | calibrant | measure | gain | cf | beta | residuals |
---|---|---|---|---|---|---|---|
spark1 | blueblue | mTagBFP2 | blueblue040 | 40 | 6.090183e-12 | 2.581501e-11 | 1.0000665 |
spark1 | blueblue | mTagBFP2 | blueblue050 | 50 | 3.249867e-11 | 1.830351e-11 | 1.0000817 |
spark1 | blueblue | mTagBFP2 | blueblue060 | 60 | 1.276882e-10 | 1.228548e-11 | 1.0000039 |
spark1 | blueblue | mTagBFP2 | blueblue070 | 70 | 4.036917e-10 | 7.135236e-11 | 1.0000836 |
spark1 | blueblue | mTagBFP2 | blueblue080 | 80 | 9.783338e-10 | 1.451862e-10 | 0.9999074 |
spark1 | blueblue | mTagBFP2 | blueblue090 | 90 | 2.229853e-09 | 4.187956e-10 | 1.0007114 |
spark1 | blueblue | mTagBFP2 | blueblue100 | 100 | 4.698227e-09 | 8.614008e-10 | 0.9998300 |
spark1 | blueblue | mTagBFP2 | blueblue110 | 110 | 9.153889e-09 | 1.681051e-09 | 0.9999546 |
spark1 | blueblue | mTagBFP2 | blueblue120 | 120 | 1.648569e-08 | 3.052487e-09 | 1.0001829 |
Here, cf
is conversion factor and residuals
allows you to check the quality of the fit. We can see the fits are
good, which we can also see by looking at the plots:
Assemble conversion factors
FP conversion factors
If multiple FPs are being calibrated, assembly can be used to join various files together. Here we will just simplify the conversion factor file and move it into a conversion factor folder.
fp_conversion_factors <- read.csv("conversion_factors/example_fluorescence_parsed_cfs.csv")
fp_conversion_factors <- fp_conversion_factors |>
dplyr::select(instrument, plate, channel_name, media, calibrant, measure, gain, cf, beta)
write.csv(fp_conversion_factors, "conversion_factors/fp_conversion_factors_assembled.csv",
row.names = FALSE)
OD conversion factors
These can be obtained according to protocols in the FlopR package/paper. An example calibration output is provided with the example data. Let’s move it to the conversion factors folder too.
od_conversion_factors <- read.csv("data/od_conversion_factors2.csv")
write.csv(od_conversion_factors, "conversion_factors/od_conversion_factors_assembled.csv",
row.names = FALSE)
od_conversion_factors
instrument | plate | calibrant | measure | cf |
---|---|---|---|---|
spark1 | clear | microspheres | OD600 | 1.303335e-09 |
spark1 | clear | microspheres | OD700 | 9.949125e-10 |
Processing data from E. coli fluorescent protein expression experiments
With conversion factors for both mTagBFP2 fluorescence and cell number (OD) in hand, we are ready to process the experimental data.
1. Parse data
First, we parse, though this time we use
timeseries = TRUE
:
parsed_data <- parse_magellan(
data_csv = "data/example_experiment.csv",
metadata_csv = "data/example_experiment_meta.csv",
timeseries = TRUE,
metadata_above = 1, # Well Positions
custom = TRUE, startcol = 3, endcol = 97, insert_wells_above = 0, insert_wells_below = 1
)
## 4 channel(s) identified.
## 96 timepoints identified.
## 96 timepoints of 10 minutes = 960 minute (16 hour) timecourse.
## Channel 1: OD600.
## Channel 2: OD700.
## Channel 3: blue.
## Channel 4: bluelow.
Arguments required:
-
data_csv
- file path of the absorbance data file -
metadata_csv
- file path of the metadata file -
timeseries
- whether or not the data is a timeseries/timecourse/kinetic. -
metadata_above
- number of lines of plate reader-produced metadata that exists above the data -
custom
,startcol
,insert_wells_above
.. - usecustom = TRUE
where the data doesn’t occupy the default columns 2 to 97. The others specify where the data is located. See?parse_magellan()
.
Warnings expected:
- You will likely get the warning
NAs introduced by coercion
. This just means that empty wells were filled in withNA
values.
Outputs produced:
- A processed data file of the name
[raw data filename]_parsed.csv
(here,example_experiment_parsed.csv
), in the same location where the data was found. - A dataframe (which we called
parsed_data
) of the parsed data is returned, which can be used to inspect the parsing.
parsed_data[1:24,c(3,6:13)] # view a fragment of the dataframe
plasmid | ara_pc | volume | well | time | OD600 | OD700 | blue | bluelow |
---|---|---|---|---|---|---|---|---|
NA | A1 | 0 | NA | NA | NA | NA | ||
pS361 | 0 | 200 | A2 | 0 | 0.1255 | 0.1137 | 471 | 17 |
pS361 | 0 | 200 | A3 | 0 | 0.1276 | 0.1121 | 472 | 17 |
pS361 | 0 | 200 | A4 | 0 | 0.1323 | 0.1173 | 481 | 18 |
pS361 | 0.3 | 200 | A5 | 0 | 0.1219 | 0.1088 | 479 | 17 |
pS361 | 0.3 | 200 | A6 | 0 | 0.1294 | 0.1154 | 475 | 17 |
pS361 | 0.3 | 200 | A7 | 0 | 0.1290 | 0.1152 | 472 | 17 |
pS361_ara_mTagBFP2 | 0 | 200 | A8 | 0 | 0.1282 | 0.1139 | 468 | 17 |
pS361_ara_mTagBFP2 | 0 | 200 | A9 | 0 | 0.1228 | 0.1090 | 466 | 17 |
pS361_ara_mTagBFP2 | 0 | 200 | A10 | 0 | 0.1284 | 0.1144 | 469 | 17 |
none | none | 200 | A11 | 0 | 0.0969 | 0.0910 | 473 | 17 |
NA | A12 | 0 | NA | NA | NA | NA | ||
NA | B1 | 0 | NA | NA | NA | NA | ||
pS361_ara_mTagBFP2 | 0.00003 | 200 | B2 | 0 | 0.1283 | 0.1144 | 477 | 18 |
pS361_ara_mTagBFP2 | 0.00003 | 200 | B3 | 0 | 0.1253 | 0.1123 | 477 | 17 |
pS361_ara_mTagBFP2 | 0.00003 | 200 | B4 | 0 | 0.1263 | 0.1127 | 474 | 17 |
pS361_ara_mTagBFP2 | 0.0001 | 200 | B5 | 0 | 0.1265 | 0.1122 | 474 | 17 |
pS361_ara_mTagBFP2 | 0.0001 | 200 | B6 | 0 | 0.1283 | 0.1150 | 475 | 17 |
pS361_ara_mTagBFP2 | 0.0001 | 200 | B7 | 0 | 0.1241 | 0.1113 | 471 | 17 |
pS361_ara_mTagBFP2 | 0.0003 | 200 | B8 | 0 | 0.1280 | 0.1139 | 476 | 17 |
pS361_ara_mTagBFP2 | 0.0003 | 200 | B9 | 0 | 0.1324 | 0.1179 | 477 | 18 |
pS361_ara_mTagBFP2 | 0.0003 | 200 | B10 | 0 | 0.1228 | 0.1090 | 471 | 17 |
none | none | 200 | B11 | 0 | 0.0903 | 0.0858 | 475 | 17 |
NA | B12 | 0 | NA | NA | NA | NA |
Note the data consists of two OD measurements and two fluorescence measurements at low and high gain.
2. Process data
Process the experimental data using process_plate()
.
processed_data <- process_plate(
data_csv = "data/example_experiment_parsed.csv",
blank_well = c("A11", "B11", "C11", "D11", "E11", "F11", "G11", "H11"),
od_name = "OD700",
# fluorescence labels
flu_channels = c("blue"),
flu_channels_rename = c("blueblue"),
# correction
do_quench_correction = TRUE,
od_type = "OD700",
# calibrations
do_calibrate = TRUE,
instr = "spark1",
flu_slugs = c("mTagBFP2"),
flu_gains = c(60),
flu_labels = c("mTagBFP2"),
# conversion factors
od_coeffs_csv = "conversion_factors/od_conversion_factors_assembled.csv",
fluor_coeffs_csv = "conversion_factors/fp_conversion_factors_assembled.csv",
# background autofluorescence subtraction
af_model = "spline",
neg_well = c("A2", "A3", "A4", "A5", "A6", "A7"),
outfolder = "experiment_analysis"
)
## Calibrating OD700 channel with conversion factor 9.95e-10...
## Calibrating blueblue fluorescence channel with conversion factor 1.28e-10...
This is a fairly involved function.
Arguments required:
-
data_csv
- file path of the absorbance data file -
blank_well
- location of wells containing only growth media -
od_name
- name of column containing OD values
Fluorescence channel names:
-
flu_channels
- column names in your data that represent the fluorescence channel(s) -
flu_channels_rename
- what to renameflu_channels
columns to, if anything. it can be useful to rename them here to make sure your experimental data columns match the entries in your conversion factor table for that fluorescence channel/filter set.
Quench correction:
-
do_quench_correction
- should it calculate corrected fluorescence values based on cellular fluorescence quenching? -
od_type
- was the OD taken at 600 or 700 nm?
Calibration parameters:
-
do_calibrate
- should it calibrate fluorescence and OD values? -
instr
- what is the instrument name used in this experiment (to be matched to calibrations) -
flu_slugs
- the short / lower-case form name of your FP (to be matched to calibrations) -
flu_gains
- gain used in experiment (to be matched to calibrations) -
flu_labels
- what to label fluorescence axes in plots
Conversion factor data:
-
od_coeffs_csv
- file path of OD conversion factor file -
fluor_coeffs_csv
- file path of fluorescence conversion factor file
Background autofluorescence subtraction:
-
af_model
- what sort of autofluorescence model to use. options include NULL, which doesn’t use an autofluorescence model but instead normalises to the fluorescence in blank wells by time point. -
neg_well
- wells with cells but no FP to use for autofluorescence subtraction
Saving:
-
outfolder
- where to save the files
Warnings expected:
- You will likely get the warning
rows containing missing values or values outside the scale range
. This is normal.
Outputs produced:
..in the designated outfolder
(here,
experiment_analysis/
):
- A processed data file of the name
[raw data filename]_parsed_processed.csv
(here,example_experiment_parsed_processed.csv
). - A list of plots:
-
OD_1_raw_normalised
- Raw and normalised OD data. -
OD_2_pathlength-normalised
- OD data normalised to 1 cm path length (in OD cm-1). -
OD_3_calibrated
- Calibrated OD data (in ‘particles’ or ‘cells’). -
blueblue_autofluorescence-normalisation-curve.pdf
- Autofluorescence normalisation curve: how background fluorescence in non-fluorescent cells relates to their OD. -
mTagBFP2_1_raw_normalised
- Raw and normalised fluorescence data (in ‘relative fluorescence units’). -
mTagBFP2_2_quench-corrected
- Fluorescence data corrected for cell-based quenching (in ‘relative fluorescence units’). -
mTagBFP2_3_calibrated
- Calibrated fluorescence data (in molecules).
-
.. in RStudio:
- A dataframe (which we called
processed_data
) of the conversion factors at each concentration.
For Advanced options for this function, see
?process_plate()
.
If we view a fragment of the dataframe to check it:
processed_data[14:24,c(3,6,8,9,17:23)] # view a fragment of the dataframe
plasmid | ara_pc | well | time | pathlength | normalised_OD_cm1 | normalised_blueblue | flu_quench | corrected_normalised_blueblue | calibrated_OD | calibrated_mTagBFP2 |
---|---|---|---|---|---|---|---|---|---|---|
pS361_ara_mTagBFP2 | 0.00003 | B2 | 0 | 0.6072014 | 0.041645985 | 12.814271 | 0.9765740 | 13.121659 | 25416808 | 102763267870 |
pS361_ara_mTagBFP2 | 0.00003 | B3 | 0 | 0.6072014 | 0.038187495 | 12.155686 | 0.9778592 | 12.430916 | 23306069 | 97353662950 |
pS361_ara_mTagBFP2 | 0.00003 | B4 | 0 | 0.6072014 | 0.038846255 | 9.281153 | 0.9776139 | 9.493679 | 23708115 | 74350465588 |
pS361_ara_mTagBFP2 | 0.0001 | B5 | 0 | 0.6072014 | 0.038022805 | 9.124318 | 0.9779206 | 9.330326 | 23205558 | 73071159744 |
pS361_ara_mTagBFP2 | 0.0001 | B6 | 0 | 0.6072014 | 0.042634125 | 11.002368 | 0.9762080 | 11.270517 | 26019876 | 88265905472 |
pS361_ara_mTagBFP2 | 0.0001 | B7 | 0 | 0.6072014 | 0.036540595 | 5.841993 | 0.9784735 | 5.970517 | 22300956 | 46758555980 |
pS361_ara_mTagBFP2 | 0.0003 | B8 | 0 | 0.6072014 | 0.040822535 | 11.657495 | 0.9768795 | 11.933402 | 24914251 | 93457344678 |
pS361_ara_mTagBFP2 | 0.0003 | B9 | 0 | 0.6072014 | 0.047410135 | 13.910645 | 0.9744462 | 14.275437 | 28934705 | 111799169337 |
pS361_ara_mTagBFP2 | 0.0003 | B10 | 0 | 0.6072014 | 0.032752725 | 5.120418 | 0.9798918 | 5.225493 | 19989195 | 40923843769 |
none | none | B11 | 0 | 0.6072014 | -0.005455356 | 1.841709 | 0.9946429 | 1.851629 | -3329438 | 14501172270 |
B12 | 0 | NA | NA | NA | NA | NA | NA | NA |
Note the many new columns created by
process_plate()
.
Quench correction (black=normalised, red=corrected):
Calibration (red=calibrated):
3. Calculate per cell values
calc_fppercell()
can be used to estimate molecules per
cell.
pc_data_mTagBFP2 <- calc_fppercell(
data_csv = "experiment_analysis/example_experiment_parsed_processed.csv",
flu_channels = c("blueblue"),
flu_labels = c("mTagBFP2"),
remove_wells = c("A11", "B11", "C11", "D11", "E11", "F11", "G11", "H11", # media
"A1", "B1", "C1", "D1", "E1", "F1", "G1", "H1",
"A12", "B12", "C12", "D12", "E12", "F12", "G12", "H12"), # empty wells
get_rfu_od = FALSE,
get_mol_cell = TRUE,
outfolder = "experiment_analysis"
)
Arguments required:
-
data_csv
- file path of the absorbance data file -
flu_channels
- column names in your data that represent the fluorescence channel(s) -
flu_labels
- what to label fluorescence axes in plots -
remove_wells
- list of wells to leave out of analysis, e.g. if they contained media or were empty -
get_rfu_od
- calculate relative fluorescence units per OD? (for non calibrated data) -
get_mol_cell
- calculate molecules per cell? (for calibrated data) -
outfolder
- where to save the files
Outputs produced:
..in the designated outfolder
(here,
experiment_analysis/percell_data/
):
- A processed data file of the name
[raw data filename]_parsed_processed_pc.csv
(here,example_experiment_parsed_processed_pc.csv
). - A plot
calibratedmTagBFP2_perCell.pdf
to summarise the molecules per cell values.
.. in RStudio:
- A dataframe (which we called
pc_data_mTagBFP2
) of the ‘per cell’ data.
View a fragment of the dataframe to check it:
data_to_display <- pc_data_mTagBFP2 |>
dplyr::filter(time == max(pc_data_mTagBFP2$time)) |>
dplyr::select(plasmid, ara_pc, time, OD600, calibrated_OD, blueblue, calibrated_mTagBFP2, calibratedmTagBFP2_perCell)
data_to_display[c(13:15,19:21,25:27,31:33),]
plasmid | ara_pc | OD600 | calibrated_OD | blueblue | calibrated_mTagBFP2 | calibratedmTagBFP2_perCell |
---|---|---|---|---|---|---|
950 | ||||||
pS361_ara_mTagBFP2 | 0.0001 | 0.7735 | 527156900 | 2474 | 2.015395e+13 | 38231.41 |
pS361_ara_mTagBFP2 | 0.0001 | 0.7651 | 521427753 | 2363 | 1.903409e+13 | 36503.79 |
pS361_ara_mTagBFP2 | 0.0001 | 0.7629 | 521729287 | 2471 | 2.010565e+13 | 38536.55 |
pS361_ara_mTagBFP2 | 0.001 | 0.6752 | 447451400 | 4554 | 3.997663e+13 | 89342.95 |
pS361_ara_mTagBFP2 | 0.001 | 0.6741 | 448657536 | 4719 | 4.159119e+13 | 92701.42 |
pS361_ara_mTagBFP2 | 0.001 | 0.6788 | 451773388 | 4739 | 4.182433e+13 | 92578.11 |
pS361_ara_mTagBFP2 | 0.01 | 0.6442 | 426746062 | 8936 | 8.190800e+13 | 191936.15 |
pS361_ara_mTagBFP2 | 0.01 | 0.6386 | 416795439 | 9415 | 8.623642e+13 | 206903.47 |
pS361_ara_mTagBFP2 | 0.01 | 0.6510 | 429459869 | 8579 | 7.854009e+13 | 182881.09 |
pS361_ara_mTagBFP2 | 0.1 | 0.6541 | 428454755 | 10704 | 9.898598e+13 | 231030.19 |
pS361_ara_mTagBFP2 | 0.1 | 0.6397 | 420413847 | 10718 | 9.885947e+13 | 235147.99 |
pS361_ara_mTagBFP2 | 0.1 | 0.6393 | 421418961 | 10659 | 9.832525e+13 | 233319.47 |
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.
4. Calculate cellular concentration
calc_fpconc()
can be used to estimate molecular
concentration. This is somewhat similar in structure to the above.
molar_data_mTagBFP2 <- calc_fpconc(
data_csv = "experiment_analysis/example_experiment_parsed_processed.csv",
flu_channels = c("blueblue"),
flu_labels = c("mTagBFP2"),
remove_wells = c("A11", "B11", "C11", "D11", "E11", "F11", "G11", "H11", # media
"A1", "B1", "C1", "D1", "E1", "F1", "G1", "H1",
"A12", "B12", "C12", "D12", "E12", "F12", "G12", "H12"), # empty wells
get_rfu_vol = FALSE,
get_mol_vol = TRUE,
od_specific_total_volume = 3.6,
odmeasure = "OD700",
odmeasure_conversion = 0.79,
outfolder = "experiment_analysis"
)
## Note that the default 'OD-specific total volume' is 3.6 ul per (OD600 cm-1) - and requires measurement in OD600 or a conversion to estimate OD600 from the OD used.
## Using OD-specific total cell volume: 3.6ul per (OD600 cm-1).
## The empirical ratio between E. coli absorbance at OD700/OD600 is typically 0.79.
## Using OD: OD700.
## Using conversion: 0.79.
Arguments required:
-
data_csv
- file path of the absorbance data file -
flu_channels
- column names in your data that represent the fluorescence channel(s) -
flu_labels
- what to label fluorescence axes in plots -
remove_wells
- list of wells to leave out of analysis, e.g. if they contained media or were empty -
get_rfu_vol
- calculate relative fluorescence units per volume? (for non calibrated data) -
get_mol_vol
- calculate molecules per volume (i.e. molar concentration)? (for calibrated data) -
od_specific_total_volume
- OD600-specific total cellular volume inul x OD-1 x cm
, i.e. the total cellular volume represented by 1 OD600 unit (in 1 cm path length). Recommended value is 3.6. -
odmeasure
- which OD measurement is being used in the data? e.g. “OD600” or “OD700”. -
odmeasure_conversion
- how to convert the measurement specified byodmeasure
to OD600? i.e. OD600 = OD used / x. Use ‘1’ for OD600 (no conversion) and 0.79 for OD700. -
outfolder
- where to save the files
Outputs produced:
..in the designated outfolder
(here,
experiment_analysis/molar_data/
):
- A processed data file of the name
[raw data filename]_parsed_processed_conc.csv
(here,example_experiment_parsed_processed_con.csv
). - A plot
calibrated_mTagBFP2_concentration.pdf
to summarise the protein concentration values.
.. in RStudio:
- A dataframe (which we called
molar_data_mTagBFP2
) of the ‘per cell’ data.
View a fragment of the dataframe to check it:
data_to_display <- molar_data_mTagBFP2 |>
dplyr::filter(time == max(molar_data_mTagBFP2$time)) |>
dplyr::select(plasmid, ara_pc, time, OD700, calibrated_OD, blueblue, calibrated_mTagBFP2, calibrated_mTagBFP2_Molar)
data_to_display[c(13:15,19:21,25:27,31:33),]
plasmid | ara_pc | OD700 | calibrated_OD | blueblue | calibrated_mTagBFP2 | calibrated_mTagBFP2_Molar |
---|---|---|---|---|---|---|
950 | ||||||
pS361_ara_mTagBFP2 | 0.0001 | 0.6108 | 527156900 | 2474 | 2.015395e+13 | 8.502606e-06 |
pS361_ara_mTagBFP2 | 0.0001 | 0.6051 | 521427753 | 2363 | 1.903409e+13 | 8.118386e-06 |
pS361_ara_mTagBFP2 | 0.0001 | 0.6054 | 521729287 | 2471 | 2.010565e+13 | 8.570469e-06 |
pS361_ara_mTagBFP2 | 0.001 | 0.5315 | 447451400 | 4554 | 3.997663e+13 | 1.986973e-05 |
pS361_ara_mTagBFP2 | 0.001 | 0.5327 | 448657536 | 4719 | 4.159119e+13 | 2.061665e-05 |
pS361_ara_mTagBFP2 | 0.001 | 0.5358 | 451773388 | 4739 | 4.182433e+13 | 2.058923e-05 |
pS361_ara_mTagBFP2 | 0.01 | 0.5109 | 426746062 | 8936 | 8.190800e+13 | 4.268630e-05 |
pS361_ara_mTagBFP2 | 0.01 | 0.5010 | 416795439 | 9415 | 8.623642e+13 | 4.601500e-05 |
pS361_ara_mTagBFP2 | 0.01 | 0.5136 | 429459869 | 8579 | 7.854009e+13 | 4.067247e-05 |
pS361_ara_mTagBFP2 | 0.1 | 0.5126 | 428454755 | 10704 | 9.898598e+13 | 5.138075e-05 |
pS361_ara_mTagBFP2 | 0.1 | 0.5046 | 420413847 | 10718 | 9.885947e+13 | 5.229654e-05 |
pS361_ara_mTagBFP2 | 0.1 | 0.5056 | 421418961 | 10659 | 9.832525e+13 | 5.188988e-05 |
Concentration values are estimated at 8.5 - 52 uM.
These files can then be used to analyse data in absolute quantities…
Further information
Our paper covers the purpose and structure of these functions in more detail.
- overview of all functions - Supplementary Fig. 13
-
process_absorbance_spectrum()
(originallyplot_absorbance_spectrum()
) - Supplementary Fig. 6 - path length correction - Supplementary Fig. 4
-
get_conc_ecmax()
(originallyget_conc_ECmax()
) - Supplementary Fig. 8 -
generate_cfs()
- Fig.3 and Supplementary Fig. 3 - microsphere calibrations - Supplementary Fig. 11
-
process_plate()
- Fig. 4-5 -
calc_fppercell()
andcalc_fpconc()
- Fig. 5