The readSRMData
function reads MRM/SRM data from provided mzML files and
returns the results as a MChromatograms()
object.
Value
A MChromatograms()
object. See details above for more information.
Details
readSRMData
supports reading chromatogram entries from mzML files. If
multiple files are provided the same precursor and product m/z for SRM/MRM
chromatograms are expected across files. The number of columns of the
resulting MChromatograms()
object corresponds to the number of files. Each
row in the MChromatograms
object is supposed to contain chromatograms
with same polarity, precursor and product m/z. If chromatograms with
redundant polarity, precursor and product m/z values and precursor collision
energies are found, they are placed into multiple consecutive rows in the
MChromatograms
object.
Note
readSRMData
reads only SRM/MRM chromatogram data, i.e. chromatogram data
from mzML files with precursorIsolationWindowTargetMZ
and
productIsolationWindowTargetMZ
attributes. Total ion chromatogram data is
hence not extracted.
The number of features and hence rows of the resulting MChromatograms
object depends on the total list of unique precursor and product m/z
isolation windows (and precursor collision energies) found across all input
files. In cases in which not each file has chromatgraphic data for the same
polarity, precursor m/z, product m/z and collision energy,
an empty Chromatogram()
object is reported for the specific precursor
and product m/z combination of the respective file (and a warning is
thrown).
Examples
## Read an example MRM/SRM data
library(msdata)
fl <- proteomics(full.names = TRUE, pattern = "MRM")
## Read the data
mrm <- readSRMData(fl)
#> Warning: file MRM-standmix-5.mzML.gz contains multiple chromatograms with identical polarity, precursor and product m/z values
## The data is represented as a MChromatograms object, each column
## containing the data from one input file
mrm
#> MChromatograms with 137 rows and 1 column
#> 1
#> <Chromatogram>
#> [1,] length: 523
#> [2,] length: 523
#> ... ...
#> [136,] length: 962
#> [137,] length: 962
#> phenoData with 1 variables
#> featureData with 10 variables
## Access the polarity for each chromatogram (row)
polarity(mrm)
#> [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#> [38] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#> [75] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#> [112] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## Access the precursor m/z. The result is returned as a matrix with
## columns representing the minimum and maximum m/z (will be identical in
## most cases).
precursorMz(mrm)
#> mzmin mzmax
#> [1,] 115.0 115.0
#> [2,] 115.0 115.0
#> [3,] 117.0 117.0
#> [4,] 117.0 117.0
#> [5,] 133.0 133.0
#> [6,] 133.0 133.0
#> [7,] 134.0 134.0
#> [8,] 134.0 134.0
#> [9,] 135.0 135.0
#> [10,] 135.0 135.0
#> [11,] 138.9 138.9
#> [12,] 138.9 138.9
#> [13,] 145.0 145.0
#> [14,] 145.0 145.0
#> [15,] 145.1 145.1
#> [16,] 145.1 145.1
#> [17,] 146.0 146.0
#> [18,] 146.0 146.0
#> [19,] 148.0 148.0
#> [20,] 148.0 148.0
#> [21,] 151.0 151.0
#> [22,] 151.0 151.0
#> [23,] 160.1 160.1
#> [24,] 160.1 160.1
#> [25,] 166.9 166.9
#> [26,] 166.9 166.9
#> [27,] 167.0 167.0
#> [28,] 167.0 167.0
#> [29,] 167.0 167.0
#> [30,] 168.9 168.9
#> [31,] 168.9 168.9
#> [32,] 168.9 168.9
#> [33,] 173.1 173.1
#> [34,] 173.1 173.1
#> [35,] 180.1 180.1
#> [36,] 180.1 180.1
#> [37,] 180.1 180.1
#> [38,] 184.9 184.9
#> [39,] 184.9 184.9
#> [40,] 184.9 184.9
#> [41,] 188.1 188.1
#> [42,] 188.1 188.1
#> [43,] 191.0 191.0
#> [44,] 191.0 191.0
#> [45,] 191.0 191.0
#> [46,] 199.9 199.9
#> [47,] 199.9 199.9
#> [48,] 199.9 199.9
#> [49,] 201.0 201.0
#> [50,] 203.1 203.1
#> [51,] 203.1 203.1
#> [52,] 229.0 229.0
#> [53,] 229.0 229.0
#> [54,] 229.0 229.0
#> [55,] 242.1 242.1
#> [56,] 242.1 242.1
#> [57,] 243.1 243.1
#> [58,] 243.1 243.1
#> [59,] 259.0 259.0
#> [60,] 259.0 259.0
#> [61,] 266.1 266.1
#> [62,] 266.1 266.1
#> [63,] 267.1 267.1
#> [64,] 267.1 267.1
#> [65,] 275.1 275.1
#> [66,] 275.1 275.1
#> [67,] 275.1 275.1
#> [68,] 282.1 282.1
#> [69,] 282.1 282.1
#> [70,] 322.0 322.0
#> [71,] 322.0 322.0
#> [72,] 323.0 323.0
#> [73,] 323.0 323.0
#> [74,] 323.0 323.0
#> [75,] 338.9 338.9
#> [76,] 338.9 338.9
#> [77,] 338.9 338.9
#> [78,] 346.1 346.1
#> [79,] 346.1 346.1
#> [80,] 346.1 346.1
#> [81,] 347.0 347.0
#> [82,] 347.0 347.0
#> [83,] 347.0 347.0
#> [84,] 362.1 362.1
#> [85,] 362.1 362.1
#> [86,] 362.1 362.1
#> [87,] 388.9 388.9
#> [88,] 388.9 388.9
#> [89,] 388.9 388.9
#> [90,] 402.0 402.0
#> [91,] 402.0 402.0
#> [92,] 402.0 402.0
#> [93,] 402.9 402.9
#> [94,] 402.9 402.9
#> [95,] 402.9 402.9
#> [96,] 426.0 426.0
#> [97,] 426.0 426.0
#> [98,] 426.0 426.0
#> [99,] 442.0 442.0
#> [100,] 442.0 442.0
#> [101,] 442.0 442.0
#> [102,] 481.9 481.9
#> [103,] 481.9 481.9
#> [104,] 481.9 481.9
#> [105,] 482.9 482.9
#> [106,] 482.9 482.9
#> [107,] 482.9 482.9
#> [108,] 505.9 505.9
#> [109,] 505.9 505.9
#> [110,] 505.9 505.9
#> [111,] 521.9 521.9
#> [112,] 521.9 521.9
#> [113,] 521.9 521.9
#> [114,] 565.1 565.1
#> [115,] 565.1 565.1
#> [116,] 565.1 565.1
#> [117,] 604.1 604.1
#> [118,] 604.1 604.1
#> [119,] 604.1 604.1
#> [120,] 606.1 606.1
#> [121,] 606.1 606.1
#> [122,] 606.1 606.1
#> [123,] 611.1 611.1
#> [124,] 611.1 611.1
#> [125,] 611.1 611.1
#> [126,] 662.1 662.1
#> [127,] 662.1 662.1
#> [128,] 662.1 662.1
#> [129,] 664.1 664.1
#> [130,] 664.1 664.1
#> [131,] 664.1 664.1
#> [132,] 742.1 742.1
#> [133,] 742.1 742.1
#> [134,] 808.1 808.1
#> [135,] 808.1 808.1
#> [136,] 89.0 89.0
#> [137,] 89.0 89.0
## Access the product m/z.
productMz(mrm)
#> mzmin mzmax
#> [1,] 26.996 26.996
#> [2,] 70.996 70.996
#> [3,] 72.996 72.996
#> [4,] 98.996 98.996
#> [5,] 114.996 114.996
#> [6,] 70.996 70.996
#> [7,] 106.996 106.996
#> [8,] 91.996 91.996
#> [9,] 64.996 64.996
#> [10,] 91.996 91.996
#> [11,] 79.896 79.896
#> [12,] 94.896 94.896
#> [13,] 100.996 100.996
#> [14,] 56.996 56.996
#> [15,] 108.996 108.996
#> [16,] 127.096 127.096
#> [17,] 102.096 102.096
#> [18,] 127.996 127.996
#> [19,] 31.996 31.996
#> [20,] 46.996 46.996
#> [21,] 107.996 107.996
#> [22,] 41.896 41.896
#> [23,] 116.096 116.096
#> [24,] 142.096 142.096
#> [25,] 62.896 62.896
#> [26,] 78.896 78.896
#> [27,] 123.996 123.996
#> [28,] 41.896 41.896
#> [29,] 95.996 95.996
#> [30,] 150.896 150.896
#> [31,] 78.896 78.896
#> [32,] 96.896 96.896
#> [33,] 131.096 131.096
#> [34,] 156.096 156.096
#> [35,] 119.096 119.096
#> [36,] 162.996 162.996
#> [37,] 162.996 162.996
#> [38,] 167.096 167.096
#> [39,] 78.896 78.896
#> [40,] 96.896 96.896
#> [41,] 102.096 102.096
#> [42,] 127.996 127.996
#> [43,] 110.996 110.996
#> [44,] 172.996 172.996
#> [45,] 86.996 86.996
#> [46,] 135.996 135.996
#> [47,] 73.996 73.996
#> [48,] 80.896 80.896
#> [49,] 88.996 88.996
#> [50,] 116.096 116.096
#> [51,] 142.096 142.096
#> [52,] 138.896 138.896
#> [53,] 78.896 78.896
#> [54,] 96.896 96.896
#> [55,] 108.996 108.996
#> [56,] 41.996 41.996
#> [57,] 109.996 109.996
#> [58,] 199.996 199.996
#> [59,] 138.896 138.896
#> [60,] 78.896 78.896
#> [61,] 106.996 106.996
#> [62,] 134.096 134.096
#> [63,] 107.996 107.996
#> [64,] 134.996 134.996
#> [65,] 145.096 145.096
#> [66,] 196.096 196.096
#> [67,] 257.096 257.096
#> [68,] 132.996 132.996
#> [69,] 149.996 149.996
#> [70,] 78.896 78.896
#> [71,] 96.896 96.896
#> [72,] 110.996 110.996
#> [73,] 78.896 78.896
#> [74,] 96.896 96.896
#> [75,] 240.996 240.996
#> [76,] 78.896 78.896
#> [77,] 96.896 96.896
#> [78,] 134.096 134.096
#> [79,] 78.896 78.896
#> [80,] 96.896 96.896
#> [81,] 134.996 134.996
#> [82,] 78.896 78.896
#> [83,] 96.896 96.896
#> [84,] 132.996 132.996
#> [85,] 210.996 210.996
#> [86,] 78.896 78.896
#> [87,] 176.896 176.896
#> [88,] 290.896 290.896
#> [89,] 78.896 78.896
#> [90,] 158.896 158.896
#> [91,] 383.996 383.996
#> [92,] 78.896 78.896
#> [93,] 110.996 110.996
#> [94,] 158.896 158.896
#> [95,] 78.896 78.896
#> [96,] 134.096 134.096
#> [97,] 158.896 158.896
#> [98,] 78.896 78.896
#> [99,] 149.996 149.996
#> [100,] 158.896 158.896
#> [101,] 78.896 78.896
#> [102,] 158.896 158.896
#> [103,] 383.996 383.996
#> [104,] 78.896 78.896
#> [105,] 158.896 158.896
#> [106,] 384.096 384.096
#> [107,] 78.896 78.896
#> [108,] 158.896 158.896
#> [109,] 407.996 407.996
#> [110,] 78.896 78.896
#> [111,] 158.896 158.896
#> [112,] 423.996 423.996
#> [113,] 78.896 78.896
#> [114,] 158.896 158.896
#> [115,] 322.996 322.996
#> [116,] 78.896 78.896
#> [117,] 158.896 158.896
#> [118,] 423.996 423.996
#> [119,] 78.896 78.896
#> [120,] 158.896 158.896
#> [121,] 272.896 272.896
#> [122,] 78.896 78.896
#> [123,] 142.996 142.996
#> [124,] 272.096 272.096
#> [125,] 306.096 306.096
#> [126,] 158.896 158.896
#> [127,] 540.096 540.096
#> [128,] 78.896 78.896
#> [129,] 396.996 396.996
#> [130,] 407.996 407.996
#> [131,] 78.896 78.896
#> [132,] 407.996 407.996
#> [133,] 619.996 619.996
#> [134,] 407.996 407.996
#> [135,] 78.896 78.896
#> [136,] 40.996 40.996
#> [137,] 42.996 42.996
## Plot one chromatogram
plot(mrm[1, ])