Matching spectra to peptides with protViz can be done by using the following steps:
- Load in the libraries and the MS data:
library(mzR)
library(protViz)
mzml_file <- file.path(getwd(), "datasets", "ch6", "MM8.mzML")
ms <- openMSfile(mzml_file)
- Extract the peaks and retention time from the spectrum:
p <- peaks(ms,2)
spec <- list(mZ = p[,1], intensity = p[,2])
- Create a plot of theoretical versus observed ion masses:
m <- psm("PEPTIDESEQ", spec, plot=TRUE)