An LCMS table extends annotation_table()
to represent annotation data for an LCMS experiment. Columns representing m/z and retention time are required for an lcms_table
.
Usage
cd_source(source, sheets = c(1, 1), tag = "CD", ...)
Arguments
- source
(character) The path to the Compound Discoverer Excel files to import. Both the compounds and isomers file should be included, in that order.
- sheets
(character, numeric, integer) The name or index of the sheets to read from the source file(s). A sheet should be provided for each input file. The default is
c(1, 1)
.- tag
(character) A (short) character string that is used to represent this source e.g. in column names or source columns when used in a workflow. The default is
"CD"
.- ...
Additional slots and values passed to
struct_class
.
Inheritance
A cd_source
object inherits the following struct
classes: cd_source()
⭢ lcms_table()
⭢ annotation_table()
⭢ annotation_source()
⭢ struct_class()
See also
Other annotation sources:
annotation_database
,
annotation_table
,
ls_source
,
mspurity_source
Other annotation tables:
MetFrag_source
,
annotation_table
,
ls_source
Examples
M = cd_source(
sheets = c(2, 2),
mz_column = "mz",
rt_column = "rt",
id_column = "id",
tag = character(0),
data = data.frame(id=NA),
source = character(0))
#> Error in validObject(.Object): invalid class “cd_source” object: 1: The following columns are missing from the data.frame: "mz" ,"rt"
#> invalid class “cd_source” object: 2: The column named in the "mz_column" parameter must be present in the data.frame.
#> invalid class “cd_source” object: 3: The column named in the "rt_column" parameter must be present in the data.frame.