read_data: Read plate data

Description Usage Arguments Value

View source: R/read.R

Description

This is the primary fuction for reading data into R with this package. It is built exlusively for use with worm data. This function can read in individual plates, plates from a single directory (e.g. setup or score directory), or plates from an experimental directory (with both score and setup sub-directories). The files/directories to be read in (individual file/directory/experiment directory) are detected and handled automatically by the function. This function also utilizes an SVM to determine whether objects are more likely to be bubbles or worms and labels them accordingly. It also estimates the lifestage of each worm.

Usage

1
2
read_data(filedir, tofmin = 60, tofmax = 2000, extmin = 0,
  extmax = 10000, SVM = TRUE, levels = 2, ...)

Arguments

filedir

The file or directory to be read. This can be an individual file, a directory containing .txt files to be read, or the directory containing the score and setup directories.

tofmin

The minimum time of flight value allowed. Defaults to 60.

tofmax

The maximum time of flight value allowed. Defaults to 2000.

extmin

The minimum extinction value allowed. Defaults to 0.

extmax

The maximum extinction value allowed. Defaults to 10000.

SVM

Boolean specifying whether or not to use the support vector machine to separate worms and bubbles.

levels

The number of levels above the individual files for the directory containing information about experiment date, name, round, and assay. Defaults to 2, which is the standard for Andersen Lab file structure as of June 2015.

...

Optional specifications for COPAS functions, such as reflx = FALSE

Value

If a single file is given, a single data frame for only the provided plate is returned. If an experiment directory is given, a list of two data frames will be returned. The first element in the list will be a single data frame for all of the score plates. The second element will be all of the setup plates. If there are no setup plates, NA will fill the second list element. If a setup or score directory is given, a single data frame of all of the plates in the directory will be returned.


AndersenLab/easysorter documentation built on Nov. 27, 2020, 4:26 a.m.