Open jorainer opened 3 years ago
Instead of looking at individual samples we could also aggregate MS1 spectra per sample source:
ft_sps$source <- pData(data)$source[ft_sps$fromFile]
## Combine spectra per source, keeping only peaks present in 50%
ft_sps_agg <- combineSpectra(ft_sps, f = ft_sps$source, p = ft_sps$source,
peaks = "intersect", minProp = 0.2, ppm = 10,
intensityFun = median, mzFun = median)
par(mfrow = c(2, 3))
mze <- rowData(std_res)[ft, "mzmed"]
plotSpectra(ft_sps_agg[1])
legend("topright", legend = ft_sps_agg$source[1])
grid()
abline(v = mze, lty = 3, col = "#ff000060", lwd = 2)
plotSpectra(ft_sps_agg[2])
legend("topright", legend = ft_sps_agg$source[2])
grid()
abline(v = mze, lty = 3, col = "#ff000060", lwd = 2)
plotSpectra(ft_sps_agg[3])
legend("topright", legend = ft_sps_agg$source[3])
grid()
abline(v = mze, lty = 3, col = "#ff000060", lwd = 2)
tmp <- filterMzRange(ft_sps_agg, mz = mze + c(-50, 50))
plotSpectra(tmp[1])
legend("topright", legend = tmp$source[1])
grid()
abline(v = mze, lty = 3, col = "#ff000060", lwd = 2)
plotSpectra(tmp[2])
legend("topright", legend = tmp$source[2])
grid()
abline(v = mze, lty = 3, col = "#ff000060", lwd = 2)
plotSpectra(tmp[3])
legend("topright", legend = tmp$source[3])
grid()
abline(v = mze, lty = 3, col = "#ff000060", lwd = 2)
The goal is to extract for a feature the (full) MS1 spectrum at the features' (peaks') apex position:
Left is for a plasma sample, right for a capillary sample. In addition, I just created the same plot labeling peaks which m/z would match an adduct of Cystine (just to cross-check that not a differet ion would be created in capillary samples.