fgcz / rawDiag

Brings Orbitrap mass spectrometry data to life; multi-platform, fast and colorful R package
https://bioconductor.org/packages/rawDiag
36 stars 11 forks source link

read.raw output #55

Closed viviantra closed 4 years ago

viviantra commented 4 years ago

Hi, I have a question about read.raw.

I was able to install the package. However, I am not sure if I have got the expected information from read.raw function. Can someone verify my output is correct? What I don't understand is: why am I only getting length of 573? More specifically, I would expect more than one entry in each ScanNumber. For example, there are in reality multiple ions in scan#1 (full scan), but there is only Row #1 corresponding to scanNumber == "1", with mass 445.1181.

(rawfile <- file.path(path.package(package = 'rawDiag'), 'extdata', 'sample.raw')) system.time(RAW <- read.raw(file = rawfile)) dim(RAW) summary(RAW)

My output:

dim(RAW) [1] 573 21 summary(RAW) filename scanNumber StartTime BasePeakMass BasePeakIntensity TIC
Length:573 Min. : 1 Min. :0.00162 Min. :216.1 Min. : 4768 Min. : 23224 Class :character 1st Qu.:144 1st Qu.:0.19741 1st Qu.:216.4 1st Qu.: 10296 1st Qu.: 51955 Mode :character Median :287 Median :0.39117 Median :303.5 Median : 22549 Median : 80879 Mean :287 Mean :0.39184 Mean :296.3 Mean : 352735 Mean : 4032142 3rd Qu.:430 3rd Qu.:0.58665 3rd Qu.:303.5 3rd Qu.: 35850 3rd Qu.: 162624 Max. :573 Max. :0.78011 Max. :696.0 Max. :16794288 Max. :97975704

ScanType CycleNumber MSOrder MassAnalyzer PrecursorMass AGC
Length:573 Min. : 0.00 Length:573 Length:573 Min. : 487.3 Length:573
Class :character 1st Qu.: 6.00 Class :character Class :character 1st Qu.: 582.3 Class :character Mode :character Median :13.00 Mode :character Mode :character Median : 669.8 Mode :character Mean :12.52 Mean : 663.3
3rd Qu.:19.00 3rd Qu.: 722.3
Max. :26.00 Max. :1075.0

ChargeState IonInjectionTimems FTResolution LMCorrection PrescanMode MasterScanNumber ElapsedScanTimesec Min. :0.000 Min. :39.04 Min. : 30000 Min. :0 Min. :-21.0 Min. : 1 Min. :0.06875
1st Qu.:2.000 1st Qu.:55.00 1st Qu.: 30000 1st Qu.:0 1st Qu.:-16.0 1st Qu.:133 1st Qu.:0.06912
Median :2.000 Median :55.00 Median : 30000 Median :0 Median :-10.0 Median :276 Median :0.06925
Mean :1.997 Mean :54.76 Mean : 34241 Mean :0 Mean :-10.3 Mean :276 Mean :0.08166
3rd Qu.:2.000 3rd Qu.:55.00 3rd Qu.: 30000 3rd Qu.:0 3rd Qu.: -4.0 3rd Qu.:419 3rd Qu.:0.06938
Max. :3.000 Max. :55.00 Max. :120000 Max. :0 Max. : 1.0 Max. :551 Max. :0.25319
NA's :27 NA's :1
AGCMode transient
Mode:logical Min. : 64.00 NA's:573 1st Qu.: 64.00 Median : 64.00 Mean : 73.05 3rd Qu.: 64.00 Max. :256.00

tobiasko commented 4 years ago

Hi Vivian,

the test data of the package only contains 573 scans. Please check by using Thermo QualBrowser or Freestyle. The raw file is located in a subfolder of the package. To locate the package folder use:

> file.path(path.package(package = 'rawDiag'))
[1] "/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rawDiag"

Go to the package folder and change to the extdata subfolder. You will find sample.raw.

read.raw() will return a data.frame including one row for each scan. The columns are descriptive variables describing properties of each scan. We like to refer to these attributes as scan-level metadata. read_raw() does not return peak lists as you suspected! The atrributes are pre-filtered. If you want to see the full range of attributes as set by Thermo use:

