tofsims: Import, process and analysis of Time-of-Flight Secondary Ion Mass Spectrometry (ToF-SIMS) imaging data

This packages offers a pipeline for import, processing and analysis of ToF-SIMS 2D image data. Import of Iontof and Ulvac-Phi raw or preprocessed data is supported. For rawdata, mass calibration, peak picking and peak integration exist. General funcionality includes data binning, scaling, image subsetting and visualization. A range of multivariate tools common in the ToF-SIMS community are implemented (PCA, MCR, MAF, MNF). An interface to the bioconductor image processing package EBImage offers image segmentation functionality.

Install the latest version of this package by entering the following in R:
AuthorLorenz Gerber, Viet Mai Hoang
Bioconductor views DataImport ImagingMassSpectrometry Infrastructure MassSpectrometry Metabolomics Proteomics
Date of publicationNone
MaintainerLorenz Gerber <>

View on Bioconductor

Man pages

addFixedWidth: Generic method to add/update peak width

addPeaks: generic method to add peaks

analysis: 'analysis', slot of 'MassSpectra' class objects

analysisName: 'analysisName', slot of 'MassSpectra' class objects

baseObject: generic accessor method baseObject

baseObject-PrComp-method: constructor for PrComp

baseObject-PrinComp-method: constructor for PrinComp

binning: binning

bwApply: bwApply

calibPointNew: Generic method calibPointNew that modifies slot calibPoints

calibPoints: 'calibPoints', slot of 'MassSpectra' class objects

calibration: 'calibration', slot of 'MassSpectra' class objects

changePeakWidth: method changePeakWidth

check.extension: Check file extension

computeMNF: compute MNF

computeNoise: computeNoise

coordToPixel: coordToPixel coordToPixel translates xy coordinates from the...

coordToPixel-MassImage-numeric-method: coordToPixel

covDiffCalc: covDiffCalc calculates a x/y shift covariance matrix of a...

cReadRawPhi: Ulvac phi ToF-SIMS raw data import

ctable: ctable is a C++ implementation to make contingency tables

dim-MassImage-method: method dim for MassImage

dim-MassSpectra-method: method definition 'dim' for 'MassSpectra' dim is a primitive

EigenDecompose: EigenDecompose for the MNF analysis extract variable names and values from Ulvac-phi ToF-SIMS...

findClosestMatch: Find single value 'toMatch' in vector 'MatchIn'

findPeakWidth: generic method findPeakWidth

getTOFs: generic method to calculate and get TOFs

image: set a generic method for image

imageMatrix: generic method to obtain imageMatrix

import: import is the C++ code for importing iontof raw data

import.raw: Raw data import

instrument: 'instrument', slot of 'MassSpectra' class objects

iters: generic accessor for iters slot

iters-MCR-method: MCR accessor iters,

itzipName: defining generic accessor method for "itzipName"

itzipName-set: generic for setter itzipName

LapackGenEigen: LapackGenEigen

legend.col: legend.col Get ITZIP property value

MAF: Class MAF

makeTIC: generic for makeTIC

makeTIC-MassSpectra-method: Method makeTIC for MassSpectra Class

manualSelectPeaks: This method is base method for plotting and manual select...

MassImage: Class MassImage

MassSpectra: Class 'MassSpectra'

MCR: Class MCR

MNF: Class MNF

mz: mz getter method

nComp: generic accessor method for slot nComp

ndim: generic accessor method for slot ndim

ndim-MassSpectra-method: method definition 'ndim' on 'MassSpectra'

nearestNeighbourMean: nearestNeighbourMean

nnMean: nnMean is C++ code for calculating nearest neighbour means in...

nnMNF: Class nnMNF

noPlottingData: generic method for 'noPlottingData' aka 'is.null'

noPlottingData-PCA-method: Check NULL PCA object

nPeaks: generic method for nPeaks

nz: 'nz', slot of 'MassSpectra' class objects

overlayPlot: generic overlayPlot

parIndicesSearch: helper function for parallel processing in rawdata import...

PCA-class: Class PCA

pcaLoadings: generic accessor for slot pcaLoadings

pcaMAF: helper function for MAF calculation

PCAnalysis: Class PCAnalysis

pcaScores: generic accessor for slot pcaScores

