iso_map_peaks: Map peaks based on retention time

Description Usage Arguments Value See Also

View source: R/peak_mapping.R

Description

This function makes it easy to map peaks based on pre-defined peak maps. It is implemented to work on iso_files as well as directly on peak_table data frames. It reports all peaks including missing peaks and ambiguous peaks by adding a set of information columns for each entry (is_identified, is_missing, is_ambiguous, n_matches, n_overlapping). For routine downstream data processing, this function is usually followed by iso_summarize_peak_mappings and iso_get_problematic_peak_mappings to inspect the problematic peaks and iso_remove_problematic_peak_mappings to proceed only with mapped peaks that are clearly identified. Note that without this filter, one must proceed with great caution interpreting the ambiguous peaks. Also note that if the compound column already exists in peak_table, it will be overwritten with the new mappings from the peak maps but will issue a warning that this is happening.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
iso_map_peaks(...)

## S3 method for class 'iso_file_list'
iso_map_peaks(
  iso_files,
  peak_maps,
  map_id = default(map_id),
  compound = default(compound),
  rt = default(rt),
  rt_start = default(rt_start),
  rt_end = default(rt_end),
  rt_prefix_divider = ":",
  quiet = default(quiet)
)

## S3 method for class 'data.frame'
iso_map_peaks(
  peak_table,
  peak_maps,
  file_id = default(file_id),
  map_id = default(map_id),
  compound = default(compound),
  rt = default(rt),
  rt_start = default(rt_start),
  rt_end = default(rt_end),
  rt_prefix_divider = ":",
  quiet = default(quiet)
)

Arguments

...

S3 method placeholder parameters, see class specific functions for details on parameters

iso_files

collection of continuous flow iso_file objects

peak_maps

data frame with the peak map(s). At minimum, this data frame must have a compound and rt column but may have additional information columns. If multiple peak maps are provided, the peak_table data frame requires a map_id column to identify which peak map should be used and the peak maps data frame must have a rt:<map_id> column for each used value of map_id. The names of all these columns can be changed if necessary using the compound, codert and map_id parameters.

map_id

the column that indicates which map to use for which file (only necessary if multiple peak maps are used)

compound

the column in peak_maps that holds compound information

rt

the column in peak_table and colum prefix in peak_maps ("rt:...") that holds retention time information

rt_start

the column in peak_table that holds start of peak retention times

rt_end

the column in peak_table that holds end of peak retention times

rt_prefix_divider

the divider after the retention time column prefix in peak_maps to identify the map id values (e.g. "rt:map_id_value")

quiet

whether to display (quiet=FALSE) or silence (quiet = TRUE) information messages.

peak_table

data frame with the peak table

file_id

the column(s) in peak_table that uniquely identify a file/set of peaks that belong together

Value

data frame with mapped peaks and the following information columns:

See Also

Other peak mapping functions: iso_get_problematic_peaks(), iso_remove_problematic_peak_mappings(), iso_summarize_peak_mappings()


KopfLab/isoprocessorCUB documentation built on Nov. 8, 2021, 9:54 a.m.