Converts files with the OpenChrom command-line interface, then reads the converted files back into R. OpenChrom removed the command-line interface in version 1.5.0, and Lablicate no longer distributes older versions, so this function works only with an existing installation of OpenChrom 1.4 or earlier. It is deprecated for that reason.
call_openchrom(
files,
path_out = NULL,
format_in,
format_out = c("matrix", "data.frame", "data.table"),
data_format = c("wide", "long"),
export_format = c("mzml", "csv", "cdf", "animl"),
return_paths = FALSE,
verbose = getOption("verbose")
)If return_paths is FALSE, a list with one chromatogram per file,
read back with read_mzml, read_cdf or read.csv
according to export_format. format_out and data_format apply only to
cdf files, except that format_out = "matrix" also converts csv files.
animl files cannot be read back,
so use return_paths = TRUE for them. If return_paths is TRUE, a
character vector of paths to the newly created files.
Path to files.
Directory to export converted files. Defaults to NULL, in
which case the files go to a temporary directory that is deleted when the
function returns.
Either msd for mass spectrometry data, csd for
FID, ECD or NPD data, or wsd for DAD/UV data.
Class of output. Either matrix, data.frame, or
data.table.
Whether to return data in wide (default) or long format.
Either mzml, csv, cdf, or animl. Defaults to
mzml. mzml and cdf are available only for msd. OpenChrom versions
before 1.4 can export only msd files, and only to csv, cdf or animl.
Logical. If TRUE, the function will return a character
vector of paths to the newly created files.
Logical. Whether to print output from OpenChrom to the console.
Chromatograms are exported in the format specified
by export_format to the folder specified by path_out.
Ethan Bass
The call_openchrom function works by creating an xml batchfile
and feeding it to the OpenChrom command-line interface. OpenChrom batchfiles
consist of InputEntries (specifying the files you want to convert) and
ProcessEntries (specifying what you want to do to the files). The parsers
are organized into broad categories by detector-type and output format. The
detector-types are msd (mass selective detectors), csd (current selective
detectors, e.g., FID, ECD, NPD), and wsd (wavelength selective detectors,
e.g., DAD, and UV/VIS). Thus, when calling the OpenChrom parsers, one of
these three options must be specified using the format_in argument.
Wenig, Philip and Odermatt, Juergen. OpenChrom: A Cross-Platform Open Source Software for the Mass Spectrometric Analysis of Chromatographic Data. BMC Bioinformatics 11, no. 1 (July 30, 2010): 405. tools:::Rd_expr_doi("10.1186/1471-2105-11-405").
Other external parsers:
call_entab(),
call_rainbow(),
read_thermoraw(),
sp_converter(),
uv_converter()
if (FALSE) {
call_openchrom("path/to/file.RAW", format_in = "msd", export_format = "mzml")
}
Run the code above in your browser using DataLab