Cellular assays using ‘bioassays’ package in R

Anwar Azad Palakkan, Jamie Davies

library(bioassays)

Libraries

Following libraries will be useful. If the libraries are not installed, please install them using install.packages()

library(tcltk)# for selecting the folder for analysis
library(dplyr)
library(ggplot2)# for plotting graphs
library(reshape2)
library(nplr)# for the standard curve fitting

Introduction

In a cell culture lab various cellular assays are performed. The package “bioassays” will help to analyse the results of these experiments performed in multiwell plates. The functions in this package can be used to summarise data from any multiwell plate, and by incorporating them in a loop several plates can be analyzed automatically. Two examples are shown in this article.

Example 1: Analysing result from a 96 well plate

Input data

To set up a folder as working directory

Read files

Files can be read using the codes below. Files need to be in .csv format. In this examples file names reflect the type of assay used. For example “L DIFF P3 72HRS.csv” :L is assay code (Lactate assay), DIFF differentiation (type of cells used), p3: Plate 3 (each plate represent specific compounds tested), 72HRS 72hrs treatment with compound. These information will help to summarise the results.

To read 1st file

#>   X    X1    X2    X3    X4    X5    X6    X7    X8    X9   X10   X11   X12
#> 1 A 0.659 0.649 0.598 0.601 0.541 0.553 0.568 0.519 0.576 0.575 0.583 0.504
#> 2 B 0.442 0.455 0.586 0.563 0.525 0.548 0.511 0.503 0.533 0.559 0.529 0.535
#> 3 C 0.278 0.266 0.491 0.562 0.510 0.473 0.467 0.433 0.382 0.457 0.475 0.510
#> 4 D 0.197 0.199 0.452 0.456 0.421 0.431 0.409 0.401 0.458 0.412 0.408 0.403
#> 5 E 0.177 0.174 0.447 0.437 0.392 0.412 0.368 0.396 0.397 0.358 0.360 0.393
#> 6 F 0.141 0.137 0.277 0.337 0.294 0.279 0.257 0.263 0.262 0.292 0.280 0.300

Reading metadata file

#>   row col position type     id concentration dilution
#> 1   A   1      A01 STD1    STD            25       NA
#> 2   A   2      A02 STD1    STD            25       NA
#> 3   A   3      A03   S1 Sample            NA       NA
#> 4   A   4      A04   S1 Sample            NA       NA
#> 5   A   5      A05   S1 Sample            NA       NA
#> 6   A   6      A06   S1 Sample            NA       NA

Rearranging the data

96 well plates were used for the assay, so it is assumed that in data the rows being from A to G and columns 1 to 12 of a 96 well plate. data2plateformat function is used to label them correctly.

To convert data into a dataframe.

data2plateformat function uses the column name and row name of the above rawdata to format it as a data frame. So the data should be well formatted before using this function.

For an overview of the plate

Filling metadata file using plate specific details

An example function is given below which will determine the compound,concentration, type and dilution from the file name

These ‘plate details’ can be used to fill metadata using plate_metadata function

For joining metadata and platelayout ‘inner_join’ function is used

Sorting blank wells and reducing blanks

Blank can be reduced using ‘reduceblank’ function

Plotting standard curve

To filter standards

Calculations for standard curve : nonparametric logistic regression curve

To evaluate nonparametric logistic regression fitting

To estimate the values based on logistic regression fitting

Calculations for standard curve : linear regression curve

To evaluate linear fitting

To estimate the values based on linear curve

For multiply estimated by dilution

Summarise the data

For summarising the “estimated_lr” based on “id” and “type”.

Statistical test

For the t test (S1 as control)

Example 2: Analysing result from a 384 well plate.

This example data contain result of dose response of few drugs (drug1, drug2, drug3, drug4) at three concentrations (C1,C2,C3) from two different cell lines (hepg2 and huh7)

Input data.

Reading the spectrophotometer readings in csv file

#> [1] 16 25
#>   X  X1  X2  X3  X4  X5  X6  X7  X8  X9 X10 X11 X12 X13 X14 X15 X16 X17 X18 X19
#> 1 A 0.1 0.1 0.2 0.3 0.2 0.2 0.2 0.2 0.2 0.2 0.2 0.1 0.2 0.3 0.4 0.5 0.6 0.5 0.6
#> 2 B 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.2 0.2 0.2 0.3 0.3 0.3 0.3 0.3
#> 3 C 0.3 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.4 0.4 0.4 0.3 0.3 0.3 0.4 0.4 0.4 0.4 0.4
#> 4 D 0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.5
#> 5 E 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.6 0.6 0.6 0.5 0.5 0.5 0.6 0.6 0.6 0.6 0.6
#> 6 F 0.6 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7 0.7 0.7 0.6 0.6 0.6 0.7 0.7 0.7 0.7 0.7
#>   X20 X21 X22 X23 X24
#> 1 0.7 0.8 0.9 1.0 0.1
#> 2 0.3 0.3 0.3 0.3 0.3
#> 3 0.4 0.4 0.4 0.4 0.4
#> 4 0.5 0.5 0.5 0.5 0.5
#> 5 0.2 0.2 0.3 0.3 0.2
#> 6 0.3 0.3 0.4 0.4 0.3

Reading metadata

#>   row col position  cell compound concentration    type dilution
#> 1   A   1      A01 hepg2    drug1             B  blank1       NA
#> 2   A   2      A02 hepg2    drug1            C1 treated       10
#> 3   A   3      A03 hepg2    drug1            C1 treated       10
#> 4   A   4      A04 hepg2    drug1            C1 treated       10
#> 5   A   5      A05 hepg2    drug1            C1 treated       10
#> 6   A   6      A06 hepg2    drug1            C1 treated       10

Rearranging the data.

For appropriate naming of rows and column of rawdata2

To convert data into a dataframe.

For an overview of the plate.

For heat map

For joining metadata2 and OD_df2.

For categorical view of cells

For categorical view of compound

Sorting blank wells and reducing blanks.

The data contain separate blanks for drug1, drug2, drug3 and drug4 (blank1, blank2,blank3 and blank 4 respectively)

To summarise the result from a plate.

For summarising the result in the order cell, compound,concentration,type and by omitting blanks.

For summarising the result in the order cell, compound and concentration and by omitting blanks (all blanks are marked as “B” in concentration), drug 2 and huh7.

Statistical test.

For t-test