peakIDs: 'peakIDs', slot of 'PeakList' class objects

PeakList: Class PeakList

peakMzs: 'peakMzs', slot of 'PeakList' class objects

peakPick: generic method peak.pick

peaks2Spectra: generic method peaks2Spectra

peakWidths: Generic method peakWidths

plot: Generic method for plot

plot-MassImage-missing-method: Method 'plot()' for 'MassImage'

plot-PeakList-missing-method: Method 'plot()' for 'MassSpectra'

points: generic method points generic method points

poissonScaling: generic method for "poissonScaling"

PrComp: Class PrComp

PrinComp: Class PrinComp

readBIF: ToF-SIMS BIF/BIF6 file import

recalibrate: Generic method recalibrate

reduceSpectrumResolution: generic method reduceSpectrumResolution

removePeaks: generic method removePeaks

resids: generic accessor method for resids

resids-MCR-method: MCR accessor resids,

RSS: generic accessor for RSS

RSS-MCR-method: MCR accessor RSS,

scale: generic for scale

show-MassImage-method: method definition 'show' on 'MassImage' show has a generic by...

show-MassSpectra-method: method defining 'show()' for the 'MassSpectra' class show has...

show-PeakList-method: method defining 'show()' for the 'MassSpectra' class show has...

smootherGolay: generic method smootherGolay

smootherSpline: generic smootherSpline

smoothScatter: generic for smoothScatter

SNR: Signal-to-Noise Ratio (SNR)

subset: Generic method for subset

tofsims-package: ToF-SIMS Toolbox (tofsims)

unitMassPeaks: Generic method for unitMassPeaks

validMassImageObject: Validation method functionf for class MassImage objects

validMassSpectraObject: Validation method function for class MassImage objects

validPCAObject: Validation method function for class PCA objects

validPeakListObject: Validation method function for class PeakList objects

xdim: generic accessor method for "xdim"

xdim-MassImage-method: Getter, method definition "xdim" on "MassImage"

xdim-PCA-method: method xdim() for PCA class object

xdim-set: generic setter method for "xdim"

xy: 'xy', slot of 'MassImage' class objects

xySpec: Generic method 'xySpec'

ydim: generic accessor method for "ydim"

ydim-MassImage-method: Getter, method definition "ydim" on "MassImage"

ydim-PCA-method: method ydim() for PCA class object

ydim-set: generic setter method for "ydim"

zdim: generic accessor method for "zdim"

zdim-MassSpectra-method: method definition 'zdim' on 'MassSpectra'


