Skip to contents

Parses data exported from a Tecan Spark plate reader using Magellan software. Handles standard (endpoint) or timecourse (kinetic) data containing absorbance and/or fluorescence readings, but cannot handle spectra, such as absorbance scans. Parsing consists of data extraction, data tidying, and data joining to relevant metadata.

Usage

parse_magellan(
  data_csv,
  metadata_csv,
  timeseries = FALSE,
  timestart = "0s",
  interval = 10,
  mode = "read_first",
  metadata_above = 0,
  metadata_below = 0,
  custom = FALSE,
  startcol = 2,
  endcol = 97,
  insert_wells_above = 0,
  insert_wells_below = 0
)

Arguments

data_csv

path to CSV file from Tecan Spark plate reader

metadata_csv

path to CSV file containing metadata

timeseries

logical. Is the data a timeseries? Defaults to FALSE.

timestart

string indicating the timepoint specified in column1 of the export file corresponding to the first row of data. "0s" by default.

interval

numeric. time interval in minutes between readings in a kinetic loop. Default is 10.

mode

mode has two options: "read_first" and "incubate_first". Setting "read_first" mode tells the script that the plate reader method started with reading the relevant channels, followed by incubation for the interval time, meaning the first timepoint was at 0 min. Setting "incubate_first" mode tells the script the opposite was true, making the first timepoint equal to the length of the set interval, e.g. 10 min.

metadata_above

numeric value corresponding to the number of types of metadata requested during creation of the Excel export file in Magellan, that was placed ABOVE the data. These can include Well positions, Layout, Replicate info, etc.

metadata_below

numeric value corresponding to the number of types of metadata requested during creation of the Excel export file in Magellan, that was placed BELOW the data. These can include Well positions, Layout, Replicate info, etc.

custom

Boolean flag indicating whether script should deviate from the default of collecting data from columns 2:97. If TRUE, script looks at arguments insert_wells_above, insert_wells_below, startcol, endcol. The total number of columns needs to add up to 96 if the metadata_csv file includes rows A1-H12 and they must be in the same order as the metadata file because this script joins positionally, not by recorded well value (wells aren't exported by default).

startcol

numeric value corresponding to first column of data_csv corresponding to data

endcol

numeric value corresponding to last column of data_csv corresponding to data

insert_wells_above

numeric value corresponding to number of empty entries to insert before data in custom mode. This can be useful if only a portion of the plate was read, meaning the number of rows created by startcol:endcol does not add up to 96. For example, if the data starts at B1, but the metadata starts at A1, you can set this to 12 to add 12 empty rows above the data which allows correct joining of data and metadata tables.

insert_wells_below

numeric value corresponding to number of empty entries to insert after data in custom mode.

Value

a data.frame containing the parsed plate reader data

Examples

if (FALSE) {
  parsed_calib_plate <- parse_magellan(
    data_csv = "calibrations/20210104_calibration_data.csv",
    metadata_csv = "calibrations/20210104_calibration_metadata.csv",
    timeseries = FALSE
  )

  parsed_data <- parse_magellan(
    data_csv = "data/20210104_data.csv",
    metadata_csv = "data/20210104_metadata.csv",
    timeseries = TRUE, timestart = "0s", interval = 30, mode = "read_first"
  )
}