Read MS2 files

read_ms2(files)

Arguments

files

a character vector of file names or directory containing ms2 files

Value

data frame with 6 columns: file name, scan_idx, precursor mz, rt, fragment mz and fragment intensity.

Examples

ms2_file <- system.file("extdata", "ms2file.ms2", package = "lipID") ms2_data <- read_ms2(ms2_file) head(ms2_data)
#> ms2_file s_idx precursor ms2_rt ms2_mz ms2_intensity #> 1 ms2file 1 689.5697 27.81008 56.04944 667.1967 #> 2 ms2file 1 689.5697 27.81008 60.08085 6576.3150 #> 3 ms2file 1 689.5697 27.81008 71.07317 2527.9860 #> 4 ms2file 1 689.5697 27.81008 80.97377 634.7454 #> 5 ms2file 1 689.5697 27.81008 86.09619 29114.8500 #> 6 ms2file 1 689.5697 27.81008 87.09885 587.8085