addFixedWidth Man page
addFixedWidth,PeakList,numeric,numeric-method Man page
addPeaks Man page
addPeaks,PeakList,missing,numeric-method Man page
addPeaks,PeakList,numeric,numeric-method Man page
analysis Man page
analysis<- Man page
analysis<-,MassSpectra-method Man page
analysis,MassSpectra,missing-method Man page
analysis,MassSpectra,numeric-method Man page
analysisName Man page
analysisName<- Man page
analysisName<-,MassSpectra-method Man page
analysisName,MassSpectra-method Man page
baseObject Man page
baseObject,PrComp-method Man page
baseObject,PrinComp-method Man page
binning Man page
binning,MassImage-method Man page
bwApply Man page
bwApply,MassSpectra,matrix-method Man page
calibPointNew Man page
calibPointNew,MassSpectra,numeric-method Man page
calibPoints Man page
calibPoints<- Man page
calibPoints<-,MassSpectra-method Man page
calibPoints,MassSpectra-method Man page
calibration Man page
calibration<- Man page
calibration<-,MassSpectra-method Man page
calibration,MassSpectra-method Man page
changePeakWidth Man page
changePeakWidth,PeakList,missing,missing,missing-method Man page
changePeakWidth,PeakList,numeric,numeric,numeric-method Man page
check.extension Man page
computeMNF Man page
computeNoise Man page
coordToPixel Man page
coordToPixel,MassImage,numeric-method Man page
covDiffCalc Man page
cReadRawPhi Man page
ctable Man page
cTable Man page
dim,MassImage-method Man page
dim,MassSpectra-method Man page
EigenDecompose Man page Man page
findClosestMatch Man page
findPeakWidth Man page
findPeakWidth,PeakList-method Man page
getTOFs Man page
getTOFs,MassSpectra-method Man page
image Man page
image,MassImage-method Man page
imageMatrix Man page
imageMatrix,MassImage-method Man page
imageMatrix,PCA-method Man page
image,PCA-method Man page
import Man page
import.raw Man page
instrument Man page
instrument<- Man page
instrument<-,MassSpectra-method Man page
instrument,MassSpectra-method Man page
iters Man page
iters,MCR-method Man page
itzipName Man page
itzipName<- Man page
LapackGenEigen Man page
legend.col Man page Man page
MAF Man page
makeTIC Man page
makeTIC,MassSpectra-method Man page
manualSelectPeaks Man page
MassImage Man page
MassSpectra Man page
MCR Man page
MCR-class Man page
MNF Man page
mz<-,MassSpectra-method Man page
mz,MassSpectra-method Man page
nComp Man page
nComp,PCA-method Man page
ndim Man page
ndim,MassSpectra-method Man page
nearestNeighbourMean Man page
nnMean Man page
nnMNF Man page
noPlottingData Man page
noPlottingData,PCA-method Man page
nPeaks Man page
nPeaks,PeakList-method Man page
nz Man page
nz<- Man page
nz<-,MassSpectra-method Man page
nz,MassSpectra,missing-method Man page
nz,MassSpectra,numeric-method Man page
opaMCR Man page
overlayPlot Man page
overlayPlot,list-method Man page
parIndicesSearch Man page
PCA Man page
PCA-class Man page
pcaLoadings Man page
pcaLoadings,PCA,missing-method Man page
pcaLoadings,PCA,numeric-method Man page
pcaMAF Man page
PCAnalysis Man page
pcaScores Man page
pcaScores,PCA,ANY-method Man page
pcaScores,PCA,numeric-method Man page
peakIDs Man page
peakIDs<- Man page
peakIDs<-,PeakList-method Man page
peakIDs,PeakList-method Man page
PeakList Man page
peakMzs Man page
peakMzs<- Man page
peakMzs<-,PeakList-method Man page
peakMzs,PeakList-method Man page
peakPick Man page
peakPick,MassSpectra-method Man page
peaks2Spectra Man page
peaks2Spectra,PeakList,MassSpectra-method Man page
peakWidths Man page
peakWidths,PeakList-method Man page
plot Man page
plot,MassImage,missing-method Man page
plot,MassSpectra,missing-method Man page
plot,PCA,ANY-method Man page
plot,PeakList,missing-method Man page
points Man page
points,MassSpectra-method Man page
poissonScaling Man page
poissonScaling,MassSpectra-method Man page
prComp Man page
PrComp Man page
PrComp-class Man page
prinComp Man page
PrinComp Man page
PrinComp-class Man page
readBIF Man page
recalibrate Man page
recalibrate,MassSpectra-method Man page
reduceSpectrumResolution Man page
reduceSpectrumResolution,MassSpectra-method Man page
removePeaks Man page
removePeaks,PeakList,missing,character,numeric,missing-method Man page
removePeaks,PeakList,missing,missing,missing,numeric-method Man page
removePeaks,PeakList,missing,missing,numeric,missing-method Man page
removePeaks,PeakList,numeric,missing,missing,missing-method Man page
resids Man page
resids,MCR-method Man page
RSS Man page
RSS,MCR-method Man page
scale Man page
scale,MassSpectra-method Man page
show,MassImage-method Man page
show,MassSpectra-method Man page
show,PeakList-method Man page
smootherGolay Man page
smootherGolay,MassSpectra-method Man page
smootherSpline Man page
smootherSpline,MassSpectra-method Man page
smoothScatter Man page
smoothScatter,PCA-method Man page
SNR Man page
subset Man page
subset,MassImage-method Man page
tofsims-package Man page
unitMassPeaks Man page
unitMassPeaks,MassSpectra,numeric,numeric-method Man page
validMassImageObject Man page
validMassSpectraObject Man page
validPCAObject Man page
validPeakListObject Man page
xdim Man page
xdim<- Man page
xdim,MassImage-method Man page
xdim,PCA-method Man page
xy Man page
xy<- Man page
xy<-,MassImage-method Man page
xy,MassImage-method Man page
xySpec Man page
xySpec,MassImage-method Man page
ydim Man page
ydim<- Man page
ydim,MassImage-method Man page
ydim,PCA-method Man page
zdim Man page
zdim,MassSpectra-method Man page


