IrmsContinuousFlowData: IrmsContinuousFlowData reference class

Description Arguments Value Fields Methods Note See Also

Description

IrmsContinuousFlowData reference class

Arguments

masses

which masses to retrieve, all defined ones by defaul

melt

whether to melt the data frame

ratios

which ratios to retrieve, all defined ones by default

melt

whether to melt the data frame

rts

Get peaks by name

rts

Set peak(s) columns (this one should not be used externally)

peak_nr

- peak number(s) to update with the provided attributes

...

- peak columns to change (only one value per attribute allowed!) set peak(s) columns by retention time Set/unset reference peaks

Identify peaks as reference peaks (or remove their status as a reference peak). This is a specialized call for set_peak_by_rt

rt

(can be a vector)

set

- wether to set it to be or not be a reference peak

reevalute

- whether to revaluate the peak table right away Identify peak(s)

Identify peaks by mapping compound names to retention times

rts

- retention times

compounds

- compound names Map peak(s)

Add information to peaks by mapping properties from a data frame that contains at least the defined dataTableKeys['peak_nr'] or dataTableKeys['rt'] as a column. Additional columns (other than peak nr and retention time) are mapped to the relevant peaks if they correspond to existing columns, otherwise they are disregarded with a warning.

map

- the map of properties Evaluate data in peak table Plot the data points in the peak table

y

= expression which data to plot (will be evaluated in context of the data frame)

ylab

= y axis label

title

= title of the plot

data

= peak table data (by default the whole peak table)

y

= expression which data to plot (will be evaluated in context of the data frame)

ylab

= y axis label

title

= title of the plot

data

= peak table data (by default the whole peak table) Make a ggplot of the references in the peak table Make a ggplot of the data peaks in the peak table Plot the data (both masses and ratios) - much faster than ggplot but not as versatile

tlim

time range, should be in the same tunits

masses

which masses to plot (all defined in plot optinos by default)

ratios

which ratios to plot (all defined in plot options by default)

tunits

time units, as defined in tunits (currently either "s" or "min"), takes the one set in plotOptions as default

tlim

time range, should be in the same tunits

masses

which masses to plot (all defined in plot optinos by default)

ratios

which ratios to plot (all defined in plot options by default)

tunits

time units, as defined in tunits (currently either 's' or 'min'), takes the one set in plotOptions as default Plot the masses (this if much faster than ggplot but not as versatile)

tlim

-> time range, should be in the same tunits

tunits

-> time units, as defined in tunits (currently either "s" or "min"), takes the one set in plotOptions as default Plot the ratios (this if much faster than ggplot but not as versatile)

tlim

-> time range, should be in the same tunits

tunits

-> time units, as defined in tunits (currently either "s" or "min"), takes the one set in plotOptions as default ggplot the data

tlim

time range (in tunits units)

tunits

units (currently "s" or "min")

masses

vector of the masses to plot (if NULL, panel excluded)

ratios

vector of the ratios to plot (if NULL, panel excluded)

tlim

time range (in tunits units)

tunits

units (currently 's' or 'min')

masses

vector of the masses to plot (if NULL, panel excluded)

ratios

vector of the ratios to plot (if NULL, panel excluded) summarize data to pdf

file

the file name where to save, by default saves where the file was original from

whether

to try to compact the pdf to make it smaller

plots

whether to include the plot

table

whether to include the table export data (by default to csv)

Value

returns the data frame of found peaks (0-row df if none found) Get peaks by rt

Fields

massData

stores the chromatographic data (the actual mass and ratio data traces), inherited from IrmsDataClass

dataTable

stores the peak table (detected peaks and all their information), inherited from IrmsDataClass

dataTableKeys

stores information about which columns correspond to key elements of the dataTable (e.g. the peak number, retention time and compound name)

Methods

export_data(file, ...)

export the data stored in this object to file

get_data_table(...)

retrieve the data table

get_mass_data(masses = names(.self$plotOptions$masses), melt = FALSE, ...)

get the mass trace data for specific masses, can be provided in melt = TRUE long format for easy use in ggplot style plotting

get_peak(peak_nr, select = names(dataTable))

retrieve information for a peak in the peak table (identified by peak_nr), can specify which columns to retrieve with selec, retrieves all columns by default

get_peak_by_name(names, select = names(dataTable))

retrieve information for peak(s) in the peak table (identified by names)

get_peak_by_rt(rts, select = names(dataTable))

retrieve information for peak(s) in the peak table (identified by retention times)

get_peak_nr_by_name(names)

find peak numbers (i.e. ids) by name(s), returns a vector of found peak numbers (integer(0) if none found)

get_peak_nr_by_rt(rts)

find peak numbers (i.e. ids) by retention time(s), returns a vector of found peak numbers (integer(0) if none found)

get_ratio_data(ratios = names(.self$plotOptions$ratios), melt = FALSE)

get the ratio trace data for specific ratios, can be provided in melt = TRUE format for easy use in ggplot style plotting

identify_peaks(rts, compounds)

Identify peaks by mapping compound names to retention times

init_irms_data()

initialize irms data container

make_ggplot(...)

generate a ggplot object for the data in this IrmsData object

map_peaks(map)

Add information to peaks by mapping properties from a data frame that contains at least the defined peak number (e.g. 'Peak Nr.') or retention time (Rt) as a column. Additional columns (other than peak nr and retention time) are mapped to the relevant peaks if they correspond to existing columns, otherwise they are disregarded with a warning.

Note: make sure to have the data.frame that is passed in set with stringsAsFactors = F (usually the desired setting for the mapping)

plot(...)

plot data with standard plot functions (fast) to standard output

plot_data(y, ylab = "", title = "data peaks")

plot the data of the actual sample peaks, see plot_data_table for details on syntax

plot_data_table(y = NULL, ylab = "", title = "", data = get_data_table())

Plot the data points in the peak table

#' @param y = expression which data to plot (will be evaluated in context of the data frame)

#' @param ylab = y axis label

#' @param title = title of the plot

#' @param data = peak table data (by default the whole peak table)

plot_masses(tlim = NULL, ylim = NULL, masses = names(.self$plotOptions$masses), tunits = .self$plotOptions$tunits$labels[[.self$plotOptions$tunits$value]])

Plot the masses (this if much faster than ggplot but not as versatile)

plot_ratios(tlim = NULL, ylim = NULL, ratios = names(.self$plotOptions$ratios), tunits = .self$plotOptions$tunits$labels[[.self$plotOptions$tunits$value]])

Plot the ratios (this if much faster than ggplot but not as versatile)

reevaluate_peak_table()

reevalutes the peak table (not currently implemented)

set_ref_peaks(rts, set = TRUE, reevaluate = FALSE)

Identify peaks (by their retention times) as reference peaks (or remove their status as a reference peak)

summarize(file, ....)

summarize the data stored in this object and save it to file

Note

consider storing the extra x units in the massData but worries about the size of this object keep me from storing extra information in massData get data for ratios

make sure to have the data.frame that is passed in with stringsAsFactors = F

consider adding a ... option to allow setting plot options or temporarily overwriting them here

See Also

IrmsData, IrmsDualInletData get data for masses


sebkopf/isoread documentation built on Dec. 31, 2021, 4:15 a.m.