Nothing
## Load package
library("SPUTNIK")
## Mass spectrometry intensity matrix
X <- matrix(rnorm(16000), 400, 40)
X[X < 0] <- 0
## Print original dimensions
print(dim(X))
## m/z vector
mzVector <- seq(600, 900, by = (900 - 600) / 39)
## Read the image size
imSize <- c(20, 20)
## Construct the ms.dataset object
msiX <- msiDataset(X, mzVector, imSize[1], imSize[2])
## Extract the ROI using k-means
refImg <- refImageContinuous(msiX, method = "sum")
roiImg <- refImageBinaryOtsu(refImg)
## Perform count pixels filtering
count.sel <- countPixelsFilter(
msiData = msiX, roiImage = roiImg,
minNumPixels = 4, aggressive = 1
)
## Apply the filter
msiX <- applyPeaksFilter(msiX, count.sel)
## Print new dimensions
print(dim(getIntensityMat(msiX)))
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.