R/AllClassDefinition.R R/AllGenericDefinition.R R/AllGetters.R R/AllSetters.R R/MAF.R R/MCR.R R/MNF.R R/MassImage.R R/MassSpectra.R R/PCA.R R/PCAnalysis.R R/PeakList.R R/RcppExports.R R/importers.R R/prcomp.R R/princomp.R R/tofsims-package.R
man/EigenDecompose.Rd man/LapackGenEigen.Rd man/MAF.Rd man/MCR.Rd man/MNF.Rd man/MassImage.Rd man/MassSpectra.Rd man/PCA-class.Rd man/PCAnalysis.Rd man/PeakList.Rd man/PrComp.Rd man/PrinComp.Rd man/RSS-MCR-method.Rd man/RSS.Rd man/SNR.Rd man/addFixedWidth.Rd man/addPeaks.Rd man/analysis.Rd man/analysisName.Rd man/baseObject-PrComp-method.Rd man/baseObject-PrinComp-method.Rd man/baseObject.Rd man/binning.Rd man/bwApply.Rd man/cReadRawPhi.Rd man/calibPointNew.Rd man/calibPoints.Rd man/calibration.Rd man/changePeakWidth.Rd man/check.extension.Rd man/computeMNF.Rd man/computeNoise.Rd man/coordToPixel-MassImage-numeric-method.Rd man/coordToPixel.Rd man/covDiffCalc.Rd man/ctable.Rd man/dim-MassImage-method.Rd man/dim-MassSpectra-method.Rd man/ man/findClosestMatch.Rd man/findPeakWidth.Rd man/getTOFs.Rd man/image.Rd man/imageMatrix.Rd man/import.Rd man/import.raw.Rd man/instrument.Rd man/iters-MCR-method.Rd man/iters.Rd man/itzipName-set.Rd man/itzipName.Rd man/legend.col.Rd man/ man/makeTIC-MassSpectra-method.Rd man/makeTIC.Rd man/manualSelectPeaks.Rd man/mz.Rd man/nComp.Rd man/nPeaks.Rd man/ndim-MassSpectra-method.Rd man/ndim.Rd man/nearestNeighbourMean.Rd man/nnMNF.Rd man/nnMean.Rd man/noPlottingData-PCA-method.Rd man/noPlottingData.Rd man/nz.Rd man/overlayPlot.Rd man/parIndicesSearch.Rd man/pcaLoadings.Rd man/pcaMAF.Rd man/pcaScores.Rd man/peakIDs.Rd man/peakMzs.Rd man/peakPick.Rd man/peakWidths.Rd man/peaks2Spectra.Rd man/plot-MassImage-missing-method.Rd man/plot-PeakList-missing-method.Rd man/plot.Rd man/points.Rd man/poissonScaling.Rd man/readBIF.Rd man/recalibrate.Rd man/reduceSpectrumResolution.Rd man/removePeaks.Rd man/resids-MCR-method.Rd man/resids.Rd man/scale.Rd man/show-MassImage-method.Rd man/show-MassSpectra-method.Rd man/show-PeakList-method.Rd man/smoothScatter.Rd man/smootherGolay.Rd man/smootherSpline.Rd man/subset.Rd man/tofsims-package.Rd man/unitMassPeaks.Rd man/validMassImageObject.Rd man/validMassSpectraObject.Rd man/validPCAObject.Rd man/validPeakListObject.Rd man/xdim-MassImage-method.Rd man/xdim-PCA-method.Rd man/xdim-set.Rd man/xdim.Rd man/xy.Rd man/xySpec.Rd man/ydim-MassImage-method.Rd man/ydim-PCA-method.Rd man/ydim-set.Rd man/ydim.Rd man/zdim-MassSpectra-method.Rd man/zdim.Rd
tests/testthat.R tests/testthat/test_MassImage.R tests/testthat/test_MassSpectra.R tests/testthat/test_PCA.R tests/testthat/test_import.R

Questions? Problems? Suggestions? or email at

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

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