> str(read.raw(rawfile, rawDiag = FALSE))
executing mono /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rawDiag/exec/fgcz_raw.exe /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rawDiag/extdata/sample.raw qc ...
Classes ‘rawDiag’ and 'data.frame': 573 obs. of  82 variables:
 $ filename              : chr  "sample.raw" "sample.raw" "sample.raw" "sample.raw" ...
 $ scanNumber            : int  1 2 3 4 5 6 7 8 9 10 ...
 $ ScanEventNumber       : int  0 1 1 1 1 1 1 1 1 1 ...
 $ StartTime             : num  0.00162 0.00584 0.00699 0.00815 0.0093 ...
 $ BasePeakMass          : num  445 303 303 216 303 ...
 $ BasePeakIntensity     : num  5979308 9080 9849 28202 7352 ...
 $ TIC                   : num  78725448 41041 53557 188951 57692 ...
 $ ScanType              : chr  "FTMS + c NSI Full ms [350.0000-1800.0000]" "FTMS + c NSI Full ms2 487.2567@hcd28.00 [140.0000-1015.0000]" "FTMS + c NSI Full ms2 644.8226@hcd28.00 [140.0000-1335.0000]" "FTMS + c NSI Full ms2 683.8279@hcd28.00 [140.0000-1415.0000]" ...
 $ CycleNumber           : int  0 0 0 0 0 0 0 0 0 0 ...
 $ Frequency             : int  0 0 0 0 0 0 0 0 0 0 ...
 $ HighMass              : int  1800 1015 1335 1415 1135 1385 1415 1445 1500 1290 ...
 $ IonizationMode        : chr  "NanoSpray" "NanoSpray" "NanoSpray" "NanoSpray" ...
 $ MSOrder               : chr  "Ms" "Ms2" "Ms2" "Ms2" ...
 $ MassAnalyzer          : chr  "MassAnalyzerFTMS" "MassAnalyzerFTMS" "MassAnalyzerFTMS" "MassAnalyzerFTMS" ...
 $ Detector              : chr  "Any" "Any" "Any" "Any" ...
 $ Lock                  : chr  "Any" "Any" "Any" "Any" ...
 $ PrecursorMass         : num  1075 487 645 684 547 ...
 $ LastPrecursorMass     : int  1800 0 0 0 0 0 0 0 0 0 ...
 $ CollisionEnergy       : int  0 28 28 28 28 28 28 28 28 28 ...
 $ IsolationWidth        : num  1450 1.4 1.4 1.4 1.4 ...
 $ MultipleInjection     : chr  "ii" "h" "h" "h" ...
 $ MultiInjectInfo       : chr  "IT=28;28" "IT=55" "IT=55" "IT=55" ...
 $ AGC                   : chr  "On" "On" "On" "On" ...
 $ MicroScanCount        : int  1 1 1 1 1 1 1 1 1 1 ...
 $ ScanSegment           : int  1 1 1 1 1 1 1 1 1 1 ...
 $ ScanEvent             : int  1 2 2 2 2 2 2 2 2 2 ...
 $ MasterIndex           : int  0 0 0 0 0 0 0 0 0 0 ...
 $ ChargeState           : int  0 2 2 2 2 2 2 2 2 2 ...
 $ MonoisotopicmZ        : num  0 0 0 0 0 0 0 0 0 0 ...
 $ IonInjectionTimems    : num  55 55 55 55 55 55 55 55 55 55 ...
 $ MaxIonTimems          : num  55 55 55 55 55 55 55 55 55 55 ...
 $ FTResolution          : int  120000 30000 30000 30000 30000 30000 30000 30000 30000 30000 ...
 $ MS2IsolationWidth     : num  1450 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 1.4 ...
 $ MS2IsolationOffset    : num  0 0 0 0 0 0 0 0 0 0 ...
 $ AGCTarget             : int  3000000 100000 100000 100000 100000 100000 100000 100000 100000 100000 ...
 $ HCDEnergy             : num  NA 28 28 28 28 28 28 28 28 28 ...
 $ AnalyzerTemperature   : num  27.1 27.1 27.1 27.1 27.1 ...
 $ MassCalibration       : logi  NA NA NA NA NA NA ...
 $ ConversionParameterB  : num  2.12e+08 2.12e+08 2.12e+08 2.12e+08 2.12e+08 ...
 $ ConversionParameterC  : num  -41163068 -41163399 -41163399 -41163397 -41163399 ...
 $ TemperatureCompppm    : num  -2.35 -2.35 -2.35 -2.35 -2.35 -2.35 -2.35 -2.35 -2.35 -2.35 ...
 $ RFCompppm             : num  -0.09 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 ...
 $ SpaceChargeCompppm    : num  -2.3 -0.01 -0.01 -0.02 -0.01 -0.04 -0.02 -0.01 -0.02 -0.01 ...
 $ ResolutionCompppm     : num  0.57 0.19 0.19 0.19 0.19 0.19 0.19 0.19 0.19 0.19 ...
 $ NumberofLockMasses    : int  0 0 0 0 0 0 0 0 0 0 ...
 $ LockMass1mZ           : num  0 0 0 0 0 0 0 0 0 0 ...
 $ LockMass2mZ           : num  0 0 0 0 0 0 0 0 0 0 ...
 $ LockMass3mZ           : num  0 0 0 0 0 0 0 0 0 0 ...
 $ LMSearchWindowppm     : num  0 0 0 0 0 0 0 0 0 0 ...
 $ LMSearchWindowmmu     : num  0 0 0 0 0 0 0 0 0 0 ...
 $ NumberofLMFound       : int  0 0 0 0 0 0 0 0 0 0 ...
 $ LastLockingsec        : num  0 0 0 0 0 0 0 0 0 0 ...
 $ LMmZCorrectionppm     : num  0 0 0 0 0 0 0 0 0 0 ...
 $ IonOpticsSettings     : logi  NA NA NA NA NA NA ...
 $ SLensRFLevel          : num  40 40 40 40 40 40 40 40 40 40 ...
 $ SLensVoltageV         : num  21 21 21 21 21 21 21 21 21 21 ...
 $ SkimmerVoltageV       : num  15 15 15 15 15 15 15 15 15 15 ...
 $ InjectFlatapoleOffsetV: num  5 5 5 5 5 5 5 5 5 5 ...
 $ BentFlatapoleDCV      : num  2 2 2 2 2 2 2 2 2 2 ...
 $ MP2andMP3RFV          : num  900 900 900 900 900 900 900 900 900 900 ...
 $ GateLensVoltageV      : num  2.25 2.25 2.25 2.25 2.25 2.25 2.25 2.25 2.25 2.25 ...
 $ CTrapRFV              : num  2400 1420 1420 1420 1420 1420 1420 1420 1420 1420 ...
 $ DiagnosticData        : logi  NA NA NA NA NA NA ...
 $ DynamicRTShiftmin     : num  0 0 0 0 0 0 0 0 0 0 ...
 $ IntensCompFactor      : num  1.428 0.554 0.554 0.56 0.555 ...
 $ ResDepIntens          : num  0.981 1 1 2.466 1 ...
 $ CTCDNumF              : int  0 0 0 0 0 0 0 0 0 0 ...
 $ CTCDComp              : num  1.01 1.01 1.01 1.01 1.01 ...
 $ CTCDScScr             : num  0.844 0 0 0 0 0 0 0 0 0 ...
 $ RawOvFtT              : num  2378646 11139 10542 21162 12215 ...
 $ LCFWHMparameter       : num  15 15 15 15 15 15 15 15 15 15 ...
 $ Rod                   : int  0 0 0 0 0 0 0 0 0 0 ...
 $ PSInjTimems           : num  0.64 0.64 0.64 0.64 0.64 0.64 55 0.64 0.64 0.64 ...
 $ AGCPSMode             : int  1 -1 -2 -3 -4 -5 -3 -7 -8 -9 ...
 $ AGCPSDiag             : int  3501800 0 0 0 0 0 0 0 0 0 ...
 $ HCDEnergyeV           : num  0 24.6 32.5 34.5 27.6 ...
 $ AGCFill               : num  0.76 0.03 0.03 0.03 0.04 0.39 0.05 0.03 0.03 0.03 ...
 $ Injectiont0           : num  -0.071 0 0 0 0 0 0 0 0 0 ...
 $ t0FLP                 : num  355 0 0 0 0 ...
 $ AccessId              : int  0 0 0 0 0 0 0 0 0 0 ...
 $ AnalogInput1V         : num  0 0 0 0 0 0 0 0 0 0 ...
 $ AnalogInput2V         : num  0 0 0 0 0 0 0 0 0 0 ...
