View source: R/call_openchrom.R
call_openchrom | R Documentation |
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 no longer work with these newer versions. OpenChrom 1.4 has been scrubbed
from the internet, but OpenChrom 1.3 is still available from
SourceForge.
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")
)
files |
files to parse |
path_out |
directory to export converted files. |
format_in |
Either |
format_out |
R format. Either |
data_format |
Whether to return data in |
export_format |
Either |
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. |
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
).
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.
Chromatograms will be exported in the format specified
by export_format
in the folder specified by path_out
.
Activating 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.
Ethan Bass
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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1186/1471-2105-11-405")}.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.