summaryPeaks.Rd
This function generates a numerical summary of a collection of MassPeaks
objects.
summaryPeaks(x, digits = 4)
A list of MassPeaks
objects.
Integer indicating the number of decimal places to be used.
For each MassPeaks
on the list this function provides summary statistics of m/z points, peak intensities and SNR thresholds (number, minimum, mean, standard deviation, median, mean absolute deviation, maximum).
A data.frame
containing summary information of a collection of MassPeaks
objects.
# Load example data
data(spectra) # list of MassSpectra class objects
data(type) # metadata
# Some pre-processing
sc.results <- screenSpectra(spectra, meta = type)
spectra <- sc.results$fspectra
type <- sc.results$fmeta
spectra <- transformIntensity(spectra, method = "sqrt")
spectra <- wavSmoothing(spectra)
spectra <- removeBaseline(spectra)
peaks <- detectPeaks(spectra)
names(peaks) <- type$SpectID # spectra IDs are lost after removeBaseline()
# Summary of peak profile features (results for positions 10 to 20)
summaryPeaks(peaks[10:20])
#> ID No.MZ Min.MZ Max.MZ Min.Int Mean.Int Std.Int Med.Int MAD.Int
#> 1 160408G06 25 2834.57 12167.88 10.1779 27.3379 17.6861 21.1730 12.9465
#> 2 160408G07 19 2834.57 12167.88 8.3725 23.1203 13.6596 17.7690 13.1782
#> 3 160408G08 19 2834.57 12175.49 10.1483 28.3133 15.3523 24.1606 17.0451
#> 4 160408G09 18 2834.57 12167.88 9.9418 29.9900 17.0055 24.3406 16.5871
#> 5 160408G10 19 2834.57 12175.49 10.9176 28.9324 15.7531 21.7868 15.4181
#> 6 160408G11 18 2834.57 10501.83 11.7741 32.9878 17.8556 28.5041 21.2635
#> 7 160408G12 24 2834.57 12167.88 9.7599 25.0616 15.9624 19.2399 10.8809
#> 8 160408G13 20 2834.57 12175.49 13.9097 35.5773 20.0135 27.5291 16.1602
#> 9 160408G14 18 2834.57 10501.83 12.5719 33.8331 17.6925 31.2924 19.5188
#> 10 160408G15 25 2834.57 12167.88 9.5950 28.3869 18.4977 21.3400 13.5232
#> 11 160408G16 17 2834.57 12167.88 12.5272 33.9390 16.9636 30.9689 18.5275
#> Max.Int Min.SNR Mean.SNR Std.SNR Med.SNR MAD.SNR Max.SNR
#> 1 70.7444 2.0947 5.6264 3.6400 4.3576 2.6645 14.5599
#> 2 48.6307 2.1401 5.9098 3.4916 4.5420 3.3685 12.4307
#> 3 60.5929 2.0128 5.6157 3.0450 4.7920 3.3807 12.0180
#> 4 63.1512 2.0330 6.1326 3.4774 4.9774 3.3919 12.9137
#> 5 64.3077 2.0329 5.3873 2.9333 4.0568 2.8709 11.9744
#> 6 69.8553 2.2101 6.1921 3.3517 5.3505 3.9913 13.1125
#> 7 60.6308 2.1478 5.5151 3.5127 4.2340 2.3945 13.3425
#> 8 81.1536 2.1049 5.3837 3.0285 4.1658 2.4454 12.2805
#> 9 72.6329 2.1335 5.7417 3.0025 5.3105 3.3125 12.3263
#> 10 75.9089 2.0181 5.9706 3.8906 4.4884 2.8443 15.9658
#> 11 72.2888 2.2443 6.0802 3.0391 5.5481 3.3192 12.9506