> 

The list of attributes will change by instrument used for data recording.

Best, Tobi

tobiasko commented 4 years ago

For the extraction of peak lists we have implemented readScans()

> rawfile <- file.path(path.package(package = 'rawDiag'), 'extdata', 'sample.raw')
> rawfile
[1] "/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rawDiag/extdata/sample.raw"
> readScans(rawfile = rawfile, 1)
[[1]]
$scan
[1] 1

$scanType
[1] "FTMS + c NSI Full ms [350.0000-1800.0000]"

$rtinseconds
[1] 0.097

$pepmass
[1]    1075 5979308

$centroidStream
[1] TRUE

$title
[1] "File: sample.raw; SpectrumID: ; scans: 1"

$charge
[1] 0

$monoisotopicMz
[1] 0

$mZ
  [1]  352.2367  352.3192  352.3641  353.1436  353.2399  353.2521  353.2821  353.3031
  [9]  353.3180  353.3397  353.3763  354.2429  354.3435  354.3795  355.0683  355.1405
 [17]  355.1895  355.2107  355.2223  355.2286  355.2467  355.2828  355.2977  355.3191
 [25]  355.3342  355.3554  356.0674  356.2779  356.2853  356.3011  356.3219  356.3503
 [33]  357.0113  357.0477  357.0653  357.0715  357.1997  357.2367  357.2617  357.2809
 [41]  357.2982  357.3135  358.0101  358.0464  358.0648  358.0696  358.1663  358.2399
 [49]  358.3012  358.3662  358.9902  359.0268  359.0440  359.0620  359.0685  359.2410
 [57]  359.2561  359.2714  359.2779  359.2929  359.3143  359.3291  359.3507  360.0257
 [65]  360.0440  360.0617  360.2964  360.3180  360.9875  361.0239  361.0308  361.1456
 [73]  361.2204  361.2349  361.2932  361.3296  361.3446  362.0234  362.2097  362.2241
 [81]  362.3329  362.3479  363.0209  363.1703  363.2143  363.2259  363.2514  363.2879
 [89]  363.3005  363.3087  363.3242  363.3365  363.3600  364.1737  364.2547  364.3130
 [97]  364.3404  364.3647  365.2151  365.2520  365.2671  365.3037  365.3191  365.3399
