plates_read: Read sets (plates) and calculate concentrations and...

Description Usage Arguments Value

View source: R/biosets.R

Description

Writes the processed data into two files: data_samples.csv, data_all.csv and returns a list containing:

Usage

1
2
3
4
5
6
plates_read(plates, cal_names, cal_values, exclude_cals = list(),
  additional_vars = c("var_name"), additional_sep = "_", sep = ",",
  dec = "AUTO", path = ".", file_name = "plate_#NUM#.csv",
  model_func = bioset::fit_lnln, plot_func = bioset::plot_lnln,
  interpolate_func = bioset::interpolate_lnln, write_data = TRUE,
  use_written_data = FALSE)

Arguments

plates

The number of plates (e.g. 3`` attempts to read plate_1.csv, plate_2.csv, plate_3.csv), see file_name'.

cal_names

A vector of strings containing the names of the samples used as calibrators.

cal_values

A numeric vector with the known concentrations of those samples (must be in the same order).

exclude_cals

A list of calibrators to exclude, e.g.: list(plate1 = c("CAL1")).

additional_vars

Vector of strings containing the names for the additional columns.

additional_sep

String / RegExp that separates additional vars, e.g.: "ID_blue_cold" with additional_sep = "_" will be separated into three columns containing "ID", "blue" and "cold". If the separated data would exceed the columns in additional_vars the last column will contain a string with separator (e.g.: "blue_cold"). If data is missing NA is inserted.

sep

Separator used in the csv-file, either "," or ";" (see utils::read.csv()).

dec

The character used for decimal points (see utils::read.csv()). "AUTO" will result in "." if sep is "," and "," for ";".

path

The path to the file (no trailing "/" or "\" !).

file_name

Naming scheme for the files. The default is plate_#NUM#.csv, where #NUM# gets replaced by the number of the plates, see plates. The filename must contain #NUM#.

model_func

A function generating a model to fit the calibrators, e.g. fit_linear(), fit_lnln().

plot_func

Function used to display the fitted line.

interpolate_func

A function used to interpolate the concentrations of the other samples, based on the model, e.g. interpolate_linear(), interpolate_lnln().

write_data

Write the calculated data into data_all.csv and data_samples.csv?

use_written_data

Try to read data_all.csv and data_read.csv instead of raw data. Useful if you have to re-run the script, but the raw data does not change.

Value

A list of params.


randomchars42/eenv documentation built on May 20, 2019, 1:29 p.m.