Introduction

This vignette describes the possible source file formats you can use when loading plate reader data into an experiment. The loader function given in your design file should return a data.frame formatted in one of the four ways described below.

In all cases, each source should contain data for one and only one channel (defined under channels in the design file).

Well data across the columns (spread format)

The first data formatting option, commonly produced by plate reader software, is to give the read values for each well across the columns, with time points down the rows. Data in this format can either have an explicit header (column names) or not:

Without column names

If your data does not have a header with well lables, it is assumed that the resulting data.frame object will have the generic R column names "V1", "V2", etc.. For example:

df <- read.table("../tests/testthat/source-spread-unnamed.txt")
knitr::kable(head(df[1:10]))

In this case, the source data.frame should:

This last note is very important: the -> syntax in design files creates row-wise sets of well labels. For example, A1 -> B2 is equivalent to A1, A2, B1, B2. Therefore, if you are using this syntax to designated the wells used in an experiment, your column order in source data must also be order row-wise.

With column names

If your loader returns a data.frame with well labels, such as:

df <- read.table("../tests/testthat/source-spread-named.txt")
knitr::kable(head(df[1:10]))

The requirements are looser:

Extra columns are fine and column order doesn't matter.

One observation per row (gathered format)

Alternativey, data can be formatted with one and only one observation in each row. In this case the data.frame should have three named or unnamed columns.

Without column names

If your loader returns a data.frame with three columns with generic names, like:

df <- read.table("../tests/testthat/source-gathered-unnamed.txt")
knitr::kable(head(df))

The columns order should be:

With column names

Alternatively, if your table contains explicit column names:

df <- read.table("../tests/testthat/source-gathered-named.txt")
knitr::kable(head(df))

The column order does not matter, however all wells given in the design must be represented.

Alternative data sources

Although the examples given here all assume that source data is being loaded from local files by the loader function, the design of the framework allows for flexibility.

For example, a custom loader function could easily read data from a database or URL. The framework simply passes the values of each channel definition in the design file off to the loader. One important thing to note, however, is that you will probably want to set findFiles = FALSE if your loader isn't expecting channel values to be local files in the working directory.



whitwort/plateKinetics documentation built on May 4, 2019, 5:23 a.m.