read_unicorn: Import chromatograms

Description Usage Arguments Details Value Parsing RES files See Also Examples

Description

Read UNICORN chromatogram data

Usage

1
2
3
4
5
read_unicorn(file_name, sample_names = NULL, combined = TRUE,
  single_channel = FALSE, hardware_autozero = FALSE,
  reference_measurement = 1, verbose = FALSE)

read_res(file_name, smooth = TRUE, smooth_level = 1, verbose = FALSE)

Arguments

file_name

The file to be imported. read_unicorn can import either an Excel file or an ASC (currently not implemented). read_res can import a binary RES file (not fully implemented).

sample_names

A vector or a data frame containing actual sample names corresponding to curve names

combined

TRUE (default) when several spectra are combined by the UNICORN software prior to export.

single_channel

TRUE if the UV cell can only work in single channel mode. Default is FALSE.

hardware_autozero

TRUE when the UV cell was autozeroed during acquisition. Default is FALSE.

reference_measurement

The number of measurement to be used in baseline subtraction. Ignored when hardware_autozero = TRUE.

verbose

Display additional progress information. Default is FALSE.

smooth

Use cubic spline smoothing on sensor data imported from a RES file.

smooth_level

Level of smoothing, default is 1.

Details

If sample_names is a character vector, a new column named as Sample will be appended to the data frame in the same order as curve names. However, this is not recommended as the order of the curves may change or some curves may be excluded at some point during data import. In the latter case, you will get an error message. The safest way is to define a data frame with the column names ID and Sample, matching the curve name to the sample name, respectively. When you use it to define sample names, only those curves that are found in the data will be processed, i.e. missing curves will be ignored.

When hardware_autozero = TRUE, chromatograms are assumed to be baselined already during acquisition and this baseline level will is trusted. Otherwise (default), the baseline will be subtracted from each chromatogram using the measurement defined by reference_measurement. This is a linear operation, which will not change the shape of the curve but it will only shift its baseline towards 0.

Please note that single_channel refers to the UV cell rather than how the data are exported. Even if you export only one channel out of many from a chromatogram file, the naming will include the channel information and it will interfere with data import as well as grouping. Therefore, use single_channel = TRUE only when you are sure that the UV detector can operate with one channel at a time.

Value

A tibble that contains volume, (baselined) absorbance, wavelength/channel, curve and sample name information for the experiment.

Parsing RES files

UNICORN has a native, binary file format to store all data acquired during a chromatography run. These files have the extension ".res" and they are stored locally on the computer connected to the HPLC system. The function read_res is implemented to extract UV cell sensor data directly from a RES file. However, the file format is closed-source. It has been partially reverse engineered and a Python script was written to extract data from a RES file. The read_res function here is based on those specifications. For more information, please see this.

See Also

annotate_chromatogram for annotating chromatograms without sample information, list_IDs to see parsed curve names, create_annotation to create a data frame with sample information.

Examples

1
2
3
4
5
6
7
## Not run: 
samples <- data.frame(
    ID = c("Manual run 10:1", "Manual run 10:5", "Manual run 10:3"),
    Sample = c("Negative control", "Positive control", "Test"))
chr_data <- read_unicorn("Chromatogram.xls", samples)

## End(Not run)

cihanerkut/unicoRn documentation built on May 13, 2019, 7:29 p.m.