Learn R Programming

ume (version 1.5.2)

uplot_kmd: Kendrick Mass Defect (KMD) vs. Nominal Mass Plot

Description

This function generates a scatter plot of Kendrick Mass Defect (KMD) versus nominal mass (nm), with color-coding based on a specified variable (z_var). Optionally, the plot can be returned as an interactive Plotly object.

Usage

uplot_kmd(
  df,
  z_var = "norm_int",
  palname = "redblue",
  size_dots = 0.5,
  col_bar = TRUE,
  tf = FALSE,
  logo = TRUE,
  cex.axis = 12,
  cex.lab = 15,
  plotly = FALSE,
  ...
)

Value

A ggplot object (or a plotly object if plotly = TRUE) showing KMD vs nominal mass.

Arguments

df

A data.table or data.frame containing columns:

  • nm (nominal mass)

  • kmd (Kendrick mass defect)

  • the color variable given in z_var.

z_var

Character. Name of the column used for color mapping.

palname

Character. Palette name passed to f_colorz().

size_dots

Numeric. Point size.

col_bar

Logical. (Reserved for future use; currently ignored.)

tf

Logical. (Reserved for future use; currently passed to f_colorz() via ... if desired.)

logo

Logical. If TRUE, adds a UME caption.

cex.axis

Numeric. Axis text size.

cex.lab

Numeric. Axis label size.

plotly

Logical. If TRUE, return interactive plotly object.

...

Arguments passed on to f_colorz

z

Numeric vector. Values whose colors should be computed.

col_num

Integer. Number of colors in the palette (default: 100).

verbose

logical; if TRUE, show progress messages.

Details

Kendrick Mass Defect (KMD) vs. Nominal Mass Plot

References

Kendrick E. (1963). A mass scale based on CH\(_2\) = 14.0000 for high resolution mass spectrometry of organic compounds. Analytical Chemistry, 35, 2146–2154.

Hughey C.A., Hendrickson C.L., Rodgers R.P., Marshall A.G., Qian K.N. (2001). Kendrick mass defect spectrum: A compact visual analysis for ultrahigh-resolution broadband mass spectra. Analytical Chemistry, 73, 4676–4681. tools:::Rd_expr_doi("10.1021/ac010560w")

See Also

Other plots: uplot_cluster(), uplot_cvm(), uplot_dbe_minus_o_freq(), uplot_dbe_vs_c(), uplot_freq_ma(), uplot_freq_vs_ppm(), uplot_hc_vs_m(), uplot_heteroatoms(), uplot_isotope_precision(), uplot_lcms(), uplot_ma_vs_mz(), uplot_ms(), uplot_n_mf_per_sample(), uplot_pca(), uplot_ratios(), uplot_reproducibility(), uplot_ri_vs_sample(), uplot_vk()

Examples

Run this code
uplot_kmd(mf_data_demo, z_var = "norm_int", plotly = TRUE)

Run the code above in your browser using DataLab