Get spectra of peaks from metIdentifyClass object. [Maturing]

getMS2spectrum2Object(object, peak.name)

Arguments

object

metIdentifyClass.

peak.name

Peak name.

Value

A MS2 spectrum.

See also

The example and demo data of this function can be found https://jaspershen.github.io/metID/articles/metID.html

Author

Xiaotao Shen shenxt1990@163.com

Examples

data("annotate_result", package = "metID")
peak_name <- which_has_identification(annotate_result)
getMS2spectrum2Object(annotate_result, peak_name[1,1])
#> `getMS2spectrum2Object()` is deprecated, use `get_ms2_spectrum_from_object()`.
#>              mz  intensity
#>  [1,]  81.38455   1396.341
#>  [2,]  82.19755   1488.730
#>  [3,]  85.02840  15473.604
#>  [4,]  86.59349   1740.842
#>  [5,]  86.98958   2158.014
#>  [6,]  89.48135   1351.686
#>  [7,]  90.70250   1547.099
#>  [8,]  93.03886   1325.864
#>  [9,] 102.09140  22441.047
#> [10,] 103.03903  76217.016
#> [11,] 116.01658  17809.395
#> [12,] 127.98412   1439.743
#> [13,] 134.06819   1729.786
#> [14,] 152.46967   1543.765
#> [15,] 162.02180   2228.743
#> [16,] 162.05521   3508.225
#> [17,] 162.11261 529120.000