maldi_average_spectra: Align and average MALDI spectra

Description Usage Arguments Details Value

View source: R/maldi_fun.R

Description

Default method to align and average MALDI spectra.

Usage

1
2
3
4
5
6
7
maldi_average_spectra(
  object,
  method_baseline = "SNIP",
  method_average = "mean",
  ...,
  final_trim_range = c(0, Inf)
)

Arguments

object

A (list of) MassSpectrum.

method_baseline

Method for background subtraction. See MALDIquant::removeBaseline.

method_average

Method to average replicate measurements. See MALDIquant::averageMassSpectra.

...

Arguments passed to alignSpectra.

final_trim_range

A numeric vector from which the maximum and the minimum value are taken to trim the spectrum to a relevant range.

Details

The baseline of the spectra is removed using method_baseline first, then the spectra aligned using the default parameters of alignSpectra unless other arguments are passed via .... The aligned spectra are averaged and trimmed to final_trim_range.

This method can be substituted/overwritten to adapt specific needs in a pipeline.

Value

A single MassSpectrum.


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