[105]  365.3759  366.3797  367.0684  367.2676  367.2982  367.3344  367.3557  367.3921
[113]  368.0679  368.1049  368.2716  368.3016  368.3374  368.3953  369.0660  369.0851
[121]  369.1202  369.2986  369.3138  369.3345  369.3501  369.3712  370.1193  370.1261
[129]  370.3533  370.3746  371.0636  371.0996  371.3139  371.3767  372.0621  372.0988
[137]  372.2546  372.2964  372.3172  373.0424  373.0605  373.0789  373.0965  373.1026
[145]  373.1490  373.1840  373.2574  373.3083  373.3205  373.3275  373.3442  373.3816
[153]  373.8855  374.0410  374.0599  374.0773  374.0960  374.1007  374.3117  374.3215
[161]  375.0395  375.0570  375.0757  375.0822  375.0934  375.0997  375.2516  375.3088
[169]  375.3239  375.3453  375.3603  376.0754  376.0922  376.3116  376.3483  377.2303
[177]  377.2494  377.2667  377.3032  377.3177  377.3245  377.3399  377.3523  377.3761
[185]  378.0018  378.2704  378.2830  378.3065  378.3282  378.3564  379.2366  379.3917
[193]  380.3958  381.2980  381.3346  381.3703  381.4071  382.4111  383.1393  383.2201
[201]  383.3131  383.3291  383.3498  383.3863  384.3903  384.8052  385.0483  385.0790
[209]  385.1153  385.1517  385.3299  385.3447  386.1503  386.3328  386.3481  386.3975
[217]  386.8035  387.0458  387.0945  387.1312  387.1487  387.3608  387.4012  388.0934
[225]  388.1259  388.3406  388.3475  388.8012  389.0237  389.0737  389.0916  389.0981
[233]  389.1101  389.1262  389.2670  389.3246  389.3443  389.3610  390.0901  390.1092
[241]  390.1224  390.3643  390.7993  391.0536  391.1079  391.1133  391.1375  391.2016
[249]  391.2824  391.3397  391.3909  392.2858  392.3434  393.2888  393.3706  393.4066
[257]  394.2921  394.4107  395.2619  395.3499  395.3867  395.4236  396.3544  396.4263
[265]  397.2679  397.3301  397.3657  397.4024  398.4052  399.0937  399.2487  399.2641
[273]  399.2721  399.2839  399.3239  399.3452  400.3035  400.3487  400.9825  401.1462
[281]  401.2511  401.3400  401.3521  401.3756  402.1784  403.1253  403.2309  403.3034
[289]  403.3401  404.1254  404.1569  404.2343  405.1048  405.1227  405.2369  405.2620
[297]  405.2981  405.3557  405.3714  405.4071  406.3015  406.3590  407.3058  407.3864
[305]  407.4231  409.2772  409.3440  409.3658  409.4016  409.4385  410.4420  411.1704
[313]  411.3816  411.3968  411.4181  412.1730  412.4009  413.1096  413.3609  414.1512
[321]  414.3641  414.4290  415.0349  415.0528  415.0708  416.0336  416.0709  417.0313
[329]  417.0840  417.2981  417.3348  417.3557  417.4062  418.0319  418.0833  418.9937
[337]  419.3137  419.3711  419.9933  420.2576  420.3171  420.3742  421.3202  421.3513
[345]  422.3236  423.4541  425.3088  425.3604  425.3970  425.4336  426.3642  427.2785
[353]  427.3766  428.2818  428.3799  428.8895  429.0869  429.2574  429.2943  429.8927
[361]  430.0865  430.2981  430.8863  431.0294  431.0665  431.0836  431.2738  431.8898
[369]  432.0649  432.0825  432.8835  433.0096  433.0451  433.0630  433.0804  433.3294
[377]  433.3869  433.8870  434.0086  434.0455  434.0618  434.3329  434.8803  435.3365
[385]  435.3658  435.8832  436.8775  437.4698  441.0872  441.3919  443.1391  444.1392
[393]  444.3669  444.9427  445.0838  445.1181  446.1184  447.0613  447.0800  447.0976
[401]  447.1148  447.3298  447.3447  448.0967  448.1142  448.3480  449.0938  449.1109
[409]  449.1193  449.3518  449.3822  450.0943  450.1114  451.0909  451.1073  451.1162
[417]  452.3388  453.2170  457.2888  458.2927  459.1333  459.1700  460.1691  461.1129
[425]  461.1494  461.1665  461.3598  462.1121  462.1445  462.1669  462.3642  463.1091
[433]  463.1288  463.1434  463.1629  463.3977  464.1102  464.1273  464.1408  465.1256
[441]  465.1427  465.5005  467.3204  469.4227  475.0017  475.1634  475.3759  476.1973
[449]  477.1440  477.4125  478.1446  478.1761  478.9606  479.1414  479.4799  481.4968
[457]  483.4381  489.0536  489.0893  490.0531  491.0333  491.0506  492.0330  492.0501
[465]  497.4543  498.4583  499.1653  499.3359  502.1021  503.1054  504.1054  505.0853
[473]  505.1018  505.1527  506.0849  506.1030  507.0283  507.0655  507.0811  507.1000
[481]  507.1076  507.5122  508.0829  508.1011  509.0782  511.4701  512.4736  513.3510
[489]  517.1576  517.1752  518.1573  519.1367  520.1369  521.0795  521.1180  521.1334
[497]  521.4551  522.0789  522.1157  522.1332  523.0961  523.1138  523.1311  524.1131
[505]  524.1315  525.1361  525.4860  533.1886  534.1886  535.1313  535.1689  535.1846
[513]  535.5427  536.1317  536.1629  536.1859  536.9481  537.1288  537.1473  537.1638
[521]  537.1836  538.1284  538.1470  538.1594  538.1808  539.1440  539.1593  540.1569
[529]  549.1840  549.5579  550.2151  551.2145  552.1944  552.9783  554.9570  563.0723
[537]  563.5749  564.0714  565.0506  565.0693  566.9949  577.1240  577.2139  578.1243
[545]  579.1034  579.1218  580.1039  580.1218  581.0828  581.1008  581.1192  582.0830
[553]  582.0991  582.1178  591.1761  591.6059  592.1761  593.1552  593.6199  594.1553
[561]  595.1525  596.1315  596.1520  597.1302  597.1506  598.1320  598.1506  599.1467
[569]  599.1561  604.2670  607.2070  608.2075  609.1501  609.2034  610.1513  610.1815
[577]  610.2051  611.1492  611.1658  611.1823  611.2028  612.1495  612.1649  612.1797
[585]  613.1639  613.1798  614.1772  617.2455  624.2339  625.0173  625.2346  626.2325
[593]  627.2346  631.4911  637.0909  639.0698  640.0701  645.5065  651.1425  652.1429
[601]  653.1223  653.1406  654.1220  654.1407  655.1027  655.1194  655.1384  656.1031
[609]  656.1193  656.1381  657.1001  657.1180  657.1371  665.1943  666.1948  667.1736
[617]  668.1738  669.1711  670.1710  671.1502  671.1675  672.1683  673.1709  674.1697
[625]  681.2255  682.2257  683.1683  683.2219  684.1710  684.2000  684.2236  685.1666
[633]  685.1839  685.2004  685.2206  686.1684  686.1974  687.1973  688.1957  698.2516
[641]  699.2533  700.2490  713.0883  714.0894  725.1608  726.1614  727.1401  727.1595
[649]  728.1407  728.1597  729.1412  729.1556  730.1407  741.1921  742.1926  743.1898
[657]  744.1898  745.1870  746.1860  747.1863  755.2439  756.2441  757.1886  757.2416
[665]  758.2189  758.2421  759.2195  759.2404  760.2163  761.2164  762.2181  763.2166
[673]  764.3264  772.2712  787.1067  788.1071  789.1045  799.1802  800.1792  801.1588
[681]  801.1783  802.1594  802.1766  803.1579  804.1581  815.2105  816.2111  817.2090
[689]  818.2085  819.2068  820.2053  821.2063  829.2633  830.2626  831.2612  832.2368
[697]  832.2599  833.2383  834.2360  835.2370  861.1268  862.1251  863.1227  873.1977
[705]  874.1985  875.1758  876.1780  877.1755  878.1749  879.1731  889.2291  890.2297
[713]  891.2273  892.2270  893.2249  894.2262  899.0418  906.2566  907.2563  923.0920
[721]  936.1425  938.1412  949.1962  950.1957  963.2479  964.2483  965.2473  966.2472
[729]  967.2433  968.2455 1037.2670 1039.2654 1040.3032 1107.7565 1147.4010 1358.8190
[737] 1561.7383 1646.7034

