removePeaks: generic method removePeaks

Description Usage Arguments Value Examples

Description

generic method removePeaks

removePeaks for PeakList Class allows removing peaks below a certain treshhold of ioncounts. the threshhold is not calculated as area, but just from the peak height (ion count at peak center)

removePeaks for PeakList Class allows removing peaks manually

removePeaks for PeakList Class allows removing peaks manually

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
removePeaks(object, mzs, operator, limit, nLocator, ...)

## S4 method for signature 'PeakList,missing,missing,numeric,missing'
removePeaks(object, mzs,
  operator, limit, nLocator, ...)

## S4 method for signature 'PeakList,missing,missing,missing,numeric'
removePeaks(object, mzs,
  operator, limit, nLocator, ...)

## S4 method for signature 'PeakList,numeric,missing,missing,missing'
removePeaks(object, mzs,
  operator, limit, nLocator, ...)

## S4 method for signature 'PeakList,missing,character,numeric,missing'
removePeaks(object, mzs,
  operator, limit, nLocator, ...)

Arguments

object

object of class PeakList

mzs

M/z's of peaks to be removed

operator

Accept ">", "<", "==", "<=", ">=", "!="

limit

numeric limit for peaks to be removed

nLocator

numeric how many peaks to remove with visual selection

...

additional args

Value

object of class PeakList with removed/updated peaks

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library(tofsimsData)
data(tofsimsData)
testPeakList<-PeakList(analysisName = analysisName(testSpectra),
instrument = instrument(testSpectra),
nz = nz(testSpectra),
calibration = calibration(testSpectra),
calibPoints = calibPoints(testSpectra),
mz = mz(testSpectra),
peakIDs = NULL,
peakMzs = NULL)
par(mfcol=c(1,2))
testPeakList<-addPeaks(testPeakList, mzs = 26:31, width=0.4)
plot(testPeakList, mzRange = c(25,32), type = 'l')
testPeakList<-removePeaks(testPeakList, mzs = 27)
plot(testPeakList, mzRange = c(25,32), type = 'l')


Search within the tofsims package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.