Dear all,
I have difficulty on how to increase the number of reference peaks (or global peaklist) during data processing.
Below is my demo code:
ref <- mse_mean %>%
peakPick(method="mad", SNR=3) %>%
peakAlign(tolerance = 15, units = "ppm") %>%
process()
mse_mean is the mean spectrum across all spectra of the MSI dataset.
I found out that some of my targeted mass features were missing after peakAlignment. For instance, you see that after peak peaking and alignment, the peak m/z 511 is dropped in the MSI data. I have tested on several different MSI datasetS, I always see some peaks with low intensities are missing.
I have tried to decrease the SNR in peakPick() function and played with the parameters in peakAlign() function, but I did not see much improvements.
I guess it might due to the peakAlign() function, because it uses summarize() to calculate the mean spectrum, and then uses the local maxima of the mean spectrum as the reference. Such calculation is strict, which leads to the dropping of many minor peaks.
Is there a way (or parameters) that could help to increase the number of reference peaks?
Thanks a lot for your help.
Yonghui
My session info:
--------------------------------------------------------------------------------------------------------------------------
R version 4.3.1 (2023-06-16)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.2.1
attached base packages:
[1] stats4 stats graphics grDevices utils datasets methods base
other attached packages:
[1] Cardinal_3.3.3 S4Vectors_0.38.1 EBImage_4.42.0 BiocParallel_1.34.2 BiocGenerics_0.46.0 ProtGenerics_1.32.0
loaded via a namespace (and not attached):
[1] Matrix_1.6-1 matter_2.3.18 compiler_4.3.1 Biobase_2.60.0 bitops_1.0-7 parallel_4.3.1 signal_0.7-7 png_0.1-8
[9] yaml_2.3.7 fastmap_1.1.1 lattice_0.21-8 biglm_0.9-2.1 knitr_1.43 htmlwidgets_1.6.2 MASS_7.3-60 snow_0.4-4
[17] fftwtools_0.9-11 DBI_1.1.3 tiff_0.1-11 rlang_1.1.1 sp_2.0-0 xfun_0.40 viridisLite_0.4.2 cli_3.6.1
[25] magrittr_2.0.3 digest_0.6.33 grid_4.3.1 locfit_1.5-9.8 rstudioapi_0.15.0 irlba_2.3.5.1 mclust_6.0.0 nlme_3.1-163
[33] evaluate_0.21 codetools_0.2-19 abind_1.4-5 RCurl_1.98-1.12 rmarkdown_2.24 jpeg_0.1-10 tools_4.3.1 htmltools_0.5.6