treat.DB: Scaling of pseudospectra in an msp object

Description Usage Arguments Value Author(s) Examples

View source: R/matchfuns.R

Description

This function transforms the “raw” data in an msp DB object into preprocessed data. Even if no scale and no mass.weight is applied, the intensities are still changed: scaled to unit length.

Usage

1
treat.DB(DB, scale.p = c("sqrt", "none"), mass.weight = TRUE, isMSP = TRUE)

Arguments

DB

A database of spectra in the original intensity units.

scale.p

scale intensities with a square-root function, or leave them as they are. Default is to use scaling.

mass.weight

Logical: if TRUE, higher masses are given more weight.

isMSP

Logical: if TRUE, then the spectra are stored in slot pspectrum; otherwise the spectra are simply the list elements of DB.

Value

The function returns the database, where intensities are scaled.

Author(s)

Ron Wehrens

Examples

1
2
data(threeStdsNIST)  ## provides object smallDB, excerpt from NIST DB
smallDB.scaled <- treat.DB(smallDB)

metaMS documentation built on Nov. 17, 2017, 1:33 p.m.