maldi_draw_peaks_by_well: Draw m/z peaks in spectra

Description Usage Arguments Details Examples

Description

Draws spectra and places them on a pdf page for printing.

Usage

1
2
3
4
5
6
7
8
9
maldi_draw_peaks_by_well(
  object,
  data_peaks,
  ncol = 2,
  nrow = 6,
  highlight_missing_peaks = TRUE,
  title = NULL,
  SNR = NULL
)

Arguments

object

A (list of) MassSpectrum.

data_peaks

A peak data table as returned by maldi_find_peaks_by_well; must be a subset of object.

ncol

Number of plot columns to arrange per page.

nrow

Number of plot rows to arrange per page.

highlight_missing_peaks

Whether or not spectra in which not all peaks are detected should be highlighted.

title

Optional title of plot.

SNR

Optional signal-to-noise level used to detect peaks.

Details

No checking is done whether data_peaks was indeed derived from object. However, data_peaks must contain a column findex which points to the index of corresponding spectrum in object.

Examples

1
2
3
4
5
6
7
8
9
data("BobCAT")

my_masses <- c(ion_species_A = 2425, ion_species_B = 2441)

# trim the spectra during averaging to speed-up the peak detection; alternatively
# use MALDIquant::trim(...).
my_spectrum <- maldi_average_by_well(BobCAT, final_trim_range = c(2420, 2445))
# detect peaks at the masses
my_peaks <- maldi_find_peaks_by_well(my_spectrum, my_masses)

benjbuch/summerrmass documentation built on Dec. 19, 2021, 8:43 a.m.