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",
mz_column = "mz",
rt_column = "rt",
id_column = "id",
...
)
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"
.- mz_column
(character) The column name of the annotation data.frame containing m/z values. The default is
"mz"
.- rt_column
(character) The column name of the annotation data.frame containing retention time values. The default is
"rt"
.- id_column
(character) The column name of the annotation data.frame containing row identifers. If NULL This will be generated automatically. The default is
"id"
.- ...
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:
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: Column(s) named "mz","rt","id" must be present in the data.frame for this source.