$intensity
  [1]   77705.375    1873.881    4374.524    7941.997   22615.002   10828.501
  [7]    3019.334    4584.903    2452.412   19947.213   37437.281    3995.646
 [13]    4776.054   10309.481 2168729.000    2075.820    4166.444    2369.469
 [19]    5758.462    3655.218    3956.609   19652.791   16918.205    9595.756
 [25]    4290.971   12644.893  490921.156   13332.803    3392.502    3749.265
 [31]    2167.294    3353.363   28844.014   86346.008  365238.375   38370.461
 [37]    3663.871  184843.484    6024.363    4806.253   59096.863    9528.721
 [43]    3462.907   15843.275   52723.473   14595.811    2556.592   36782.777
 [49]   15128.277    7289.381   15117.933  268412.969   11247.665   25402.805
 [55]    6696.929    4465.408    5033.315    2562.037    7957.721    5327.541
 [61]   13076.688   15613.428    3398.073   56858.062    2703.409    2749.268
 [67]    3242.137    3051.157    4746.216   47238.461    5215.777    3064.497
 [73]   83035.523    3242.831    7835.271  579804.938   11855.476    4664.512
 [79]    9778.251   13872.190  124044.109    4275.789    3269.974   82052.695
 [85]    4049.567    3319.001   27100.527    6033.990    4493.349   15407.776
 [91]    5355.453   16878.273   11852.896   17352.346    8886.980    2703.268
 [97]    9185.931    2656.011    3449.372    3262.067    4744.824    3547.678
