treat.DB {metaMS} | R Documentation

## Scaling of pseudospectra in an msp object

### 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

    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

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

[Package metaMS version 1.28.0 Index]