call_openchrom {chromConverter}R Documentation

Parse files with OpenChrom

Description

Writes xml batch-files and calls OpenChrom file parsers using a system call to the command-line interface. To use this function OpenChrom must be manually installed.

Usage

call_openchrom(
  files,
  path_out,
  format_in,
  export_format = c("csv", "cdf", "mzml", "animl"),
  return_paths = FALSE
)

Arguments

files

files to parse

path_out

directory to export converted files.

format_in

Either msd for mass spectrometry data, csd for flame ionization data, or wsd for DAD/UV data.

export_format

Either csv, cdf, mzml, animl.

return_paths

Logical. If TRUE, the function will return a character vector of paths to the newly created files.

Details

The call_openchrom works by creating an xml batchfile and feeding it to the OpenChrom command-line interface. OpenChrom batchfiles consist of InputEntries (the files you want to convert) and ProcessEntries (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, such as FID, ECD, NPD), and wsd (wavelength selective detectors, such as DAD, and UV/VIS). Thus, when calling the OpenChrom parsers, you must select one of these three options for the input format (format_in).

Note: Turning on the OpenChrom command-line will deactivate the graphical user interface (GUI). Thus, if you wish to continue using the OpenChrom GUI, it is recommended to create a separate command-line version of OpenChrom to call from R.

Value

If return_paths is TRUE, the function will return a vector of paths to the newly created files. If return_paths is FALSE and export_format is csv, the function will return a list of chromatograms in data.frame format. Otherwise, it will not return anything.

Side effects

Chromatograms will be exported in the format specified by export_format in the folder specified by path_out.

Author(s)

Ethan Bass


[Package chromConverter version 0.2.1 Index]