vdetect: Valley detection and centroidization

View source: R/vdetect.R

vdetectR Documentation

Valley detection and centroidization

Description

Checks envelopes calculated by envelope for valleys and extracts centroids or intensoids.

Usage

vdetect(profiles,detect="centroid",plotit=TRUE,verbose=TRUE)

Arguments

profiles

List of stick profiles as generated by envelope.

detect

To return either "centroid", "intensoid" or "valley".

plotit

Should results be plotted, TRUE/FALSE?

verbose

Verbose, TRUE/FALSE?

Value

List with length equal to length of list profiles, with equal names of list entries. Each entry in that list contains the centroids, intensoids or valleys of the envelope in two columns:

m/z

m/z

abundance

Area (centroid) or abundance (intensoid, valley)

definitions

Valley: local profile minimum, i.e. any envelope stick flanked by two other sticks of higher abundance.

Stick: see envelope.

Centroid mass: intensity-weighted sum of the m/z of sticks between two valleys.

Centroid intensity: profile area between two valleys (mean of upper and lower sum of stick intensities), normalized to the maximum centroid area of the envelope.

Intensoid mass: m/z of the most intense stick between two valleys.

Intensoid intensity: intensity of the most intensive stick between two valleys, normalized to the most intense intensoid.

Note

Too low stick discretization leads to imprecision in valley, centroid and intensoid characteristics.

Author(s)

Martin Loos, Christian Gerber

See Also

isopattern envelope

Examples

############################
# batch of chemforms #######
data(isotopes)
data(chemforms)
chemforms<-chemforms[1:5]

pattern<-isopattern(
  isotopes,
  chemforms,
  threshold=0.1,
  plotit=TRUE,
  charge=FALSE,
  emass=0.00054858,
  algo=2
)

profiles<-envelope(
    pattern,
    ppm=FALSE,
    dmz=0.0001,   
    frac=1/4,
    env="Gaussian",
    resolution=1E6,
    plotit=TRUE
)

centro<-vdetect(
  profiles,
  detect="centroid",
  plotit=TRUE
)

############################


enviPat documentation built on Oct. 21, 2022, 5:06 p.m.