knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

AutoPlate

R Lifecycle: experimental codecov R build status

Introduction

AutoPlate is an R Shiny web application (and R library) that helps you automate the analysis of biological assays conducted on 96-well plates. It lets you go from raw data to publication ready figures in minutes!

Currently, the only supported assay types are the Pseudotype Micro Neutralisation (pMN) and ELLA assays, for which dose-response curves can be fit. In the future, other assays such as ELISA, HIA or even any custom assay may be supported. Let us know if there's an assay that you would like us to support!

Ways of using AutoPlate

You can use AutoPlate in two ways: 1. Web application - - this is the easiest way to run AutoPlate! - Run the app - See docs - Run your own app 2. R library - you can use only the functions you need to customise your own analysis! - See docs - See all functions

Web Application Quick Start

Try out the app here: https://philpalmer.shinyapps.io/AutoPlate/

Currently the dashboard contains the following tabs and features, which allow you to run an analysis in three simple steps:

Run your own version of the web application

  1. Get the source code from GitHub:
git clone https://github.com/PhilPalmer/AutoPlate.git
cd AutoPlate
  1. See app.R for how you can run you own version of the app yourself locally

Once you've loaded the library you can run AutoPlate like so:

RScript app.R

R library Quick Start

Installation

You can install the latest released version of autoplate from GitHub with:

# install.packages("devtools")
devtools::install_github("PhilPalmer/AutoPlate")
library(autoplate)
pkgload::load_all(export_all = FALSE,helpers = FALSE,attach_testthat = FALSE)

Running your own analysis in R

AutoPlate was primarily built as a web app but most of the functionality can also be run within R, which may be useful if you want to customise an analysis.

Here is a basic example of how to plot a dose response curve from the data exported from AutoPlate:

1) Load your dataset

# Load an example dataset
data("example_data_pmn_platelist_H1N1")
data <- example_data_pmn_platelist_H1N1

# OR

# Load your own dataset - make sure your file path is correct!
platelist_file <- "data-raw/example_data_pmn_platelist_H1N1.csv"
data <- read.csv(platelist_file, header=TRUE, stringsAsFactors=FALSE, check.names=FALSE)

2) Define the virus you want to plot

virus_to_plot <- unique(data$virus)[1]
print(virus_to_plot)

3) Preprocess your dataset to keep only the non-excluded, types and virus of interest:

 data <- dplyr::filter(data, types %in% c("x", "m"), exclude == FALSE, virus == virus_to_plot)

4) Fit your dose-response model (DRM) using the DRC package:

model <- drc::drm(formula=neutralisation~dilution, curveid=sample_id, fct=drc::LL2.4(), data=data, pmodels=data.frame(1,1,1,sample_id), upperl=c(NA,NA,100,NA), lowerl=c(0,NA,NA,0))

5) Plot your dose-response curve with AutoPlate and ggplot2 (Optional: make it intereactive with Plotly!)

drc_plot <- autoplate::plot_drc(data, model)
drc_plotly <- plotly::ggplotly(drc_plot)
print(drc_plot)

Credit

This app was built by @PhilPalmer while at the University of Cambridge Lab of Viral Zoonotics

Many thanks to others who have helped out along the way too, including (but not limited to): David Wells, George Carnell, Joanne Marie Del Rosario and Kelly da Costa

Citation

AutoPlate is yet to be published but we're hoping to change this soon!



PhilPalmer/AutoPlate documentation built on Dec. 18, 2021, 7:41 a.m.