## simulate a peptide with 0.368 to 100 percent incorporation and plot
dn <- IsotopicDistributionN("NECFLQHK", incorp = 0.00368)
dn$t <- "incorp = 0.368%"
d50 <- IsotopicDistributionN("NECFLQHK", incorp = 0.5)
d50$t <- "incorp = 50%"
d99 <- IsotopicDistributionN("NECFLQHK", incorp = 0.99)
d99$t <- "incorp = 99%"
x <- rbind(dn, d50, d99)
library(lattice)
xyplot(percent ~ mz | t, data = x,
type = "h",
xlab = "m/z",
ylab = "intensity (%)",
main = "Isotopic distribution of peptide NECFLQHK with
varying nitrogen-15 incorporation")
if (FALSE) {
## simulate peptide DVFLGMFLYPYAR with oxidized methionine
IsotopicDistributionN("DVFLGmFLYPYAR", incorp = 0.5,
custom = list(code = "m",
elements = c(C=5, H=9, N=1, O=2, S=1)))
}
Run the code above in your browser using DataLab