Skip to contents

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

ls_source(
  source,
  tag = "LS",
  mz_column = "mz",
  rt_column = "rt",
  id_column = "id",
  ...
)

Arguments

source

(ANY) The source of annotation data.

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 "LS".

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.

Value

A ls_source object. This object has no output slots.

Inheritance

A ls_source object inherits the following struct classes:

[ls_source] -> [lcms_table] -> [annotation_table] -> [annotation_source] -> [struct_class]

See also

Other annotation sources: annotation_database, annotation_table, cd_source, mspurity_source

Other annotation tables: annotation_table, cd_source

Examples

M = ls_source( mz_column = "mz", rt_column = "rt", id_column = "id",
tag = character(0), data = data.frame(id=NA), source = "ANY")
#> Error in validObject(.Object): invalid class “ls_source” object: Column(s) named "mz","rt","id" must be present in the data.frame for this source.