Learn R Programming

Rtrack (version 1.0.7)

check_experiment: Check experiment data.

Description

Checks that the experiment description is well-formed and complete.

Usage

check_experiment(
  filename,
  format = NA,
  interpolate = FALSE,
  project.dir = NA,
  data.dir = project.dir,
  cluster = NULL,
  author.note = "",
  verbose = FALSE
)

Value

Invisibly returns TRUE for a successful check or FALSE

otherwise.

Arguments

filename

A spreadsheet file containing a description of the experiment or a JSON file containing an exported experiment archive.

format

An experiment description for reading raw data can be provided as an Excel spreadsheet ('excel'; the default) or as a comma-delimited ('csv') or tab-delimited ("tab", "tsv", "txt" or "text") text file. The value 'json' indicates that the file is an archived experiment in the JSON format (as generated by export_json). Default (NA) is to guess the format from the file extension.

interpolate

Ignored. For compatibility with read_experiment.

project.dir

A directory path specifying where the files needed for processing the experiment are stored. Ignored if format = "json".

data.dir

A directory path specifying where the raw data are stored. This is a folder root and all paths specified in the spreadsheet. Ignored if format = "json".

cluster

Ignored. For compatibility with read_experiment.

author.note

Ignored. For compatibility with read_experiment.

verbose

Ignored. For compatibility with read_experiment.

Details

Information about a full experiment can be assembled into a spreadsheet (currently Excel, CSV and tab-delimited text formats are supported) and used to process large numbers of files in one batch. This function checks the spreadsheet to make sure that it is properly formed and that all the data files referred to are present.

The function can (and ideally should) be run with the same parameters as will be used to call read_experiment, although many of the parameters are not required for the check.

The content of the spreadsheet, the presence and the content of any supporting files are also checked. Checks do not cover validity of the raw data, so it is still possible to have invalid data even if check_experiment returns TRUE (although this suggests an underlying problem with the raw data). Warning and error messages are intended to be useful and help any format issues be quickly resolved.

See Also

read_experiment, export_json.

Examples

Run this code
require(Rtrack)
experiment.description <- system.file("extdata", "Minimal_experiment.xlsx",
  package = "Rtrack")
check_experiment(experiment.description)

Run the code above in your browser using DataLab