Reads a sequence of injections from an 'Agilent' .rslt directory.
Combines raw chromatogram data from .dx files with injection-level
metadata parsed from the accompanying .acaml file.
read_agilent_rslt(
path,
what = c("chroms", "dad"),
path_out = NULL,
format_out = c("matrix", "data.frame", "data.table"),
data_format = c("wide", "long"),
read_metadata = TRUE,
metadata_format = c("chromconverter", "raw"),
collapse = TRUE,
sample_names = c("basename", "sample_name"),
progress_bar = FALSE,
cl = 1
)A list of chromatograms (one read_agilent_dx-style result per
injection in the sequence), in the format specified by data_format and
format_out. If read_metadata is TRUE, injection-level metadata parsed
from the .acaml file is attached to each chromatogram as attributes.
Path to 'Agilent' .rslt directory.
Whether to extract chromatograms (chroms), DAD data
(dad), auxiliary instrumental data (instrument), such as
temperature, pressure or solvent composition, and/or mass spectra (MS1)
with the total ion chromatogram (TIC) and base peak chromatogram (BPC).
Accepts multiple arguments, and defaults to chroms and dad. When more than one is requested, any the archive does not contain
are left out; a single one that is missing is an error.
A directory to export unzipped files. If a path is not
specified, a temporary directory is used. The files are extracted into a
folder named for path, overwriting any files of the same name already
there.
Class of output. Either matrix, data.frame, or
data.table.
Whether to return data in wide (default) or long format.
Logical. Whether to attach metadata. Defaults to TRUE.
Format to output metadata. Either chromconverter
(standardized field names) or raw (vendor field names, unmapped).
Logical. Whether to collapse lists that only contain a single
element. Defaults to TRUE.
How to name the chromatograms that are returned. Either
basename (default), to use the name of the source .dx file, or
sample_name, to use the sample name field from the metadata.
Logical. Whether to show a progress bar while reading
the sequence's .dx files. Defaults to FALSE, since read_chroms already
reports progress over the directories it found and a second bar inside each
one would be redrawn per directory. Set to TRUE when calling this function
directly on a sequence with many injections.
Argument to pbapply specifying the number
of clusters to use or a cluster object created by
makeCluster. Defaults to 1.
Ethan Bass
Currently this function only reads .dx chromatogram files. To read the
peak tables stored in .rx files, use read_peaklist with
format_in = "openlab".
Other 'Agilent' parsers:
read_agilent_d(),
read_agilent_dx(),
read_chemstation_ch(),
read_chemstation_csv(),
read_chemstation_logs(),
read_chemstation_method(),
read_chemstation_ms(),
read_chemstation_reports(),
read_chemstation_uv()
if (FALSE) {
read_agilent_rslt("path/to/sequence.rslt")
}
Run the code above in your browser using DataLab