Skip to contents

Writes xml batch-files and calls OpenChrom file parsers using a system call to the command-line interface. To use this function OpenChrom (version 0.4.0) must be manually installed. The command line interface is no longer supported in the latest versions of OpenChrom (starting with version 0.5.0), so the function will not work with these newer versions.

Usage

call_openchrom(
  files,
  path_out = NULL,
  format_in,
  format_out = c("matrix", "data.frame"),
  export_format = c("mzml", "csv", "cdf", "animl"),
  return_paths = FALSE,
  verbose = getOption("verbose")
)

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.

format_out

R format. Either matrix or data.frame.

export_format

Either mzml, csv, cdf, animl. Defaults to mzml.

return_paths

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

verbose

Logical. Whether to print output from OpenChrom to the console.

Value

If return_paths is FALSE, the function will return a list of chromatograms (if an appropriate parser is available to import the files into R). The chromatograms will be returned in matrix or data.frame format according to the value of format_out. If return_paths is 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, e.g. FID, ECD, NPD), and wsd (wavelength selective detectors, e.g. 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.

Side effects

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

References

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. doi:10.1186/1471-2105-11-405 .

Author

Ethan Bass