[103]    3558.357    7320.825   14976.463    3833.484   13662.019   32512.064
[109]   57565.109    7073.360   14666.829   24900.756    3363.095    2557.376
[115]    3452.185    9738.035    3778.317    7303.095    2591.976    3361.095
[121]  191101.766    7239.429    5756.608    5950.015   26031.727  209081.938
[127]   34362.207    9975.185    8054.946   53466.395  135245.969 2582570.250
[133] 1340923.250    4598.135   30945.432  606245.188    3526.635    2476.554
[139]  317068.625   79422.039   22735.223  230254.375  438175.812   68703.875
[145]    3825.886    8936.217    6599.286   14865.211   30354.465    3608.256
[151]    4450.375    3772.930    2606.911   16924.693    5248.713   37564.266
[157]   61371.008   19456.938    2876.737    3114.029   10365.559    2658.770
[163]   41314.531    4646.307   25000.924    7867.356    4874.462    8309.149
[169]    6063.714   32892.758    6566.245    4248.974    3677.491    2802.126
[175]    6546.479    3520.821    3241.549   23163.156   11458.828    2226.885
[181]   15255.934    3431.262    2401.138    9505.422    2579.110    7513.314
[187]    2591.010    5504.014    4569.831   12270.855    3661.028    7916.104
[193]    3248.034    3807.492    4564.737    5000.095   16845.465    7522.684
[199]    4348.195    3640.826    3285.793   12968.660   10546.303    7527.873
[205]    4627.984    6864.268    3452.035    5628.131    7489.371   44132.676
[211]   26680.969   28961.229   12676.604    6653.133   12303.674   56285.801
[217]   13986.402    3473.297  255765.000   15596.891    8005.099    4525.923
[223]   10149.081   49761.523   30630.621   24490.756    2270.828   18920.605
[229]    3276.941    6344.256   38267.828    7432.156   66786.789    9786.611
[235]   11055.331    6141.095    6870.951   45992.410    3315.388   11640.989
[241]    4193.734    8970.780    3181.969    4195.756   11895.266    4504.301
[247]    4027.947    7380.897 5269295.000   29507.408    4280.854 1407335.000
[253]    7193.880  178784.828    5046.216    4850.318   13959.575    2809.933
[259]    8060.883    4068.181    5182.508   13678.441    3754.023    4305.127
[265]    6389.741    3094.481    8704.548   44308.445   14260.730    3319.540
[271]    9078.821    9682.202    5013.630    8418.767    6127.849  131182.719
[277]    2943.428   41275.613    7320.398    8417.069    3284.894    4383.458
[283]    3427.229    5214.558    5980.104   25133.275  657769.312    7815.961
[289]    2719.426   10829.470    3106.035  139040.734    4313.382    8795.254
[295]   18703.598    8104.472  160672.547   65771.000    2953.557    4328.245
[301]   37807.547   15611.589    4408.005    4564.813    2960.528   10949.597
[307]    4050.379    6835.858    3532.450   10096.485    4014.617   14080.253
[313]    7270.607   13508.525    4712.812    4115.273    4396.199    2683.955
[319]   37815.316    2900.040   10598.124    8386.950  164969.484    4962.458
[325]    6939.630   41771.754    3747.973   26034.164    9185.699    3383.767
[331]    2522.030    3420.372    3805.817    7547.515    3472.431   15138.632
[337] 2796238.250   87443.750    3401.588    7001.777  798491.938   16137.671
[343]  118340.648    5658.091   10395.230    9970.406    6323.650   23822.479
[349]    5483.587    4142.005    7545.292   33223.816   29902.527    6865.904
[355]   13123.797   62247.211 1731438.875    4004.232   13447.491    6969.826
[361]  532295.688    4073.627  115394.422    4737.042   74356.453  352199.156
[367]    3920.179   18322.863   21232.729   76082.969   90399.297    4430.722
[373]   14012.613   17384.139   28061.822   98712.945    7110.159    9062.518
[379]    4074.899    3392.507    4306.036   34049.121   38732.598    7485.347
[385]    4212.752    4833.869    8511.743    5679.324    5302.286    5257.948
[391]  116682.328   22991.631    8696.755    3072.723   58066.594 5979307.500
[397] 2524368.750   13034.353   18427.732  163880.641 1306308.250   13291.113
[403]  302629.625   41625.055  298306.000   91310.570   38220.750  105684.719
[409]   26188.162   12042.845    6744.820    4104.114   12505.954    4078.660
[415]    4691.599    4762.188    3192.813    8470.519   70458.625   19656.701
[421]   14465.819  213126.656   59072.965  134269.406    7312.817   41086.105
[427]   12359.414   34045.141  207778.688   11319.162    3792.271   19798.941
[433]   72207.047   57274.438    4728.356    3759.242    5270.347   11157.295
[439]   34528.977   12983.782    7582.125    4662.085    4074.011    3469.175
[445]    5683.212    3472.032    4199.365   12801.498   26760.857    4184.129
[451]    8802.618    3294.789    3645.068    7160.400    5434.214    5357.970
[457]   11447.143   66764.484    4721.302   25835.574    4217.724    8610.605
[463]    4277.196    3992.409   33185.754    8862.590    4950.112    6660.879
[469]    3035.406 1043974.750  391959.000  150196.203  262532.750    3263.596
[475]   49848.426   75129.336    4565.404   11556.152   30634.229   15393.802
[481]    6372.323    4324.696    9941.883    6477.970    3772.693   41864.035
[487]    9378.776    3335.010   74688.156    5053.866   25528.814 3966738.750
[493] 1911171.375    7530.042   88535.984 1003322.312    2883.972    2702.282
[499]   21183.947  329535.000    3381.695   16201.306  104739.109    4746.098
[505]   23872.961    2944.349    5730.989  393665.625  155399.984   44480.473
[511]   32173.359  109688.844    5086.601   19079.545  188306.656   31226.225
[517]    3341.731   11114.127   26394.887   78415.133    8393.389    5359.694
[523]    7437.550   51539.957    2758.413    6457.155   11921.271    3466.217
[529]    5318.705    4339.687   26486.131   13207.588    5297.030    5168.539
[535]    4122.676   20118.102    2906.584   12120.339   11252.183    4442.989
[541]    3907.713 1266848.875    5639.520  584534.500  107033.797  393597.531
[547]   44591.156  141653.484    8072.391   29205.133   41055.613    4267.954
[553]   12662.542   15711.596   32041.092    5694.476   19926.609 3267503.000
[559]    3539.964 1921283.375 1162804.125   10212.117  408629.938   11802.888
[565]  125561.695    3748.813   42537.773    5909.676    4397.818    2706.426
[571]  428091.938  199699.328   57850.281  117132.609   16289.499  211342.594
[577]   42599.211   12621.432   24611.752  102734.719    6966.062    3802.804
[583]    8863.683   67749.430    4898.549   18419.486    7610.934    2974.225
[589]   31032.561    3924.465    7854.478    5099.797    3683.626    4945.623
[595]    5022.175    8676.823    5380.875    6594.631  854538.500  466381.844
[601]   55532.312  318639.281   36914.410  139341.641    5759.713   28391.584
[607]   39321.387    3742.087   10003.739   18228.422    2485.321    6371.839
[613]    4286.907    8808.663    4366.085 2421411.000 1535190.125 1045012.625
[619]  467290.500    6396.663  141077.781   55548.367    7640.772    3064.441
[625]  157427.766   88389.172   27174.506   58558.859   15813.728  155376.922
[631]   22402.613    9336.749    3934.167   87670.102    7271.868    3445.736
[637]   66527.602   19200.289    6895.857    9039.146    9262.235    4585.278
[643]    8994.686    7196.707  153635.672   98957.516   35858.461   68705.930
[649]   15144.061   30810.160   11121.040   13706.985    6242.925  953891.750
[655]  639480.938  473981.562  221084.500   89429.172   28657.117    9964.812
[661]   51669.785   30503.070    5294.802   15764.815   55970.824    9280.074
[667]   29152.461    4862.654   24736.873   12620.339    3971.855    2874.574
[673]    3432.849    4561.159    4856.255    6829.927    3820.718   22921.582
[679]   18850.404   21227.533   12546.057   12709.188    4536.234    9908.554
[685]    4353.638  289258.656  219174.844  168046.875   78459.969   34666.238
[691]   10554.942    4697.209   13037.872   13381.538   10005.523   11148.404
[697]    5884.552    9210.484    7488.578    3427.392    4928.978    5248.564
[703]    3864.771    4030.701    3750.559   11002.332   11549.372   10505.842
[709]    7954.002    3595.303   76288.188   66279.039   56249.855   25661.854
[715]   16712.242    6938.754    2601.111    3051.912    2967.207    2966.276
[721]    2947.383    3737.897    4220.827    6127.435   20817.350   12836.690
[727]   20816.096    8052.212    2881.511    2622.339    4852.667    3100.941
[733]    2476.037    2490.257    2733.165    2779.918    2794.363    2531.890

