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

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

Arguments

filename

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

format

An experiment description for reading raw data can be provided as an Excel spreadsheet ("excel") or as a comma-delimited ("csv") or tab-delimited ("tab", "tsv", "txt" or "text") text file. The value "trackxf" indicates that the file is an archived experiment in the trackxf format (as generated by export_data). 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 = "trackxf".

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 = "trackxf".

author.note

Ignored. For compatibility with read_experiment.

threads

Ignored. For compatibility with read_experiment.

verbose

Ignored. For compatibility with read_experiment.

Value

Invisibly returns TRUE for a successful check or FALSE

otherwise.

Details

Information about a full experiment can be assembled into a spreadsheet (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.

Examples

require(Rtrack)
experiment.description <- system.file("extdata", "Minimal_experiment.xlsx",
  package = "Rtrack")
check_experiment(experiment.description)
#> ✔ This experiment appears to be valid and complete.