1 Introduction

This document shows how to analyse ELISA data in R. The code was written to analyse ELISA experiments performed in our lab: the script reads the excel file provided by a Synergy H1 96-well plate reader from BioTek, performs a background-correction, generates the calibration curve and computes the sample concentrations with respect to this calibration curve.

Note from 04-Apr-2024: This document was developed in 2018 and may contain outdated and partially experimental code – use on your own responsibility. You should understand the calculations behind the analysis before applying them to your data.

1.1 About the experiment in brief

We measured the IgG amount in blood serum of four donors using an indirect ELISA. The detection antibody was conjugated to horseradish peroxidase (HRP). As a substrate solution, we used TMB from Thermo Fisher Scientific. We measured absorbance at 450 nm – to measure the substrate specific absorbance – and at 620 nm – to measure the (unspecific) background absorbance. The absorbance of both wavelength is provided by the plate reader in a single excel sheet. If we say background correction we mean that we substract the values obtained at 620 nm from the values obtained at 450 nm.

1.2 Load libraries and import excel file

We first load some R libraries that we want to use.

# load packages
if (!requireNamespace("pacman", quietly = TRUE)){
  install.packages("pacman")}
pacman::p_load(bookdown, # to create this document
               tidyverse, # for data wrangling
               ggplot2, cowplot, # for nice plots
               scales, # for axis scales with '%'
               readxl, # to read excel files
               here, # to find the absolute path of the project
               purrr, # for functional programming
               viridis, # for color palettes
               drc, minpack.lm) # for 4-param logistic regression

Now we read the excel file:

# Set the name of the excel file
# Note: this is example data used for illustrative purposes only.
xlsx.file <- file.path(here::here(), "example-data.xlsx")
# Import excel data
data <- readxl::read_xlsx(xlsx.file, sheet = 1, col_names = FALSE) %>% as.tibble
# Let's have a look at the absorbance data.
# View(data)

The odd rows show the absorbance at 450 nm and the even rows the absorbance at 620 nm. As expected, the background absorbance at 620 nm is very low.

1.3 Set cell indices and set experimental parameteres

We need to specify some experiment-specific parameters manually such as the position of the wells with the standard samples and blanks, the number of replicates, etc.

## BLANKS
# Location of the 450 nm measurement of our blanks in the `data` table.
# Use View(data) to double-check row and column indices:
row.idx.blank <- 40
col.idx.blank <- 13

## STANDARD SAMPLES
# Location of the 450 nm measurement of the first well 
# of our standard (well 1A in our case -> row 26 and column 3 in `data` table)
row.idx.std <- 26
col.idx.std <- 3
# Number of replicates of the standard
n.repl.std <- 2
# Maximal concentration of the standard 
max.conc.std <- 1 # i.e. 100 %, we use a relative scale
# Number of dilutions performed to obtain the calibration curve
n.dilutions <- 8
# Dilution factor
dilution.fact = 2

## BIOLOGICAL SAMPLES
# Location of first well with the sample of the first donor (here well 3A)
row.idx.donor.1 <- 26
col.idx.donor.1 <- 5
n.donors <- 4 # Four donors, pipetted in horizontal order
tpoints <- c(0, 7, 30, 60, 180) # Five time points, pipetted in vertical order
n.repl.donors <- 2 # Two replicate measurements per donor and time point

Now we can start analysing the data.