attr(,"class")
[1] "list"     "peaklist"
tobiasko commented 4 years ago

Details on using readScans() and readXICs are shown here

viviantra commented 4 years ago

Thank you! Very helpful!

I think readXICs is what I need. If I want to extract peptides intensities from a batch of files, how do I use readXICs across multiple files in the same directory? Thank you!

tobiasko commented 4 years ago

Hi Vivian,

readXICs() is indeed not vectorised. You would need to use a function from the apply() family to do this. Our FAQ section lists an example using a multi core apply control structure, see here. That should also work for readXICs. The mclapply() function has been moved to the parallel package. Use

library(parallel)

to make it available.

Best, Tobi

tobiasko commented 4 years ago

You might also check the ThermoRawFileParser XIC function.

viviantra commented 4 years ago

Hi Tobi,

Yes readXICs() is exactly what I need!!

I was able to extract all the features from all files and analyze them together. The mass column from readXICs() is the mass used for extraction. It would be nice to list the mass in the raw feature as another column. I have not tried readScans(). I imagine readScans will have the actual mass.

Thank you so much for the help and information. The tool has helped me tremendously!

Vivian

tobiasko commented 4 years ago

Hi Vivian,

nice to hear that our package was useful to you. Regarding "the mass": Not sure if I get you correctly, but we list the PrecursorMass in the raw data.frame. For MS2 scans this is the m/z values used for quadrupole isolation.

Best, Tobi