Learn R Programming

SPUTNIK: an R package for peak selection of Mass spectrometry imaging data

If you find SPUTNIK useful, please consider citing our work :)

Inglese, P., Correia, G., Takats, Z., Nicholson, J. K. & Glen, R. C. (2018). SPUTNIK: an R package for filtering of spatially related peaks in mass spectrometry imaging data. Bioinformatics (Oxford, England)

Description

SPUTNIK is an R package consisting of a series of tools to filter mass spectrometry imaging peaks characterized by a noisy or unlikely spatial distribution. SPUTNIK can produce mass spectrometry imaging datasets characterized by a smaller but more informative set of peaks, reduce the complexity of subsequent multi-variate analysis and increase the interpretability of the statistical results.

Contact

Install from CRAN

To install the CRAN package, run the command:

install.packages("SPUTNIK")

Install from source

To install it, run the command:

devtools::install_git("https://github.com/paoloinglese/SPUTNIK.git")

Example SPUTNIK workflow on MALDI mass spectrometry imaging data

https://paoloinglese.github.io/SPUTNIK/

Example data

Two mass spectrometry imaging datasets in RData format are available in a separate repository:

https://github.com/paoloinglese/SPUTNIKexamples

Copy Link

Version

Install

install.packages('SPUTNIK')

Monthly Downloads

341

Version

1.4.3

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Paolo Inglese

Last Published

June 23rd, 2025

Functions in SPUTNIK (1.4.3)

createPeaksFilter

Generate a peak filter object.
getIntensityMat,msi.dataset-method

Return the peaks intensity matrix.
numDetectedMSI,msi.dataset-method

Generates an msImage representing the number of detected peaks per pixel. This image can be used to qualitatively evaluate the spatial heterogeneity of the sample.
msi.dataset-class

msi.dataset-class S4 class definition containing the information about the mass spectrometry imaging dataset.
msImage

Constructor for ms.image-class objects.
getMZ,msi.dataset-method

Return the m/z vector.
refImageBinaryOtsu

Calculate the binary reference image using Otsu's thresholding.
refImageBinaryKmeansMulti

Calculate the binary reference image using k-means clustering with multi-cluster merging. K-means is run on the first `npcs` principal components to speed up the calculations.
getShapeMSI,msi.dataset-method

Returns the geometrical shape of MSI dataset
closeImage,ms.image-method

Apply morphological closing to binary image.
refImageBinarySVM

Calculate the binary reference image using linear SVM trained on manually selected pixels.
splitPeaksFilter

Test for the presence of split peaks.
totalIonCountMSI,msi.dataset-method

Generates an msImage representing pixels total-ion-counts. This image can be used to qualitatively evaluate the spatial heterogeneity of the sample.
countPixelsFilter

Filter based on the minimum number of connected pixels in the ROI.
invertImage,ms.image-method

Invert the colors of an MS image.
ovarianDESIDoria2016

Load the example DESI-MSI data.
spatial.chaos

Spatial chaos measure.
smoothImage,ms.image-method

Apply Gaussian smoothing to an MS image.
globalPeaksFilter

Reference similarity based peak selection.
gini.index

Gini index.
varTransform,msi.dataset-method

Variance stabilizing transformation.
refImageContinuous

refImageContinuous returns the reference image, calculated using the method. This image represents the basic measure for the filters in SPUTNIK.
refImageBinaryKmeans

Calculate the binary reference image using k-means clustering. K-Means is run on the first `npcs` principal components to speed up the calculations.
plot,ms.image,missing-method

Visualize an MS image. plot extends the generic function to ms.image-class objects.
removeSmallObjects,ms.image-method

Remove binary ROI objects smaller than user-defined number of pixels
msiDataset

Constructor for msi.dataset-class objects.
ms.image-class

ms.image-class definition.
normIntensity,msi.dataset-method

Normalize the peaks intensities.
scatter.ratio

Pixel scatteredness ratio.
CSRPeaksFilter

Performs the peak selection based on complete spatial randomness test.
binOtsu,ms.image-method

Binarize MS image using Otsu's thresholding.
binKmeans2,msi.dataset-method

Return a binary mask generated applying k-means clustering on peaks intensities. A finer segmentation is obtained by using a larger number of clusters than 2. The off-sample clusters are merged looking at the most frequent labels in the image corners. The lookup areas are defined by the kernel size.
bladderMALDIRompp2010

Load the example MALDI-MSI data.
PCAImage,msi.dataset-method

Generates an RGB msImage representing the first 3 principal components. This image can be used to qualitatively evaluate the spatial heterogeneity of the sample.
binSupervised,msi.dataset-method

Return a binary mask generated applying a supervised classifier on peaks intensities using manually selected regions corresponding to off-sample and sample-related areas.
NMI

Normalized mutual information (NMI).
applyPeaksFilter,msi.dataset-method

Apply the results of a peaks filter.
binKmeans,msi.dataset-method

Return a binary mask generated applying k-means clustering on first 10 principal components of peaks intensities.
SSIM

Structural similarity index (SSIM).