read_chroms {chromConverter} | R Documentation |
Read Chromatograms
Description
Reads chromatograms from specified folders or vector of paths using file parsers from Aston, Entab, and ThermoRawFileParser.
Usage
read_chroms(
paths,
find_files,
format_in = c("chemstation_uv", "chemstation_csv", "masshunter_dad", "shimadzu_fid",
"shimadzu_dad", "chromeleon_uv", "thermoraw", "mzml", "waters_arw", "msd", "csd",
"wsd", "other"),
pattern = NULL,
parser = c("", "chromconverter", "aston", "entab", "thermoraw", "openchrom"),
format_out = c("matrix", "data.frame"),
export = FALSE,
path_out = NULL,
export_format = c("csv", "cdf", "mzml", "animl"),
read_metadata = TRUE,
dat = NULL
)
Arguments
paths |
paths to files or folders containing files |
find_files |
Logical. Set to |
format_in |
Format of files to be imported/converted. The current options
are: |
pattern |
pattern (e.g. a file extension). Defaults to NULL, in which
case file extension will be deduced from |
parser |
What parser to use. Current option are |
format_out |
R object format (i.e. data.frame or matrix). |
export |
Logical. If TRUE, will export files as csvs. |
path_out |
Path for exporting files. If path not specified, files will export to current working directory. |
export_format |
Export format. Currently the only option is |
read_metadata |
Logical, whether to attach metadata (if it's available). Defaults to TRUE. |
dat |
Existing list of chromatograms to append results. (Defaults to NULL). |
Details
Currently recognizes Agilent ChemStation '.uv', MassHunter '.dad' files, and ThermoRaw files. To use Entab and the ThermoRawFileParser, they must be manually installed. Please see the instructions in the Read Me.
Value
A list of chromatograms in matrix
or data.frame
format,
according to the value of format_out
.
Side effects
If export
is TRUE, chromatograms will be
exported in the format specified by export_format
in the folder specified
by path_out
. Currently, the only option for export is csv
unless
the parser
is openchrom
.
Author(s)
Ethan Bass
Examples
path <- "tests/testthat/testdata/dad1.uv"
chr <- read_chroms(path, find_files = FALSE, format_in = "chemstation_uv")