Agilent .uv files come in several formats. This parser detects the
version from the file and reads versions 31 and 131 from 'Agilent
ChemStation' and 'Agilent OpenLab'; any other version is an error.
Arguments
- path
Path to 'Agilent'
.uvfile.- format_out
Class of output. Either
matrix,data.frame, ordata.table.- data_format
Whether to return data in
wide(default) orlongformat.- read_metadata
Logical. Whether to attach metadata. Defaults to
TRUE.- metadata_format
Format to output metadata. Either
chromconverter(standardized field names) orraw(vendor field names, unmapped).- scale
Whether to scale the data by the scaling factor present in the file. Defaults to
TRUE.- source_file
Source file from which UV data was originally derived.
Value
A 3D chromatogram in the format specified by data_format and
format_out. If data_format is wide, the chromatogram will
be returned with retention times as row names and wavelengths as columns. If
long format is requested, three columns will be returned: one for the
retention time, one for the wavelength and one for the intensity. The
format_out argument determines whether the chromatogram is returned as
a matrix, data.frame, or data.table. Metadata are attached to the
chromatogram as attributes if read_metadata is TRUE.
Details
Retention times are read from each spectrum, so they are unevenly spaced when the detector did not store every spectrum. Interpolate onto a common time axis before comparing runs.
Note
This function was adapted from the parser in the rainbow project licensed under GPL 3 by Evan Shi https://rainbow-api.readthedocs.io/en/latest/agilent/uv.html.
