diff --git a/404.html b/404.html index 24481bd9..19e526cf 100644 --- a/404.html +++ b/404.html @@ -27,7 +27,7 @@ Spectra - 1.15.8 + 1.15.9 + + + + + +
+
+
+ +
+

Various data analysis functions are available for Spectra objects. These +can be categorized into functions that either return a Spectra object +(with the manipulated data) and functions that directly return the +result from the calculation. For the former category, the data manipulations +are cached in the result object's processing queue and only exectuted +on-the-fly when the respective data gets extracted from the Spectra (see +section The processing queue for more information).

+

For the second category, the calculations are directly executed and the +result, usually one value per spectrum, returned. Generally, to reduce +memory demand, a chunk-wise processing of the data is performed.

+
+ +
+

Usage

+
applyProcessing(
+  object,
+  f = processingChunkFactor(object),
+  BPPARAM = bpparam(),
+  ...
+)
+
+processingLog(x)
+
+scalePeaks(x, by = sum, msLevel. = uniqueMsLevels(x))
+
+# S4 method for class 'Spectra'
+addProcessing(object, FUN, ..., spectraVariables = character())
+
+# S4 method for class 'Spectra'
+bin(
+  x,
+  binSize = 1L,
+  breaks = NULL,
+  msLevel. = uniqueMsLevels(x),
+  FUN = sum,
+  zero.rm = TRUE
+)
+
+# S4 method for class 'Spectra'
+containsMz(
+  object,
+  mz = numeric(),
+  tolerance = 0,
+  ppm = 20,
+  which = c("any", "all"),
+  BPPARAM = bpparam()
+)
+
+# S4 method for class 'Spectra'
+containsNeutralLoss(
+  object,
+  neutralLoss = 0,
+  tolerance = 0,
+  ppm = 20,
+  BPPARAM = bpparam()
+)
+
+# S4 method for class 'Spectra'
+entropy(object, normalized = TRUE)
+
+# S4 method for class 'ANY'
+entropy(object, ...)
+
+# S4 method for class 'Spectra'
+pickPeaks(
+  object,
+  halfWindowSize = 2L,
+  method = c("MAD", "SuperSmoother"),
+  snr = 0,
+  k = 0L,
+  descending = FALSE,
+  threshold = 0,
+  msLevel. = uniqueMsLevels(object),
+  ...
+)
+
+# S4 method for class 'Spectra'
+replaceIntensitiesBelow(
+  object,
+  threshold = min,
+  value = 0,
+  msLevel. = uniqueMsLevels(object)
+)
+
+# S4 method for class 'Spectra'
+reset(object, ...)
+
+# S4 method for class 'Spectra'
+smooth(
+  x,
+  halfWindowSize = 2L,
+  method = c("MovingAverage", "WeightedMovingAverage", "SavitzkyGolay"),
+  msLevel. = uniqueMsLevels(x),
+  ...
+)
+
+# S4 method for class 'Spectra'
+spectrapply(
+  object,
+  FUN,
+  ...,
+  chunkSize = integer(),
+  f = factor(),
+  BPPARAM = SerialParam()
+)
+
+ +
+

Arguments

+ + +
object
+

A Spectra object.

+ + +
f
+

For spectrapply() and applyProcessing(): factor defining +how object should be splitted for eventual parallel processing. +Defaults to factor() for spectrapply() hence the object is not +splitted while it defaults to f = processingChunkSize(object) for +applyProcessing() splitting thus the object by default into chunks +depending on processingChunkSize().

+ + +
BPPARAM
+

Parallel setup configuration. See bpparam() for more +information. This is passed directly to the backendInitialize() method +of the MsBackend. See also processingChunkSize() for +additional information on parallel processing.

+ + +
...
+

Additional arguments passed to internal and downstream functions.

+ + +
x
+

A Spectra.

+ + +
by
+

For scalePeaks(): function to calculate a single numeric from +intensity values of a spectrum by which all intensities (of +that spectrum) should be divided by. The default by = sum will +divide intensities of each spectrum by the sum of intensities of that +spectrum.

+ + +
msLevel.
+

integer defining the MS level(s) of the spectra to which +the function should be applied (defaults to all MS levels of object.

+ + +
FUN
+

For addProcessing(): function to be applied to the peak matrix +of each spectrum in object. +For bin(): function to aggregate intensity values of peaks falling +into the same bin. Defaults to FUN = sum thus summing up intensities. +For spectrapply() and chunkapply(): function to be applied to +each individual or each chunk of Spectra.

+ + +
spectraVariables
+

For addProcessing(): character with additional +spectra variables that should be passed along to the function defined +with FUN. See function description for details.

+ + +
binSize
+

For bin(): numeric(1) defining the size for the m/z bins. +Defaults to binSize = 1.

+ + +
breaks
+

For bin(): numeric defining the m/z breakpoints between +bins.

+ + +
zero.rm
+

For bin(): logical(1) indicating whether to remove bins +with zero intensity. Defaults to TRUE, meaning the function will +discard bins created with an intensity of 0 to enhance memory +efficiency.

+ + +
mz
+

For containsMz(): numeric with the m/z value(s) of the mass +peaks to check.

+ + +
tolerance
+

For containsMz() and neutralLoss(): +numeric(1) allowing to define a constant maximal accepted difference +between m/z values for peaks to be matched.

+ + +
ppm
+

For containsMz() and neutralLoss(): numeric(1) defining a +relative, m/z-dependent, maximal accepted difference between m/z values +for peaks to be matched.

+ + +
which
+

For containsMz(): either "any" or "all" defining whether +any (the default) or all provided mz have to be present in the +spectrum.

+ + +
neutralLoss
+

for containsNeutralLoss(): numeric(1) defining the +value which should be subtracted from the spectrum's precursor m/z.

+ + +
normalized
+

for entropy(): logical(1) whether the normalized +entropy should be calculated (default). See also nentropy() for +details.

+ + +
halfWindowSize
+

For pickPeaks(): integer(1), used in the +identification of the mass peaks: a local maximum has to be the +maximum in the window from (i - halfWindowSize):(i + halfWindowSize). +For smooth(): integer(1), used in the smoothing algorithm, the +window reaches from (i - halfWindowSize):(i + halfWindowSize).

+ + +
method
+

For pickPeaks(): character(1), the noise estimators that +should be used, currently the the Median Absolute Deviation +(method = "MAD") and Friedman's Super Smoother +(method = "SuperSmoother") are supported. +For smooth(): character(1), the smoothing function that should be +used, currently, the Moving-Average- (method = "MovingAverage"), +Weighted-Moving-Average- (method = "WeightedMovingAverage"), +Savitzky-Golay-Smoothing (method = "SavitzkyGolay") are supported.

+ + +
snr
+

For pickPeaks(): double(1) defining the +Signal-to-Noise-Ratio. The intensity of a local maximum has to be +higher than snr * noise to be considered as peak.

+ + +
k
+

For pickPeaks(): integer(1), number of values left and right of +the peak that should be considered in the weighted mean calculation.

+ + +
descending
+

For pickPeaks(): logical, if TRUE just values +betwee the nearest valleys around the peak centroids are used.

+ + +
threshold
+

For pickPeaks(): a numeric(1) defining the proportion +of the maximal peak intensity. Only values above the threshold are +used for the weighted mean calculation. +For replaceIntensitiesBelow(): a numeric(1) defining the threshold +or a function to calculate the threshold for each spectrum on its +intensity values. Defaults to threshold = min.

+ + +
value
+

For replaceIntensitiesBelow(): numeric(1) defining the +value with which intensities should be replaced with.

+ + +
chunkSize
+

For spectrapply(): size of the chunks into which the +Spectra should be split. This parameter overrides parameters +f and BPPARAM.

+ +
+
+

Value

+

See the documentation of the individual functions for a description of the +return value.

+
+
+

Data analysis methods returning a Spectra

+ + + +

The methods listed here return a Spectra object as a result.

  • addProcessing(): adds an arbitrary function that should be applied to the +peaks matrix of every spectrum in object. The function (can be passed +with parameter FUN) is expected to take a peaks matrix as input and to +return a peaks matrix. A peaks matrix is a numeric matrix with two columns, +the first containing the m/z values of the peaks and the second the +corresponding intensities. The function has to have ... in its +definition. Additional arguments can be passed with .... With parameter +spectraVariables it is possible to define additional spectra variables +from object that should be passed to the function FUN. These will be +passed by their name (e.g. specifying spectraVariables = "precursorMz" +will pass the spectra's precursor m/z as a parameter named precursorMz +to the function. The only exception is the spectra's MS level, these will +be passed to the function as a parameter called spectrumMsLevel (i.e. +with spectraVariables = "msLevel" the MS levels of each spectrum will be +submitted to the function as a parameter called spectrumMsLevel). +Examples are provided in the package vignette.

  • +
  • bin(): aggregates individual spectra into discrete (m/z) bins. Binning is +performed only on spectra of the specified MS level(s) (parameter +msLevel, by default all MS levels of x). The bins can be defined with +parameter breaks which by default are equally sized bins, with size +being defined by parameter binSize, from the minimal to the maximal m/z +of all spectra (of MS level msLevel) within x. The same bins are used +for all spectra in x. All intensity values for peaks falling into the +same bin are aggregated using the function provided with parameter FUN +(defaults to FUN = sum, i.e. all intensities are summed up). Note that +the binning operation is applied to the peak data on-the-fly upon data +access and it is possible to revert the operation with the reset() +function (see description of reset() below).

  • +
  • countIdentifications: counts the number of identifications each scan has +led to. See countIdentifications() for more details.

  • +
  • pickPeaks(): picks peaks on individual spectra using a moving +window-based approach (window size = 2 * halfWindowSize). For noisy +spectra there are currently two different noise estimators available, +the Median Absolute Deviation (method = "MAD") and +Friedman's Super Smoother (method = "SuperSmoother"), +as implemented in the MsCoreUtils::noise(). +The method supports also to optionally refine the m/z value of +the identified centroids by considering data points that belong (most +likely) to the same mass peak. Therefore the m/z value is calculated as an +intensity weighted average of the m/z values within the peak region. +The peak region is defined as the m/z values (and their respective +intensities) of the 2 * k closest signals to the centroid or the closest +valleys (descending = TRUE) in the 2 * k region. For the latter the k +has to be chosen general larger. See MsCoreUtils::refineCentroids() for +details. +If the ratio of the signal to the highest intensity of the peak is below +threshold it will be ignored for the weighted average.

  • +
  • replaceIntensitiesBelow(): replaces intensities below a specified +threshold with the provided value. Parameter threshold can be either +a single numeric value or a function which is applied to all non-NA +intensities of each spectrum to determine a threshold value for each +spectrum. The default is threshold = min which replaces all values +which are <= the minimum intensity in a spectrum with value (the +default for value is 0). Note that the function specified with +threshold is expected to have a parameter na.rm since na.rm = TRUE +will be passed to the function. If the spectrum is in profile mode, +ranges of successive non-0 peaks <= threshold are set to 0. +Parameter msLevel. allows to apply this to only spectra of certain MS +level(s).

  • +
  • scalePeaks(): scales intensities of peaks within each spectrum depending +on parameter by. With by = sum (the default) peak intensities are +divided by the sum of peak intensities within each spectrum. The sum of +intensities is thus 1 for each spectrum after scaling. Parameter +msLevel. allows to apply the scaling of spectra of a certain MS level. +By default (msLevel. = uniqueMsLevels(x)) intensities for all +spectra will be scaled.

  • +
  • smooth(): smooths individual spectra using a moving window-based approach +(window size = 2 * halfWindowSize). Currently, the +Moving-Average- (method = "MovingAverage"), +Weighted-Moving-Average- (method = "WeightedMovingAverage"), +weights depending on the distance of the center and calculated +1/2^(-halfWindowSize:halfWindowSize)) and +Savitzky-Golay-Smoothing (method = "SavitzkyGolay") are supported. +For details how to choose the correct halfWindowSize please see +MsCoreUtils::smooth().

  • +
+
+

Data analysis methods returning the result from the calculation

+ + + +

The functions listed in this section return immediately the result from the +calculation. To reduce memory demand (and allow parallel processing) the +calculations a chunk-wise processing is generally performed.

  • chunkapply(): apply an arbitrary function to chunks of spectra. See +chunkapply() for details and examples.

  • +
  • containsMz(): checks for each of the spectra whether they contain mass +peaks with an m/z equal to mz (given acceptable difference as defined by +parameters tolerance and ppm - see common() for details). Parameter +which allows to define whether any (which = "any", the default) or +all (which = "all") of the mz have to match. The function returns +NA if mz is of length 0 or is NA.

  • +
  • containsNeutralLoss(): checks for each spectrum in object if it has a +peak with an m/z value equal to its precursor m/z - neutralLoss (given +acceptable difference as defined by parameters tolerance and ppm). +Returns NA for MS1 spectra (or spectra without a precursor m/z).

  • +
  • entropy(): calculates the entropy of each spectra based on the metrics +suggested by Li et al. (https://doi.org/10.1038/s41592-021-01331-z). +See also nentropy() in the MsCoreUtils package for details.

  • +
  • estimatePrecursorIntensity(): defines the precursor intensities for MS2 +spectra using the intensity of the matching MS1 peak from the +closest MS1 spectrum (i.e. the last MS1 spectrum measured before the +respective MS2 spectrum). With method = "interpolation" it is also +possible to calculate the precursor intensity based on an interpolation of +intensity values (and retention times) of the matching MS1 peaks from the +previous and next MS1 spectrum. See estimatePrecursorIntensity() for +examples and more details.

  • +
  • estimatePrecursorMz(): for DDA data: allows to estimate a fragment +spectra's precursor m/z based on the reported precursor m/z and the data +from the previous MS1 spectrum. See estimatePrecursorMz() for details.

  • +
  • neutralLoss(): calculates neutral loss spectra for fragment spectra. See +neutralLoss() for detailed documentation.

  • +
  • spectrapply(): applies a given function to each individual spectrum or +sets of a Spectra object. By default, the Spectra is split into +individual spectra (i.e. Spectra of length 1) and the function FUN +is applied to each of them. An alternative splitting can be defined with +parameter f. Parameters for FUN can be passed using .... +The returned result and its order depend on the function FUN and how +object is split (hence on f, if provided). Parallel processing is +supported and can be configured with parameter BPPARAM, is however only +suggested for computational intense FUN. +As an alternative to the (eventual parallel) processing of the full +Spectra, spectrapply() supports also a chunk-wise processing. For this, +parameter chunkSize needs to be specified. object is then split into +chunks of size chunkSize which are then (stepwise) processed by FUN. +This guarantees a lower memory demand (especially for on-disk backends) +since only the data for one chunk needs to be loaded into memory in each +iteration. Note that by specifying chunkSize, parameters f and +BPPARAM will be ignored. +See also chunkapply() above or examples below for details on chunk-wise +processing.

  • +
+
+

The processing queue

+ + + +

Operations that modify mass peak data, i.e. the m/z and intensity values of +a Spectra are generally not applied immediately to the data but are +cached within the object's processing queue. These operations are then +applied to the data only upon request, for example when m/z and/or +intensity values are extracted. This lazy execution guarantees that the +same functionality can be applied to any Spectra object, regardless of +the type of backend that is used. Thus, data manipulation operations can +also be applied to data that is read only. As a side effect, this enables +also to undo operations using the reset() function.

+

Functions related to the processing queue are:

  • applyProcessing(): for Spectra objects that use a writeable backend +only: apply all steps from the lazy processing queue to the peak data and +write it back to the data storage. Parameter f allows to specify how +object should be split for parallel processing. This should either be +equal to the dataStorage, or f = rep(1, length(object)) to disable +parallel processing alltogether. Other partitionings might result in +errors (especially if a MsBackendHdf5Peaks backend is used).

  • +
  • processingLog(): returns a character vector with the processing log +messages.

  • +
  • reset(): restores the data to its original state (as much as possible): +removes any processing steps from the lazy processing queue and calls +reset() on the backend which, depending on the backend, can also undo +e.g. data filtering operations. Note that a reset*( call after +applyProcessing() will not have any effect. See examples below for more +information.

  • +
+
+

See also

+
+
+
+
+

Author

+

Sebastian Gibb, Johannes Rainer, Laurent Gatto, Philippine Louail, Nir Shahaf, Mar Garcia-Aloy

+
+ +
+

Examples

+

+## Load a `Spectra` object with LC-MS/MS data.
+fl <- system.file("TripleTOF-SWATH", "PestMix1_DDA.mzML",
+    package = "msdata")
+sps_dda <- Spectra(fl)
+sps_dda
+#> MSn data (Spectra) with 7602 spectra in a MsBackendMzR backend:
+#>        msLevel     rtime scanIndex
+#>      <integer> <numeric> <integer>
+#> 1            1     0.231         1
+#> 2            1     0.351         2
+#> 3            1     0.471         3
+#> 4            1     0.591         4
+#> 5            1     0.711         5
+#> ...        ...       ...       ...
+#> 7598         1   899.491      7598
+#> 7599         1   899.613      7599
+#> 7600         1   899.747      7600
+#> 7601         1   899.872      7601
+#> 7602         1   899.993      7602
+#>  ... 33 more variables/columns.
+#> 
+#> file(s):
+#> PestMix1_DDA.mzML
+
+
+##  --------  FUNCTIONS RETURNING A SPECTRA  --------
+
+## Replace peak intensities below 40 with a value of 1
+sps_mod <- replaceIntensitiesBelow(sps_dda, threshold = 20, value = 1)
+sps_mod
+#> MSn data (Spectra) with 7602 spectra in a MsBackendMzR backend:
+#>        msLevel     rtime scanIndex
+#>      <integer> <numeric> <integer>
+#> 1            1     0.231         1
+#> 2            1     0.351         2
+#> 3            1     0.471         3
+#> 4            1     0.591         4
+#> 5            1     0.711         5
+#> ...        ...       ...       ...
+#> 7598         1   899.491      7598
+#> 7599         1   899.613      7599
+#> 7600         1   899.747      7600
+#> 7601         1   899.872      7601
+#> 7602         1   899.993      7602
+#>  ... 33 more variables/columns.
+#> 
+#> file(s):
+#> PestMix1_DDA.mzML
+#> Lazy evaluation queue: 1 processing step(s)
+#> Processing:
+#>  Signal <= 20 in MS level(s) 1, 2 set to 0 [Wed Sep 25 13:45:02 2024] 
+
+## Get the intensities of the first spectrum before and after the
+## operation
+intensity(sps_dda[1])
+#> NumericList of length 1
+#> [[1]] 0.0307632219046354 0.163443520665169 ... 0.507792055606842
+intensity(sps_mod[1])
+#> NumericList of length 1
+#> [[1]] 1 1 1 1 1 1 88.7230834960938 1 1 1 1 1 1 1 ... 1 1 1 1 1 1 1 1 1 1 1 1 1
+
+## Remove all peaks with an intensity below 5.
+sps_mod <- filterIntensity(sps_dda, intensity = c(5, Inf))
+
+intensity(sps_mod)
+#> NumericList of length 7602
+#> [[1]] 88.7230834960938 6.28782653808594
+#> [[2]] 90.9452285766602 6.51183843612671
+#> [[3]] 117.253837585449 6.71664762496948
+#> [[4]] 75.9008331298828 8.15607166290283
+#> [[5]] 63.7168960571289 8.26729297637939 6.08404684066772
+#> [[6]] 81.0469970703125 6.34799957275391
+#> [[7]] 68.0150375366211 7.7239465713501 5.05049753189087
+#> [[8]] 84.4253540039062 7.3393931388855
+#> [[9]] intensity=111.353569030762
+#> [[10]] 84.0783767700195 8.68693542480469 6.3865818977356
+#> ...
+#> <7592 more elements>
+
+## In addition it is possible to pass a function to `filterIntensity()`: in
+## the example below we want to keep only peaks that have an intensity which
+## is larger than one third of the maximal peak intensity in that spectrum.
+keep_peaks <- function(x, prop = 3) {
+    x > max(x, na.rm = TRUE) / prop
+}
+sps_mod <- filterIntensity(sps_dda, intensity = keep_peaks)
+intensity(sps_mod)
+#> NumericList of length 7602
+#> [[1]] intensity=88.7230834960938
+#> [[2]] intensity=90.9452285766602
+#> [[3]] intensity=117.253837585449
+#> [[4]] intensity=75.9008331298828
+#> [[5]] intensity=63.7168960571289
+#> [[6]] intensity=81.0469970703125
+#> [[7]] intensity=68.0150375366211
+#> [[8]] intensity=84.4253540039062
+#> [[9]] intensity=111.353569030762
+#> [[10]] intensity=84.0783767700195
+#> ...
+#> <7592 more elements>
+
+## We can also change the proportion by simply passing the `prop` parameter
+## to the function. To keep only peaks that have an intensity which is
+## larger than half of the maximum intensity:
+sps_mod <- filterIntensity(sps_dda, intensity = keep_peaks, prop = 2)
+intensity(sps_mod)
+#> NumericList of length 7602
+#> [[1]] intensity=88.7230834960938
+#> [[2]] intensity=90.9452285766602
+#> [[3]] intensity=117.253837585449
+#> [[4]] intensity=75.9008331298828
+#> [[5]] intensity=63.7168960571289
+#> [[6]] intensity=81.0469970703125
+#> [[7]] intensity=68.0150375366211
+#> [[8]] intensity=84.4253540039062
+#> [[9]] intensity=111.353569030762
+#> [[10]] intensity=84.0783767700195
+#> ...
+#> <7592 more elements>
+
+## With the `scalePeaks()` function we can alternatively scale the
+## intensities of mass peaks per spectrum to relative intensities. This
+## is specifically useful for fragment (MS2) spectra. We below thus
+## scale the intensities per spectrum by the total sum of intensities
+## (such that the sum of all intensities per spectrum is 1).
+## Below we scale the intensities of all MS2 spectra in our data set.
+sps_mod <- scalePeaks(sps_dda, msLevel = 2L)
+
+## MS1 spectra were not affected
+sps_mod |>
+    filterMsLevel(1L) |>
+    intensity()
+#> NumericList of length 4627
+#> [[1]] 0.0307632219046354 0.163443520665169 ... 0.507792055606842
+#> [[2]] 0.124385602772236 0.306980639696121 ... 0.752154946327209
+#> [[3]] 0.140656530857086 0.194816112518311 ... 0.455461025238037
+#> [[4]] 0.0389336571097374 0.357547700405121 ... 0.478326231241226
+#> [[5]] 0.124386593699455 0.054143700748682 ... 0.251276850700378
+#> [[6]] 0.0940475389361382 0.247442871332169 ... 0.10762557387352
+#> [[7]] 0.0940475389361382 0.17366424202919 ... 0.355754435062408
+#> [[8]] 0.0389340370893478 0.116887390613556 ... 0.40066459774971
+#> [[9]] 0.0307626128196716 0.0626986622810364 ... 0.359330594539642
+#> [[10]] 0.217585012316704 0.333028763532639 ... 0.297511428594589
+#> ...
+#> <4617 more elements>
+
+## Intensities of MS2 spectra were scaled
+sps_mod |>
+    filterMsLevel(2L) |>
+    intensity()
+#> NumericList of length 2975
+#> [[1]] 0.237546288845328 0.478541149367473 0.283912561787199
+#> [[2]] 0.137308998224213 0.0223434223564616 0.840347579419325
+#> [[3]] 0.406266967176935 0.53879813438082 0.0549348984422444
+#> [[4]] 0.280229322504475 0.381273738198204 0.338496939297321
+#> [[5]] intensity=1
+#> [[6]] 0.104432137389865 0.0285431704350093 ... 0.0402209771615151
+#> [[7]] 0.0386159813711874 0.346130168120392 ... 0.228058722675167
+#> [[8]] numeric(0)
+#> [[9]] 0.210018635385678 0.216171000981623 ... 0.0462104568765319
+#> [[10]] 0.0555197043853142 0.722227534151142 0.166680504527357 0.0555722569361873
+#> ...
+#> <2965 more elements>
+
+## Since data manipulation operations are by default not directly applied to
+## the data but only cached in the internal processing queue, it is also
+## possible to remove these data manipulations with the `reset()` function:
+tmp <- reset(sps_mod)
+tmp
+#> MSn data (Spectra) with 7602 spectra in a MsBackendMzR backend:
+#>        msLevel     rtime scanIndex
+#>      <integer> <numeric> <integer>
+#> 1            1     0.231         1
+#> 2            1     0.351         2
+#> 3            1     0.471         3
+#> 4            1     0.591         4
+#> 5            1     0.711         5
+#> ...        ...       ...       ...
+#> 7598         1   899.491      7598
+#> 7599         1   899.613      7599
+#> 7600         1   899.747      7600
+#> 7601         1   899.872      7601
+#> 7602         1   899.993      7602
+#>  ... 33 more variables/columns.
+#> 
+#> file(s):
+#> PestMix1_DDA.mzML
+#> Processing:
+#>  Scale peak intensities in spectra of MS level(s) 2. [Wed Sep 25 13:45:05 2024]
+#>  Reset object. [Wed Sep 25 13:45:06 2024] 
+lengths(sps_dda) |> head()
+#> [1] 223 211 227 210 220 228
+lengths(sps_mod) |> head()
+#> [1] 223 211 227 210 220 228
+lengths(tmp) |> head()
+#> [1] 223 211 227 210 220 228
+
+## Data manipulation operations cached in the processing queue can also be
+## applied to the mass peaks data with the `applyProcessing()` function, if
+## the `Spectra` uses a backend that supports that (i.e. allows replacing
+## the mass peaks data). Below we first change the backend to a
+## `MsBackendMemory()` and then use the `applyProcessing()` to modify the
+## mass peaks data
+sps_dda <- setBackend(sps_dda, MsBackendMemory())
+sps_mod <- filterIntensity(sps_dda, intensity = c(5, Inf))
+sps_mod <- applyProcessing(sps_mod)
+sps_mod
+#> MSn data (Spectra) with 7602 spectra in a MsBackendMemory backend:
+#>        msLevel     rtime scanIndex
+#>      <integer> <numeric> <integer>
+#> 1            1     0.231         1
+#> 2            1     0.351         2
+#> 3            1     0.471         3
+#> 4            1     0.591         4
+#> 5            1     0.711         5
+#> ...        ...       ...       ...
+#> 7598         1   899.491      7598
+#> 7599         1   899.613      7599
+#> 7600         1   899.747      7600
+#> 7601         1   899.872      7601
+#> 7602         1   899.993      7602
+#>  ... 33 more variables/columns.
+#> Processing:
+#>  Switch backend from MsBackendMzR to MsBackendMemory [Wed Sep 25 13:45:09 2024]
+#>  Remove peaks with intensities outside [5, Inf] in spectra of MS level(s) 1, 2. [Wed Sep 25 13:45:09 2024]
+#>  Applied processing queue with 1 steps [Wed Sep 25 13:45:09 2024] 
+
+## While we can't *undo* this filtering operation now using the `reset()`
+## function, accessing the data would now be faster, because the operation
+## does no longer to be applied to the original data before returning to the
+## user.
+
+
+##  --------  FUNCTIONS RETURNING THE RESULT  --------
+
+## With the `spectrapply()` function it is possible to apply an
+## arbitrary function to each spectrum in a Spectra.
+## In the example below we calculate the mean intensity for each spectrum
+## in a subset of the sciex_im data. Note that we can access all variables
+## of each individual spectrum either with the `$` operator or the
+## corresponding method.
+res <- spectrapply(sps_dda[1:20], FUN = function(x) mean(x$intensity[[1]]))
+head(res)
+#> $`1`
+#> [1] 0.9623952
+#> 
+#> $`2`
+#> [1] 1.016938
+#> 
+#> $`3`
+#> [1] 1.056198
+#> 
+#> $`4`
+#> [1] 0.9000712
+#> 
+#> $`5`
+#> [1] 0.8756414
+#> 
+#> $`6`
+#> [1] 0.9105883
+#> 
+
+## As an alternative, applying a function `FUN` to a `Spectra` can be
+## performed *chunk-wise*. The advantage of this is, that only the data for
+## one chunk at a time needs to be loaded into memory reducing the memory
+## demand. This type of processing can be performed by specifying the size
+## of the chunks (i.e. number of spectra per chunk) with the `chunkSize`
+## parameter
+spectrapply(sps_dda[1:20], lengths, chunkSize = 5L)
+#>  [1] 223 211 227 210 220 228 201 215 214 211 208 217 219 190 201 195 196 208 233
+#> [20] 224
+
+## Precursor intensity estimation. Some manufacturers don't report the
+## precursor intensity for MS2 spectra:
+sps_dda |>
+    filterMsLevel(2L) |>
+    precursorIntensity()
+#>    [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 0 0 0 0 0 0 0 0 0 0 0
+#>  [149] 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
+#>  [186] 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
+#>  [223] 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
+#>  [260] 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
+#>  [297] 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
+#>  [334] 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
+#>  [371] 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
+#>  [408] 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
+#>  [445] 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
+#>  [482] 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
+#>  [519] 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
+#>  [556] 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
+#>  [593] 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
+#>  [630] 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
+#>  [667] 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
+#>  [704] 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
+#>  [741] 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
+#>  [778] 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
+#>  [815] 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
+#>  [852] 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
+#>  [889] 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
+#>  [926] 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
+#>  [963] 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
+#> [1000] 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
+#> [1037] 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
+#> [1074] 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
+#> [1111] 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
+#> [1148] 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
+#> [1185] 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
+#> [1222] 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
+#> [1259] 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
+#> [1296] 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
+#> [1333] 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
+#> [1370] 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
+#> [1407] 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
+#> [1444] 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
+#> [1481] 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
+#> [1518] 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
+#> [1555] 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
+#> [1592] 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
+#> [1629] 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
+#> [1666] 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
+#> [1703] 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
+#> [1740] 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
+#> [1777] 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
+#> [1814] 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
+#> [1851] 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
+#> [1888] 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
+#> [1925] 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
+#> [1962] 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
+#> [1999] 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
+#> [2036] 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
+#> [2073] 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
+#> [2110] 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
+#> [2147] 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
+#> [2184] 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
+#> [2221] 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
+#> [2258] 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
+#> [2295] 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
+#> [2332] 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
+#> [2369] 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
+#> [2406] 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
+#> [2443] 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
+#> [2480] 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
+#> [2517] 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
+#> [2554] 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
+#> [2591] 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
+#> [2628] 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
+#> [2665] 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
+#> [2702] 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
+#> [2739] 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
+#> [2776] 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
+#> [2813] 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
+#> [2850] 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
+#> [2887] 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
+#> [2924] 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
+#> [2961] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+
+## This intensity can however be estimated from the previously measured
+## MS1 scan with the `estimatePrecursorIntensity()` function:
+pi <- estimatePrecursorIntensity(sps_dda)
+
+## This function returned the result as a `numeric` vector with one
+## value per spectrum:
+pi
+#>    [1]           NA           NA           NA           NA           NA
+#>    [6]           NA           NA           NA           NA           NA
+#>   [11]           NA           NA           NA           NA           NA
+#>   [16]           NA           NA           NA           NA           NA
+#>   [21]           NA           NA           NA           NA           NA
+#>   [26]           NA           NA           NA           NA           NA
+#>   [31]           NA           NA           NA           NA           NA
+#>   [36]           NA           NA           NA           NA           NA
+#>   [41]           NA           NA           NA           NA           NA
+#>   [46]           NA           NA           NA           NA           NA
+#>   [51]           NA           NA           NA           NA           NA
+#>   [56]           NA           NA    0.2562894           NA           NA
+#>   [61]           NA           NA           NA           NA           NA
+#>   [66]           NA           NA           NA           NA           NA
+#>   [71]           NA           NA           NA           NA           NA
+#>   [76]           NA           NA           NA           NA           NA
+#>   [81]           NA           NA           NA           NA           NA
+#>   [86]           NA           NA           NA           NA           NA
+#>   [91]           NA           NA           NA           NA           NA
+#>   [96]           NA           NA           NA           NA           NA
+#>  [101]           NA           NA           NA           NA           NA
+#>  [106]    0.6533012           NA           NA           NA           NA
+#>  [111]           NA           NA           NA           NA           NA
+#>  [116]           NA           NA           NA           NA           NA
+#>  [121]           NA           NA           NA           NA           NA
+#>  [126]           NA           NA           NA           NA           NA
+#>  [131]           NA           NA           NA           NA           NA
+#>  [136]           NA           NA           NA           NA           NA
+#>  [141]           NA           NA           NA           NA           NA
+#>  [146]           NA           NA           NA           NA           NA
+#>  [151]           NA           NA           NA           NA           NA
+#>  [156]           NA           NA           NA           NA           NA
+#>  [161]           NA           NA           NA           NA           NA
+#>  [166]           NA           NA           NA           NA           NA
+#>  [171]           NA           NA           NA           NA           NA
+#>  [176]           NA           NA           NA           NA           NA
+#>  [181]           NA           NA           NA           NA           NA
+#>  [186]    0.9115737           NA           NA           NA           NA
+#>  [191]           NA           NA           NA           NA           NA
+#>  [196]           NA           NA           NA           NA           NA
+#>  [201]    2.0881963           NA           NA           NA           NA
+#>  [206]           NA           NA           NA           NA           NA
+#>  [211]           NA           NA           NA           NA           NA
+#>  [216]           NA           NA           NA    0.4161463           NA
+#>  [221]           NA           NA           NA           NA           NA
+#>  [226]           NA           NA           NA           NA           NA
+#>  [231]           NA           NA           NA           NA           NA
+#>  [236]           NA           NA           NA           NA           NA
+#>  [241]           NA    1.6393325           NA           NA           NA
+#>  [246]           NA           NA           NA           NA           NA
+#>  [251]           NA           NA           NA           NA           NA
+#>  [256]           NA           NA           NA           NA           NA
+#>  [261]           NA    1.9403350    0.2138104           NA           NA
+#>  [266]           NA           NA           NA           NA           NA
+#>  [271]           NA           NA           NA           NA           NA
+#>  [276]           NA    2.2869656           NA           NA           NA
+#>  [281]           NA           NA           NA           NA           NA
+#>  [286]           NA           NA           NA           NA    0.3581794
+#>  [291]           NA           NA           NA           NA           NA
+#>  [296]           NA           NA    1.2965702           NA           NA
+#>  [301]           NA           NA           NA           NA           NA
+#>  [306]           NA           NA           NA           NA           NA
+#>  [311]           NA           NA           NA           NA           NA
+#>  [316]           NA           NA           NA           NA           NA
+#>  [321]           NA           NA           NA           NA           NA
+#>  [326]           NA    7.1932635           NA    1.7952728           NA
+#>  [331]           NA           NA    1.7991002    4.6187558           NA
+#>  [336]    2.3082116           NA           NA    2.1572299    7.6883049
+#>  [341]           NA           NA           NA           NA           NA
+#>  [346]           NA           NA           NA           NA           NA
+#>  [351]           NA           NA           NA           NA    0.6671617
+#>  [356]           NA           NA           NA           NA           NA
+#>  [361]           NA           NA           NA           NA           NA
+#>  [366]           NA           NA           NA    1.3682123    1.7227559
+#>  [371]           NA           NA    0.8182324           NA           NA
+#>  [376]           NA    1.3030148           NA           NA           NA
+#>  [381]           NA           NA           NA           NA           NA
+#>  [386]    0.4186687           NA           NA           NA           NA
+#>  [391]           NA           NA           NA           NA           NA
+#>  [396]           NA           NA           NA           NA           NA
+#>  [401]           NA           NA           NA           NA           NA
+#>  [406]           NA           NA           NA           NA           NA
+#>  [411]           NA           NA           NA           NA           NA
+#>  [416]           NA           NA           NA           NA           NA
+#>  [421]    0.4893252           NA           NA           NA           NA
+#>  [426]           NA           NA           NA           NA           NA
+#>  [431]           NA           NA           NA           NA           NA
+#>  [436]           NA           NA           NA           NA           NA
+#>  [441]           NA           NA           NA           NA           NA
+#>  [446]           NA           NA           NA           NA           NA
+#>  [451]           NA           NA           NA           NA           NA
+#>  [456]           NA           NA           NA           NA           NA
+#>  [461]           NA    0.6470237           NA           NA           NA
+#>  [466]           NA           NA           NA           NA           NA
+#>  [471]           NA           NA           NA           NA           NA
+#>  [476]           NA           NA           NA           NA           NA
+#>  [481]           NA           NA           NA           NA           NA
+#>  [486]           NA           NA           NA           NA           NA
+#>  [491]           NA           NA           NA           NA           NA
+#>  [496]           NA           NA           NA           NA           NA
+#>  [501]           NA           NA           NA           NA           NA
+#>  [506]           NA           NA           NA           NA           NA
+#>  [511]           NA           NA           NA           NA           NA
+#>  [516]           NA           NA           NA           NA           NA
+#>  [521]           NA           NA           NA           NA           NA
+#>  [526]           NA           NA           NA           NA           NA
+#>  [531]           NA           NA           NA           NA           NA
+#>  [536]           NA           NA           NA           NA           NA
+#>  [541]           NA           NA           NA           NA           NA
+#>  [546]           NA           NA           NA    1.2660308           NA
+#>  [551]           NA           NA           NA           NA           NA
+#>  [556]           NA           NA           NA           NA    0.3448766
+#>  [561]           NA           NA           NA           NA           NA
+#>  [566]           NA           NA           NA           NA           NA
+#>  [571]           NA           NA           NA           NA           NA
+#>  [576]           NA           NA           NA           NA           NA
+#>  [581]           NA           NA           NA           NA           NA
+#>  [586]           NA           NA           NA           NA           NA
+#>  [591]           NA           NA           NA           NA           NA
+#>  [596]           NA           NA           NA           NA           NA
+#>  [601]           NA           NA           NA           NA           NA
+#>  [606]    1.0501561           NA           NA           NA    1.0818608
+#>  [611]           NA    0.1523102           NA    1.6358998           NA
+#>  [616]           NA    1.0994979           NA    2.0477426    0.9073558
+#>  [621]           NA           NA    0.5244763           NA    2.2316427
+#>  [626]           NA    2.6152663           NA           NA           NA
+#>  [631]    1.7466167    1.7643924           NA    1.0328368    2.0097375
+#>  [636]           NA           NA           NA           NA           NA
+#>  [641]           NA           NA           NA           NA           NA
+#>  [646]           NA           NA           NA           NA           NA
+#>  [651]           NA           NA           NA           NA           NA
+#>  [656]    0.3149102           NA           NA           NA           NA
+#>  [661]           NA           NA           NA           NA           NA
+#>  [666]           NA           NA           NA           NA           NA
+#>  [671]           NA    0.5953222           NA           NA           NA
+#>  [676]    0.8350294           NA    1.0704968           NA           NA
+#>  [681]           NA           NA           NA    1.3077880           NA
+#>  [686]           NA           NA    1.5747164           NA           NA
+#>  [691]           NA           NA           NA           NA           NA
+#>  [696]           NA           NA           NA           NA           NA
+#>  [701]           NA           NA           NA           NA           NA
+#>  [706]           NA    0.3147899           NA           NA           NA
+#>  [711]           NA           NA           NA           NA           NA
+#>  [716]           NA           NA           NA           NA           NA
+#>  [721]           NA    0.4084390           NA           NA           NA
+#>  [726]           NA           NA           NA           NA           NA
+#>  [731]           NA           NA           NA           NA           NA
+#>  [736]           NA           NA           NA           NA    0.4539037
+#>  [741]           NA    0.9779218           NA    2.4162381           NA
+#>  [746]    6.3833795           NA    2.8862731    1.2910393   10.6581869
+#>  [751]           NA    1.4951602    3.7959058    2.8722730           NA
+#>  [756]    2.4529448    5.3233647    3.5772564    4.4303422           NA
+#>  [761]    2.9447591    2.1176453    5.0967083    3.3420610           NA
+#>  [766]    2.4258153    0.8650878    7.3779054    6.8362355           NA
+#>  [771]    2.1940181    0.7469152    2.0079441    6.3011317   10.4023485
+#>  [776]    3.3065796           NA    2.3813672    1.3428380    4.0137057
+#>  [781]    1.4098256    2.4288177    1.3962808    7.4319925           NA
+#>  [786]   20.5047512    0.9047846    1.3858606    2.8306339    3.7321482
+#>  [791]    2.8828564    5.5602937           NA  115.1193542    2.0473588
+#>  [796]    4.9510341           NA  118.5648346    2.0066054    2.9266124
+#>  [801]    2.4156189    4.2713437           NA           NA           NA
+#>  [806]           NA           NA           NA    0.2551613           NA
+#>  [811]    2.6899714    5.8423100   11.0782356           NA           NA
+#>  [816]    0.8772338           NA    2.3091309           NA           NA
+#>  [821]           NA           NA           NA           NA           NA
+#>  [826]           NA           NA    3.4256361           NA           NA
+#>  [831]           NA           NA    3.7716985           NA           NA
+#>  [836]           NA           NA           NA           NA           NA
+#>  [841]           NA           NA           NA           NA           NA
+#>  [846]           NA           NA           NA           NA           NA
+#>  [851]           NA           NA           NA           NA           NA
+#>  [856]           NA           NA           NA           NA           NA
+#>  [861]           NA           NA           NA           NA           NA
+#>  [866]           NA           NA           NA    1.5463245           NA
+#>  [871]           NA           NA           NA           NA           NA
+#>  [876]           NA           NA           NA    1.8332181           NA
+#>  [881]           NA           NA           NA           NA           NA
+#>  [886]           NA           NA           NA           NA           NA
+#>  [891]           NA           NA           NA           NA           NA
+#>  [896]           NA           NA           NA           NA           NA
+#>  [901]           NA           NA           NA           NA           NA
+#>  [906]           NA           NA           NA           NA           NA
+#>  [911]    1.1230040    3.6158812           NA           NA           NA
+#>  [916]           NA           NA           NA    1.1808953           NA
+#>  [921]           NA           NA           NA           NA           NA
+#>  [926]    1.2916937           NA           NA           NA           NA
+#>  [931]           NA           NA           NA           NA           NA
+#>  [936]           NA    3.6537952           NA           NA           NA
+#>  [941]           NA           NA           NA           NA           NA
+#>  [946]    1.9253193           NA           NA    6.6556292           NA
+#>  [951]           NA           NA           NA           NA           NA
+#>  [956]           NA           NA           NA           NA           NA
+#>  [961]           NA           NA           NA           NA           NA
+#>  [966]           NA           NA           NA           NA           NA
+#>  [971]           NA           NA           NA           NA           NA
+#>  [976]           NA           NA           NA           NA           NA
+#>  [981]           NA    2.8096755    0.4722714           NA           NA
+#>  [986]           NA    1.5738993           NA    3.1981614           NA
+#>  [991]    2.3436296           NA    1.1402670           NA    4.2488189
+#>  [996]    5.5579276    1.3360999           NA    1.4311922  165.9235382
+#> [1001]    1.0471303    2.2803576    2.3772638    1.4516939    2.6042576
+#> [1006]           NA    1.4513292  110.1937103    1.6985731           NA
+#> [1011]    7.4143949    2.9037418    4.3727541           NA    2.5551207
+#> [1016]    3.4643288    3.0462031    5.5572038    5.8211880    3.4240117
+#> [1021]    3.9230976           NA  326.0313110    2.8209546    4.4502177
+#> [1026]   45.2657852    2.6507335    2.4535000    5.7406173    5.1763091
+#> [1031]           NA    1.5400567    1.0795214    1.5230681    3.4662752
+#> [1036]    4.3179688           NA    0.7036181           NA           NA
+#> [1041]           NA    3.9843678           NA    3.7730997           NA
+#> [1046]           NA           NA    0.8382843           NA           NA
+#> [1051]           NA           NA    0.5566598           NA           NA
+#> [1056]           NA           NA           NA           NA           NA
+#> [1061]           NA    0.8787179           NA           NA    0.4405660
+#> [1066]           NA           NA           NA           NA           NA
+#> [1071]           NA           NA           NA           NA           NA
+#> [1076]           NA           NA           NA           NA           NA
+#> [1081]           NA           NA           NA           NA           NA
+#> [1086]           NA           NA    2.2968674           NA    0.4199017
+#> [1091]           NA           NA           NA           NA           NA
+#> [1096]           NA           NA           NA           NA           NA
+#> [1101]           NA           NA           NA           NA           NA
+#> [1106]           NA           NA           NA           NA           NA
+#> [1111]           NA           NA           NA           NA           NA
+#> [1116]           NA           NA           NA    0.9166892           NA
+#> [1121]           NA           NA           NA    3.8255417           NA
+#> [1126]           NA           NA           NA           NA           NA
+#> [1131]           NA           NA           NA           NA           NA
+#> [1136]           NA           NA           NA           NA           NA
+#> [1141]           NA           NA           NA           NA           NA
+#> [1146]           NA           NA           NA           NA           NA
+#> [1151]           NA    0.5752081           NA           NA           NA
+#> [1156]           NA           NA           NA           NA           NA
+#> [1161]           NA           NA           NA           NA           NA
+#> [1166]           NA           NA           NA           NA           NA
+#> [1171]           NA           NA           NA           NA           NA
+#> [1176]           NA           NA           NA           NA           NA
+#> [1181]           NA           NA           NA           NA           NA
+#> [1186]           NA           NA           NA    0.5180702           NA
+#> [1191]           NA           NA           NA           NA           NA
+#> [1196]           NA           NA           NA           NA           NA
+#> [1201]           NA           NA           NA           NA    1.5857564
+#> [1206]           NA           NA    1.6556677           NA           NA
+#> [1211]           NA           NA           NA           NA           NA
+#> [1216]           NA           NA           NA           NA           NA
+#> [1221]           NA           NA           NA           NA    0.5855740
+#> [1226]    1.0657172           NA           NA           NA           NA
+#> [1231]           NA           NA           NA           NA           NA
+#> [1236]    0.4307829           NA           NA           NA           NA
+#> [1241]           NA           NA           NA           NA           NA
+#> [1246]           NA           NA           NA           NA           NA
+#> [1251]    1.3963100           NA           NA           NA           NA
+#> [1256]           NA           NA           NA           NA           NA
+#> [1261]           NA           NA           NA           NA           NA
+#> [1266]           NA           NA           NA           NA           NA
+#> [1271]           NA           NA           NA           NA    2.4678311
+#> [1276]           NA           NA           NA           NA           NA
+#> [1281]           NA           NA           NA           NA    0.9768236
+#> [1286]           NA           NA    1.0707787           NA           NA
+#> [1291]           NA           NA           NA           NA           NA
+#> [1296]    0.8175089    1.4743868           NA           NA           NA
+#> [1301]           NA           NA           NA           NA           NA
+#> [1306]           NA           NA           NA           NA           NA
+#> [1311]           NA    5.0737371    0.5766439           NA           NA
+#> [1316]           NA           NA           NA           NA           NA
+#> [1321]           NA           NA           NA           NA           NA
+#> [1326]           NA           NA           NA           NA           NA
+#> [1331]           NA           NA           NA           NA           NA
+#> [1336]           NA           NA           NA           NA           NA
+#> [1341]           NA           NA           NA           NA           NA
+#> [1346]           NA    1.4214748           NA           NA           NA
+#> [1351]           NA    0.2014372    2.2585330           NA           NA
+#> [1356]    0.7659990           NA           NA           NA           NA
+#> [1361]    0.6345024           NA    1.1232179    1.2145635           NA
+#> [1366]           NA           NA           NA           NA           NA
+#> [1371]           NA           NA           NA           NA           NA
+#> [1376]           NA           NA           NA           NA           NA
+#> [1381]           NA   10.4214382           NA           NA           NA
+#> [1386]           NA           NA    1.5072360           NA           NA
+#> [1391]           NA    1.6478479           NA           NA           NA
+#> [1396]           NA           NA    2.0655625           NA           NA
+#> [1401]           NA           NA           NA           NA           NA
+#> [1406]           NA           NA           NA           NA           NA
+#> [1411]           NA           NA           NA    0.5699065           NA
+#> [1416]           NA           NA           NA           NA           NA
+#> [1421]           NA           NA           NA           NA    1.0214655
+#> [1426]           NA    0.6936538           NA           NA           NA
+#> [1431]           NA           NA           NA           NA           NA
+#> [1436]           NA           NA           NA           NA           NA
+#> [1441]           NA           NA           NA           NA           NA
+#> [1446]           NA           NA           NA           NA           NA
+#> [1451]           NA           NA           NA           NA           NA
+#> [1456]           NA           NA           NA           NA    2.5300288
+#> [1461]           NA           NA           NA           NA           NA
+#> [1466]           NA           NA           NA           NA           NA
+#> [1471]    0.5699503           NA           NA           NA    0.4178057
+#> [1476]           NA           NA           NA           NA           NA
+#> [1481]           NA           NA           NA           NA           NA
+#> [1486]           NA    2.3085105    7.4867916           NA           NA
+#> [1491]           NA           NA           NA           NA           NA
+#> [1496]           NA    2.4417286           NA           NA           NA
+#> [1501]           NA    3.0711961    2.6359253    1.0029373           NA
+#> [1506]           NA           NA           NA    0.3156207    3.3271339
+#> [1511]           NA           NA           NA    0.7859326    0.9116367
+#> [1516]           NA           NA    2.2751508           NA    3.6905310
+#> [1521]    1.7462349           NA           NA           NA           NA
+#> [1526]           NA           NA           NA    0.6127930           NA
+#> [1531]    0.6677385           NA           NA           NA    0.3307993
+#> [1536]           NA           NA           NA           NA           NA
+#> [1541]           NA           NA           NA           NA           NA
+#> [1546]           NA    2.4790754           NA           NA           NA
+#> [1551]           NA           NA           NA           NA           NA
+#> [1556]           NA           NA           NA           NA           NA
+#> [1561]           NA           NA           NA           NA           NA
+#> [1566]           NA           NA           NA           NA    0.9691072
+#> [1571]           NA           NA           NA           NA           NA
+#> [1576]           NA           NA           NA           NA           NA
+#> [1581]           NA           NA           NA           NA           NA
+#> [1586]           NA           NA    3.0772917           NA           NA
+#> [1591]           NA    0.3885723           NA    0.3215049    1.6329483
+#> [1596]    4.4057989           NA           NA           NA    0.4121964
+#> [1601]           NA           NA           NA    0.8756598           NA
+#> [1606]    1.1511103           NA           NA           NA           NA
+#> [1611]           NA           NA           NA           NA           NA
+#> [1616]           NA           NA           NA    1.2199212    2.9056976
+#> [1621]           NA           NA           NA           NA           NA
+#> [1626]           NA           NA           NA           NA    0.9633790
+#> [1631]           NA    1.1713226    2.6179757           NA           NA
+#> [1636]           NA           NA    7.3096509           NA    4.6009355
+#> [1641]           NA           NA           NA           NA    0.6218465
+#> [1646]           NA    4.1894031           NA   10.0505095           NA
+#> [1651]   12.7552290   10.4093504           NA           NA           NA
+#> [1656]           NA           NA           NA           NA           NA
+#> [1661]           NA           NA           NA    2.2360206           NA
+#> [1666]           NA           NA           NA           NA           NA
+#> [1671]           NA    1.2496341           NA           NA           NA
+#> [1676]           NA           NA           NA           NA           NA
+#> [1681]           NA           NA           NA           NA           NA
+#> [1686]           NA    0.4214600           NA           NA           NA
+#> [1691]           NA           NA           NA           NA           NA
+#> [1696]           NA           NA           NA           NA           NA
+#> [1701]           NA    1.4234974           NA    5.9685678           NA
+#> [1706]    1.4870299    6.5259218           NA   10.9112473           NA
+#> [1711]           NA           NA           NA           NA           NA
+#> [1716]           NA           NA           NA           NA           NA
+#> [1721]    3.0024679           NA           NA           NA           NA
+#> [1726]           NA           NA           NA           NA           NA
+#> [1731]           NA           NA           NA           NA           NA
+#> [1736]           NA           NA    5.5636888           NA           NA
+#> [1741]           NA           NA    1.0834279           NA           NA
+#> [1746]           NA           NA           NA           NA           NA
+#> [1751]           NA           NA    6.3247514           NA           NA
+#> [1756]           NA    8.4820938           NA    1.0724249           NA
+#> [1761]    1.7462807           NA    0.2578186    2.8363187           NA
+#> [1766]    2.7652164           NA    9.1981554           NA    2.7739875
+#> [1771]   27.5907974           NA    3.4431446           NA           NA
+#> [1776]    7.6219230           NA    7.2448454    0.9365459           NA
+#> [1781]           NA           NA           NA           NA           NA
+#> [1786]    1.4254460           NA           NA    1.9484344           NA
+#> [1791]   25.4685478    3.3151047           NA    5.4201798           NA
+#> [1796]           NA    1.0591918           NA           NA           NA
+#> [1801]           NA           NA           NA           NA    2.2389860
+#> [1806]           NA           NA    7.2797980           NA  177.9112701
+#> [1811]           NA  712.0562744           NA    1.9180223    1.0850360
+#> [1816]           NA   15.4796858    2.2603140    1.6407841    3.5157232
+#> [1821]    1.3970622    2.8673556    4.1254120           NA    2.8693426
+#> [1826]    4.2749281    0.8203884    2.7943869           NA    3.3467057
+#> [1831]    3.0753074    2.7253366           NA    2.1626289    5.0227842
+#> [1836]    2.3628030           NA    1.2205384    0.8150464           NA
+#> [1841]    3.2100937 4247.9296875           NA           NA           NA
+#> [1846] 4877.1162109           NA    1.7616867    1.8174063    0.7508621
+#> [1851]           NA    3.5258093    2.7256949           NA    2.5574954
+#> [1856]           NA    1.5129316           NA    0.6094913    2.6934810
+#> [1861]           NA    0.9192376           NA    1.3823618           NA
+#> [1866]  111.0667496    0.6147639    1.4611453           NA    0.7056657
+#> [1871]    0.4673733    0.5605560    1.7962961    0.7591861    0.6475862
+#> [1876]           NA           NA           NA    1.0416414   13.4244280
+#> [1881]    0.8334653    1.4189600    0.8297019    2.9611456    1.5615076
+#> [1886]           NA           NA           NA    1.4051919           NA
+#> [1891]           NA    0.9027803           NA    3.6805460           NA
+#> [1896]           NA           NA           NA  145.7117004           NA
+#> [1901]           NA           NA           NA           NA           NA
+#> [1906]           NA           NA           NA           NA           NA
+#> [1911]           NA           NA           NA           NA           NA
+#> [1916]           NA           NA           NA           NA           NA
+#> [1921]           NA    0.3470792           NA    1.5938562    1.4932191
+#> [1926]           NA           NA           NA           NA           NA
+#> [1931]           NA           NA           NA           NA    4.3753552
+#> [1936]           NA    0.6481672    2.1519599           NA           NA
+#> [1941]           NA           NA           NA    1.0128362           NA
+#> [1946]    0.6915093           NA    1.9947214           NA           NA
+#> [1951]           NA           NA           NA           NA           NA
+#> [1956]           NA           NA           NA    0.2430045           NA
+#> [1961]    2.9182062    0.6795040    1.6664841    2.3586757           NA
+#> [1966]           NA    0.8883650           NA           NA    3.2617228
+#> [1971]           NA    2.8392348           NA           NA           NA
+#> [1976]    1.6086547           NA           NA           NA           NA
+#> [1981]           NA    0.6026787           NA           NA           NA
+#> [1986]           NA           NA           NA           NA           NA
+#> [1991]    1.2004064           NA           NA           NA           NA
+#> [1996]           NA    1.3173006    3.6571672           NA           NA
+#> [2001]    2.2624974           NA    0.9398944    3.5710230           NA
+#> [2006]    1.0233446           NA           NA           NA    1.3720112
+#> [2011]    1.0055754    0.5655854    1.5054272           NA    1.0397023
+#> [2016]    3.3238027           NA           NA           NA    2.1077371
+#> [2021]           NA    2.7032313           NA    3.8104489           NA
+#> [2026]    2.8180630    7.8234811           NA    4.9062996           NA
+#> [2031]           NA           NA    1.3160198           NA           NA
+#> [2036]    1.0076615           NA    1.0950712           NA           NA
+#> [2041]    3.9908450           NA    4.2435541           NA    0.7174511
+#> [2046]    5.2825084           NA           NA           NA           NA
+#> [2051]           NA           NA           NA           NA           NA
+#> [2056]           NA           NA           NA           NA           NA
+#> [2061]           NA           NA           NA           NA           NA
+#> [2066]    0.8802158           NA    0.3888731           NA           NA
+#> [2071]           NA           NA           NA           NA           NA
+#> [2076]    0.7251250           NA           NA           NA           NA
+#> [2081]           NA           NA    1.0856016           NA           NA
+#> [2086]           NA           NA           NA    0.5659533           NA
+#> [2091]           NA           NA           NA           NA           NA
+#> [2096]           NA           NA           NA           NA           NA
+#> [2101]           NA           NA           NA    0.4917859           NA
+#> [2106]           NA           NA           NA           NA    0.4981284
+#> [2111]    0.9569623           NA    0.7542380           NA           NA
+#> [2116]           NA           NA           NA    1.5303959           NA
+#> [2121]           NA           NA           NA           NA           NA
+#> [2126]    2.5028656           NA           NA           NA           NA
+#> [2131]    1.2001288           NA           NA           NA           NA
+#> [2136]           NA           NA           NA           NA           NA
+#> [2141]           NA           NA           NA           NA           NA
+#> [2146]           NA           NA           NA    1.7258205           NA
+#> [2151]    0.5163053           NA           NA           NA           NA
+#> [2156]           NA           NA           NA    1.1474305           NA
+#> [2161]           NA           NA    2.1486368           NA    2.4524887
+#> [2166]    3.0907106    3.9163256           NA    6.1858454    6.0148554
+#> [2171]           NA    3.3022101    6.8535738           NA    0.9091500
+#> [2176]    5.3752904           NA           NA           NA    2.6620142
+#> [2181]   14.2303267           NA    0.3268394    3.2703023    3.7256567
+#> [2186]    3.4891803           NA           NA           NA    6.1556778
+#> [2191]           NA           NA           NA           NA           NA
+#> [2196]           NA           NA           NA           NA           NA
+#> [2201]           NA           NA    1.2317547           NA           NA
+#> [2206]           NA    3.0012579           NA    6.3596826           NA
+#> [2211]    0.6037928    0.5698133           NA    3.7267346           NA
+#> [2216]   10.2576380    0.8706866    4.9864445    4.3741260           NA
+#> [2221]           NA           NA           NA    1.0901091   10.9061537
+#> [2226]    4.1417003    0.5189514    8.2503548    2.2269182           NA
+#> [2231]           NA           NA           NA           NA           NA
+#> [2236]           NA           NA           NA           NA           NA
+#> [2241]           NA           NA           NA           NA           NA
+#> [2246]    0.3962348    0.3956501           NA           NA           NA
+#> [2251]           NA           NA           NA    2.1887872           NA
+#> [2256]           NA           NA           NA           NA           NA
+#> [2261]           NA           NA           NA           NA           NA
+#> [2266]           NA           NA    1.7824746           NA    3.7205944
+#> [2271]           NA    3.6917150           NA           NA           NA
+#> [2276]    0.7435969           NA    9.6342754   24.0429783    1.5591800
+#> [2281]           NA           NA           NA           NA    1.9394968
+#> [2286]           NA    3.0097637           NA    5.7848148    9.7665796
+#> [2291]           NA           NA    2.0749505           NA           NA
+#> [2296]           NA    0.4870613           NA    2.6161067    0.6431220
+#> [2301]           NA           NA           NA           NA           NA
+#> [2306]    1.2651863           NA           NA           NA           NA
+#> [2311]    3.6852174           NA    1.1431226   21.9405651           NA
+#> [2316]           NA           NA    1.2046832    1.8209703           NA
+#> [2321]    0.5066832    0.9095992    9.7609291           NA    3.3460293
+#> [2326]           NA    0.4121834           NA           NA    0.9202868
+#> [2331]           NA    0.6617500           NA           NA           NA
+#> [2336]           NA           NA           NA           NA           NA
+#> [2341]           NA           NA           NA           NA           NA
+#> [2346]           NA           NA           NA           NA           NA
+#> [2351]           NA           NA           NA    2.0171058    1.1644038
+#> [2356]           NA           NA    2.6082158           NA           NA
+#> [2361]    3.6380553           NA           NA    0.8339515           NA
+#> [2366]    1.4020016    7.2250385           NA    0.7268345    0.7294782
+#> [2371]           NA           NA    0.9507068           NA    2.5481384
+#> [2376]           NA           NA           NA    3.6101770           NA
+#> [2381]    0.6119207    5.6888528           NA   16.1643982           NA
+#> [2386]    2.6750910           NA    4.8989611           NA    0.4897856
+#> [2391]   15.6936617           NA    3.9424517           NA           NA
+#> [2396]           NA           NA    1.3334647           NA    0.4453856
+#> [2401]    3.3320382           NA           NA    7.2846007           NA
+#> [2406]    3.1082804           NA    3.1209931           NA           NA
+#> [2411]    9.3145094           NA           NA    0.8143211           NA
+#> [2416]    1.1926577           NA    0.6434940           NA           NA
+#> [2421]           NA           NA           NA           NA           NA
+#> [2426]           NA           NA           NA           NA           NA
+#> [2431]           NA           NA           NA           NA           NA
+#> [2436]           NA           NA    0.6482291    2.3913691    2.1481240
+#> [2441]    2.7833135           NA    4.5657282    5.3265414           NA
+#> [2446]   10.3909426   15.4557104           NA    0.6454072   43.3171730
+#> [2451]           NA    1.4262301           NA    2.5555761    1.7280343
+#> [2456]           NA    2.7765193    1.3546977    1.9755590    1.4631903
+#> [2461]    1.5031183    1.5941623    1.5892071           NA    5.8746567
+#> [2466]    2.2622027    2.5123510    5.3907886    5.1953430    3.1958568
+#> [2471]    3.0968442    4.0582609           NA    3.2192631    2.5363874
+#> [2476]    4.4969444    5.3325839    2.3695500    3.0062342    5.6627531
+#> [2481]    6.4923205           NA    4.7920384    4.5700383    4.0006895
+#> [2486]    9.5566549    5.8871794    7.4422898    5.2004848    9.2628069
+#> [2491]           NA  784.9196167    4.6816382    4.1257901    6.6807156
+#> [2496]    4.1821823    6.8080244    7.7087774   12.4988031           NA
+#> [2501]    1.4474308  985.7752686    5.5145364    2.7746949    2.3561726
+#> [2506]    3.7145381    6.2821894   10.4331989           NA    1.7673082
+#> [2511]           NA           NA    3.1912456           NA    7.3891306
+#> [2516]    1.3537637           NA    0.2704858    4.0082321    8.5943022
+#> [2521]           NA    1.3064193    3.6371551           NA           NA
+#> [2526]    2.5390623           NA           NA           NA           NA
+#> [2531]           NA           NA           NA           NA    0.7411902
+#> [2536]    0.5046070           NA           NA           NA           NA
+#> [2541]    0.5680771           NA    1.2300223    2.8467999    2.6166818
+#> [2546]           NA           NA    0.5497193           NA   16.0667572
+#> [2551]    1.9547974           NA    0.9511589   15.4262342           NA
+#> [2556]    2.4667881           NA    1.0057802           NA    2.2017863
+#> [2561]    3.7578349    5.2645087           NA    0.7512842    2.5041356
+#> [2566]    1.8741575   11.7041502           NA   22.0120201           NA
+#> [2571]    3.6391535    2.4130566           NA           NA    1.3888769
+#> [2576]    1.4703723           NA           NA    1.5291082           NA
+#> [2581]    2.3573880           NA           NA           NA           NA
+#> [2586]    0.6399383    1.6180218           NA    2.6052721           NA
+#> [2591] 1237.6204834   19.8997154           NA   39.6545715 4069.6533203
+#> [2596]    3.8779757    2.9248793   14.3836384           NA   38.9334831
+#> [2601] 4267.4248047    6.9302726    5.0617962    4.1785703   28.3963814
+#> [2606]           NA    6.4566789    3.4296451           NA    3.7816880
+#> [2611]           NA           NA           NA           NA           NA
+#> [2616]           NA   11.0247078   27.2765732           NA           NA
+#> [2621]           NA           NA           NA           NA           NA
+#> [2626]           NA    2.2371943           NA    0.9170940    0.7460240
+#> [2631]           NA    0.8210835    1.6487689    9.5727634           NA
+#> [2636]    1.6570802           NA    0.8196399    0.8946962   13.3170853
+#> [2641]           NA   28.8410645           NA    1.4570224    0.2454604
+#> [2646]    0.6586674           NA    1.0929065    1.2879230           NA
+#> [2651]    2.9674864    0.5844296           NA   11.5823431           NA
+#> [2656]    2.6197197    0.6617230    1.0072753           NA    1.0431374
+#> [2661]    1.7980380    1.8940541    4.3480368    2.6686113           NA
+#> [2666]           NA    2.4794784    4.1561966           NA    1.2986863
+#> [2671]    1.2777241    3.0134482           NA  101.8303833    3.4352007
+#> [2676]    3.0277224   13.1016092           NA    0.5244251    1.7064619
+#> [2681]    0.3486639   50.7429390    1.7649055           NA    2.7503626
+#> [2686]           NA    0.3800137    3.3221421    3.1534879           NA
+#> [2691]   15.4715948    1.4704005    1.8855512    4.0389700    1.0823137
+#> [2696]    2.6767426    2.1071370    3.6332088           NA    0.6826217
+#> [2701]    1.0185049    3.3197520    3.8973808    6.3822713    5.1280479
+#> [2706]    8.5763950    3.2864881           NA    1.3272406    3.2673051
+#> [2711]    5.7568297    8.3966360   16.3681469    7.2476711    5.4942021
+#> [2716]    2.1211190           NA    1.5519290    3.6947889    3.6529276
+#> [2721]    7.1617284   23.2306347   20.4122696   17.6928806    5.1081491
+#> [2726]           NA  117.3710403    2.7161827   48.0717468   18.4067097
+#> [2731]    3.7467299    3.6180439   15.2693739           NA    4.7089896
+#> [2736]    2.5892634    9.7226076  139.4568787    7.4229794   11.8008423
+#> [2741]   44.5208054   10.5249119           NA    5.9375591   20.7310448
+#> [2746]  216.7257538   12.0509796   32.5807915  140.1287079   18.1983509
+#> [2751]    7.9473476           NA    4.0145078           NA    5.9600363
+#> [2756]    4.9861374   40.1272926   16.1208572   13.0407543    6.8589644
+#> [2761]           NA    4.9722199   11.0004854    7.2423544    6.4803615
+#> [2766]   14.1402922   23.9029579   15.6984034   17.9236164           NA
+#> [2771]    3.2453372    9.5185261    8.6210403    3.0081079    3.5888493
+#> [2776]    6.0433631    7.4204693   11.3490496           NA    3.6138747
+#> [2781]    1.7851294    4.3751335   38.7952423   25.8243275   20.6631317
+#> [2786]           NA    2.3311818  701.8855591  333.9076538    5.9194384
+#> [2791]    5.2374392   50.5938759    6.6050563   29.6740894           NA
+#> [2796]    6.8099937  729.9282227    4.7258272  377.9533081    3.7225027
+#> [2801]    5.8937206    8.3230190    8.7469826           NA    1.2891947
+#> [2806]    2.5859647   75.5915375    4.7863827   45.3149376    2.4862499
+#> [2811]    6.5945859    6.9634075           NA   35.3314667    3.0827610
+#> [2816]   86.5234299 1061.5833740    3.1925797   39.1028519    5.1561656
+#> [2821]  727.2340088           NA    4.6954513    4.7806416    2.0299914
+#> [2826]   67.0260162           NA           NA    8.1010742    1.6631573
+#> [2831]    1.8530455   79.0636978   30.3669281           NA    0.8927791
+#> [2836]   10.3849897    1.0268044           NA    3.1952302    0.7755960
+#> [2841]    5.7425203    7.2843447           NA    1.2209314    1.8280462
+#> [2846]    7.8098340           NA           NA           NA    3.8438480
+#> [2851]    1.6488374           NA    1.9727218   21.7567501    0.7352579
+#> [2856]           NA    1.9201657   52.0057869           NA  127.3143768
+#> [2861]    5.6821346           NA    2.5211284    2.3330369    2.1601825
+#> [2866]    9.7243500    9.3593960           NA    2.9505100    5.4880805
+#> [2871]    8.6688786    2.6024387           NA   11.9668989    2.1561337
+#> [2876]   12.3195581    1.2745084    1.9595144    5.3821392   19.5642281
+#> [2881]   16.0015182           NA    3.0178616    4.6744413   21.4054432
+#> [2886]    2.3722150   17.8877811    7.6304569   36.1747169    4.2541361
+#> [2891]           NA   33.9568787    6.3856707    2.6096203   13.1905775
+#> [2896]    2.4566786   47.8784180    6.1847539           NA   46.1483879
+#> [2901]    3.2702918    3.5770297   12.7957163    5.9115996    4.5292888
+#> [2906]    5.1561074           NA    4.0170932    3.9871593    5.1863651
+#> [2911]    1.8988326    7.9102783           NA    5.5774412 2934.2749023
+#> [2916]    1.7749847    8.5469313   16.3584347   10.1700211           NA
+#> [2921]    0.2661873    6.4565039    8.4741077           NA           NA
+#> [2926]           NA    0.1989040    0.4645469    1.7402502   29.9008598
+#> [2931]    0.5417653           NA    0.7619571    2.3052864   23.7764740
+#> [2936]    3.5269954           NA    6.3716865           NA    4.5834875
+#> [2941]    0.6944337    9.3756256           NA    0.4391756    0.4102839
+#> [2946]           NA    0.4088447    4.4651365           NA           NA
+#> [2951]    2.3560781    0.8629871    1.7296497           NA    2.3054824
+#> [2956]    0.4738956    0.8453057    0.6674856    2.9770677    0.9882508
+#> [2961]    2.5485382    1.3252913           NA    0.9046306    3.3730309
+#> [2966]           NA    1.3325157    0.8287238    3.2393219    2.8408599
+#> [2971]    1.1969875           NA    4.9852405   16.4274426    0.7676155
+#> [2976]    5.0130310           NA    2.2948136           NA    2.0398157
+#> [2981]    1.0926311           NA    1.6752559    2.0661981    0.7237425
+#> [2986]    4.8128242   11.1487827           NA    0.8632420    1.8443307
+#> [2991]           NA    0.4144078    1.5147480    2.7527251           NA
+#> [2996]   13.0752268           NA    1.8903236    7.9921408    1.5463461
+#> [3001]           NA    0.8109860    1.0667026    1.1346698           NA
+#> [3006]    3.6560605           NA    3.3797889           NA    3.5629609
+#> [3011]    3.4544880    4.5592079           NA   16.6013031           NA
+#> [3016]    4.6765566    1.6968081    1.1385404           NA    1.4192655
+#> [3021]    2.8486712    2.6313102           NA    0.6307487    2.3814776
+#> [3026]    2.7711914    0.7061450           NA    4.9312925    1.1609619
+#> [3031]    6.7711430           NA    2.8384895           NA    3.6513107
+#> [3036]           NA    3.9373784    5.0244951    9.3638000           NA
+#> [3041]   17.6887131           NA           NA           NA    8.8094635
+#> [3046]           NA           NA    4.6279211           NA    1.6137590
+#> [3051]           NA           NA           NA    0.6182525    0.8786079
+#> [3056]   15.0547085   24.5552330    7.9792995           NA   64.7950058
+#> [3061]   97.0138016    9.9027309    0.5985516           NA    1.5779028
+#> [3066]   11.9724445           NA    1.9544525           NA  163.6211090
+#> [3071]           NA    2.1614091    8.1083727           NA    2.6397953
+#> [3076]    3.5538256    7.1930056           NA    0.6664237  442.5400391
+#> [3081]    3.0430346    6.4073930    5.0266309    5.8590345   19.6998043
+#> [3086]           NA    4.3898072    1.1305788   13.5925970    7.2308283
+#> [3091]           NA    1.1136869    1.3520640    1.6164834    1.0973755
+#> [3096]    2.0894964    9.5560360           NA           NA    8.9295197
+#> [3101]  779.4788818    2.5705523  809.9169312    3.0098879   94.3604507
+#> [3106]    8.8758574           NA    3.4457500    4.9686089    1.5195554
+#> [3111]    2.1578839    4.8023272    2.1327522           NA    0.3200580
+#> [3116]   12.4226055   12.1050863 1096.2231445 1066.9301758  129.4904938
+#> [3121]    4.5963664    3.0736189           NA    8.0031509    3.2705626
+#> [3126]           NA    0.3757358   15.2121391    2.8834486   15.9752741
+#> [3131] 1346.7353516    2.6217887 1228.9621582    5.0895567           NA
+#> [3136]    2.1218104  184.3674316    4.2164469    2.8267379    6.7104831
+#> [3141]    3.8288674    3.0664554    4.4310689           NA 2268.6291504
+#> [3146] 1836.1269531    2.0746028    2.2918937   10.7542877   51.3735046
+#> [3151]    6.6448908    6.1085730           NA    1.4560728    2.8452797
+#> [3156]    3.7901433    2.0456872    1.9614782    5.3406096    6.5233908
+#> [3161]    5.8153443           NA    4.9779243    5.2980742    1.9569403
+#> [3166]           NA    3.0366473           NA    0.8441148    0.7282568
+#> [3171]    0.6270677    1.9153599    2.5157802    2.5211849           NA
+#> [3176]    1.3664742   16.0325813           NA    1.9972137    1.1040767
+#> [3181]           NA    0.9441139           NA           NA    0.9234766
+#> [3186]           NA    2.2210290    0.8783525    2.1501570           NA
+#> [3191]    8.6357822           NA    1.6162349           NA           NA
+#> [3196]    1.9563223    1.2261102    5.9679408           NA    2.4582469
+#> [3201]    3.3074541           NA    0.6635520           NA    3.4940929
+#> [3206]           NA           NA    2.6760423           NA    1.0429727
+#> [3211]    0.5086066    1.0268028    3.8812792           NA    3.5886321
+#> [3216]           NA    3.9809752    7.7894588           NA           NA
+#> [3221]    0.8405986           NA    1.1336366           NA           NA
+#> [3226]    2.8971629           NA           NA           NA           NA
+#> [3231]           NA           NA           NA    0.7070799           NA
+#> [3236]           NA           NA           NA           NA    0.7151046
+#> [3241]           NA    0.5353748    1.3802744           NA    4.1309824
+#> [3246]    4.8025975           NA    8.7120161    2.2102430   10.5090933
+#> [3251]   10.4218655           NA   22.3232746           NA   36.9990120
+#> [3256]           NA    2.9090240    2.3153019   76.6485138    2.9318345
+#> [3261]           NA    1.6010859    5.8318458    2.6627228    6.4075303
+#> [3266]    2.0914986   11.3002634           NA    1.0663972    9.0038490
+#> [3271]    7.7891731    1.4418688    4.8872490   13.7815018    7.2834721
+#> [3276]           NA    0.6722869   12.7788944   14.1886673    6.0767541
+#> [3281]   17.2682152           NA    5.8392038    3.2879653   25.1995487
+#> [3286]   27.0342846   11.1438723   38.4615974   10.6467648   20.4387722
+#> [3291]           NA    3.0112209    1.9950336   10.1919136    1.5909361
+#> [3296]    4.7708578 1141.7640381    9.8121815   22.5490570           NA
+#> [3301]    3.3931487    9.8001604    4.6790090 1271.7685547    2.8506472
+#> [3306] 1103.0401611   17.5955009    5.1776738           NA    2.9927020
+#> [3311]    2.1627703    3.1698050           NA   13.8667717 1411.4106445
+#> [3316] 1272.9426270   21.3413105           NA    0.8185354    2.8377655
+#> [3321]    2.0303440   21.7762794           NA 1345.3233643 1350.6333008
+#> [3326]    6.6278219   29.8857651           NA   52.9047775 1294.8477783
+#> [3331]   12.9526482    9.6068335   17.7135353           NA           NA
+#> [3336]           NA    2.6911139    3.7828991           NA    0.7059131
+#> [3341]    5.9516506    4.0300317    2.7630870    5.6403260           NA
+#> [3346]    7.4636693    2.0741365    5.1799192    6.4390368    9.8243055
+#> [3351]           NA    1.5092793    4.3210769           NA    1.7446249
+#> [3356]    3.4029963 2283.2792969    3.9234891    6.9994988    4.1006012
+#> [3361]           NA    0.6282611    1.8591487    4.4599166    2.1398880
+#> [3366] 2337.1853027    4.3932910    9.6464186   12.7156582           NA
+#> [3371]    0.9086848    9.3874264    3.2540348 2646.2402344    6.6778555
+#> [3376]    3.9801006   21.6677666           NA    1.3727722    2.5189867
+#> [3381]    7.1042595   10.0052004    1.5813689   23.2121410    2.8682461
+#> [3386]           NA    1.3422523    0.7672858    0.6866859    3.6084216
+#> [3391]   18.3351460           NA    0.8394666    1.9887234    1.5026515
+#> [3396]    1.3683980    5.7951837    9.8654814    2.1221330           NA
+#> [3401]    2.1047983    3.0744431    1.9053514    2.6970651    2.0816550
+#> [3406]    1.9742609    9.6418734    7.6057978           NA    3.4838214
+#> [3411]    8.8084707    6.6040335    3.2611005    9.0701380    3.0636346
+#> [3416]    1.7033354   12.7065725           NA    1.9277512   11.4872437
+#> [3421]   12.6639729    1.8488846    4.4552321    4.2770810    9.8547640
+#> [3426]    3.8485291           NA    2.1161973    2.0724041    6.0630097
+#> [3431]    2.5432432   29.9757633    3.4243822    1.5343714    7.8658175
+#> [3436]           NA    1.2879468    6.8999977    6.3626080  268.5536194
+#> [3441]    5.7748380           NA    5.2410469    2.0550699           NA
+#> [3446]    0.4435597    5.4935684    0.9196581   75.9311295    3.3142908
+#> [3451]   80.4429626    5.9293828    2.2810714           NA    2.8269784
+#> [3456]   20.1030636           NA    1.1432312    3.6678035           NA
+#> [3461]    1.0070125    3.5375540    2.9908266   22.7290974           NA
+#> [3466]    2.3943624    0.9211383    1.9665295           NA    0.8259042
+#> [3471]    0.4845653   25.3855438    3.8617392           NA    6.6030455
+#> [3476]   18.8038082           NA    0.5806934    3.3330538  101.8569031
+#> [3481]           NA   14.4165783           NA    1.7161655    7.3081284
+#> [3486]           NA    2.1098645    0.8144141    1.3382024    1.4885535
+#> [3491]           NA    0.8770674    0.6791099           NA    1.6695246
+#> [3496]           NA    1.2673935           NA    0.6891360    1.2439822
+#> [3501]    5.2793922           NA    1.2573010           NA    3.7120969
+#> [3506]    4.9950824   11.5787373    1.9612808           NA   10.3544693
+#> [3511]    6.0420938   18.6085644           NA    1.5667670    1.2138346
+#> [3516]   30.0845642   19.6141224    3.2639980           NA    3.6546156
+#> [3521]   29.6098766    2.8610103    6.0040512    1.8776323    3.8169975
+#> [3526]           NA    4.7191100    1.0195367    3.8605018    8.1590776
+#> [3531]    2.8668685   12.0980616    5.0243416    7.0915346           NA
+#> [3536]    2.7560163    6.1319265    5.5243936   46.6120872   24.7890339
+#> [3541]    6.4685655    9.1421661   10.3797007           NA   10.7507782
+#> [3546]    7.7589669   12.2742815    4.6532531    5.1379547   23.7994213
+#> [3551]   29.3476200    4.0036497           NA    7.5182543   11.9706621
+#> [3556]   63.0551071    5.1469116    8.4730129   72.0657578   10.1063595
+#> [3561]   65.6397705           NA    4.1467509   13.0881023   27.2654285
+#> [3566]   96.3133926  108.4684830   15.9769907   16.9430561   14.3318129
+#> [3571]           NA    4.6791883  126.8739243    6.6298981   18.2740936
+#> [3576]   28.1178570    8.4018116   24.9042740   22.9308643           NA
+#> [3581]    5.7845116 2804.5610352    6.1323233    7.0216298   34.0006905
+#> [3586]   11.0745640   23.1465626   26.1845646           NA   15.7390766
+#> [3591]    6.2733459   11.7022743    4.5109916    3.0380044   72.1676025
+#> [3596]   18.0594807   16.0637493           NA    8.0370464  176.6657867
+#> [3601] 2181.4362793    9.6984138 3978.9870605    8.6989155   11.3172474
+#> [3606]   39.0961494           NA 2588.9499512 3505.7983398  144.8855133
+#> [3611]    5.1680942   30.6885090    6.6054115    5.6432614    2.7389083
+#> [3616]           NA   53.9481773   62.0971260 2972.6391602  161.4343109
+#> [3621]   35.4546394   11.2379074   13.3652372   15.0986557           NA
+#> [3626]   20.7111149    9.2977657  425.2767639  216.2778320    7.9142838
+#> [3631]    5.0309882           NA    1.0399815    1.0769179    4.5379925
+#> [3636]    3.6899538    2.2575519   17.9379234           NA   22.7302589
+#> [3641]    6.5185528   19.6637669           NA    0.2854209    7.1664414
+#> [3646]    9.3295479           NA    1.1119181    1.1998634   44.4294777
+#> [3651]    6.0005445    1.2984159           NA    0.4181677    1.3962787
+#> [3656]           NA    0.8486760    0.6826237    1.3289268   41.6967010
+#> [3661]    1.6696991           NA    0.8142897    0.3997326   64.2423019
+#> [3666]           NA    4.2105532    8.1320543    0.8433636   21.3994884
+#> [3671]    0.6499675    1.6173933    2.2819724   79.2927475           NA
+#> [3676]    2.7942066    0.6122881    5.6340408    2.3877366    2.5358839
+#> [3681]           NA    1.6963638    2.8207321    1.6094570    3.0496490
+#> [3686]           NA    5.2695556    0.7497861    1.1942160           NA
+#> [3691]    2.8949137    1.8337013           NA    7.7278204    3.0212984
+#> [3696]           NA    4.6463079    1.1313710           NA    3.0398493
+#> [3701]           NA           NA           NA    1.1938435           NA
+#> [3706]    0.5559963    3.7946312           NA           NA    0.7459199
+#> [3711]    2.6556878    4.8397417           NA           NA           NA
+#> [3716]    2.1508582    4.1808691           NA    1.3044889    3.6563311
+#> [3721]           NA    5.6848607    4.3057156    4.3253880           NA
+#> [3726]   44.0154037    6.8031969           NA    1.0149941   16.5446339
+#> [3731]           NA   50.2134972    1.4178553    5.2461462           NA
+#> [3736]    6.6964250           NA    1.3668361    7.0547361   15.4979038
+#> [3741]           NA    2.5466137   12.0476017   16.9358387    4.2765665
+#> [3746]           NA    3.0282452    2.0438735    3.0750351   30.2993698
+#> [3751]    4.1311669   10.5620518           NA    6.3157725    2.0541127
+#> [3756]    6.4616790   52.7001801    6.5350013    2.7538323    5.5697684
+#> [3761]    7.0785255           NA    0.7346154    4.6684666    2.3665750
+#> [3766]    2.1643167   13.1310358   11.3682957           NA    1.0712550
+#> [3771]   12.9957743 1371.8287354    1.3735292    4.6520715   20.4687824
+#> [3776]   14.5587559           NA 1770.5562744    2.6400170   15.1324883
+#> [3781]    1.9400562    4.7408748    2.0517797   32.1368103           NA
+#> [3786]    0.9072015 1766.3382568   11.0576754    2.3649356    7.1545792
+#> [3791]    5.3592334   29.8745804           NA   99.2443008    1.9519557
+#> [3796]    3.5576828    5.4862013   19.1255341           NA    1.0205218
+#> [3801]   74.6288681    2.6257737    3.8454990    0.9508846   15.9569130
+#> [3806]           NA    3.9706428           NA    6.0614076           NA
+#> [3811]    0.9358777    0.4645265    1.3660873    2.9063818    6.6953201
+#> [3816]           NA    1.7190092    0.9622721    1.7018661   11.3596716
+#> [3821]           NA           NA    3.0443096           NA    0.6346511
+#> [3826]           NA           NA           NA   10.0340395    0.8095649
+#> [3831]    0.9709995           NA    3.2444031           NA           NA
+#> [3836]    0.5028589    2.7934396    6.8828177           NA    0.5587204
+#> [3841]    1.6042945    1.3587892           NA    0.8313419    2.4558291
+#> [3846]    1.7974735           NA    3.6726115    5.6037540    6.7877126
+#> [3851]           NA    3.6458204    0.8579472    8.0946331   12.1906815
+#> [3856]    1.5101539    6.0351577   11.0641689           NA   17.6339569
+#> [3861]    3.6026669   16.1998940    2.8316128           NA    4.9478583
+#> [3866]   27.5424156    7.0986490    3.9904847           NA    4.6039705
+#> [3871]    3.3738575   12.1051941   11.3188763   14.8368187    9.5498314
+#> [3876]           NA    1.9773377   13.8263979   23.9170589   13.4375019
+#> [3881]    9.8440132           NA   11.2628098    2.5026691   22.5849972
+#> [3886]   29.0189171   18.8118534           NA   22.0679207    4.0647068
+#> [3891]    2.0535538    1.5048116    3.3824587    2.3311884   32.8195572
+#> [3896]           NA   37.0816650    7.0685787    5.5009451    5.8517952
+#> [3901]    4.9319654    3.4151902    4.2116370    8.8043442           NA
+#> [3906] 1099.1087646    5.3256183    5.2614517  480.0812378    5.3612590
+#> [3911]   12.7172546    6.3167968   14.1994934           NA   59.6927795
+#> [3916]  964.6279297 1400.3564453  535.6882324   23.6954079   14.5343561
+#> [3921]    2.9595783   17.3649712           NA    1.0824900 1221.8245850
+#> [3926]  147.4770660  683.7954712    6.1305389    4.9751444   15.9264107
+#> [3931]   18.4570618           NA 1083.5487061  191.7899017  875.8353271
+#> [3936]  577.2622681   71.0305328    8.1075430    5.3227873   11.6976309
+#> [3941]           NA    0.4594952    1.4792782    1.6332765    4.2618947
+#> [3946]    6.4441838    2.9269114  130.0458374    5.1534815           NA
+#> [3951]    3.5288918    2.2328265    7.3872643   35.0871201  164.8385925
+#> [3956]   41.0983658           NA    3.6965251    3.6046982   34.9871025
+#> [3961]   54.6165199           NA    3.3092432    6.2893038   54.9078522
+#> [3966]           NA    4.6468277    5.5542288   52.0769882           NA
+#> [3971]    7.5430121   11.7523575   32.7870789           NA    4.3187008
+#> [3976]   22.1579170    5.4699397    1.8834021           NA    9.8157177
+#> [3981]    3.3649621   10.4119244   12.9897251           NA    3.0194745
+#> [3986]   20.3988075    9.6839437    1.9245056   27.7328892    4.6774187
+#> [3991]    2.8958423           NA    5.1254649   25.3332367   15.3362989
+#> [3996]    5.6253791    9.0580263    3.3217881   16.1069527    5.7460155
+#> [4001]           NA    9.0998583    6.4395881   27.5900745   11.9862118
+#> [4006]   10.4788322    4.7713022    7.4465909   21.6194534           NA
+#> [4011]    3.4900868   11.9859657    7.1533313   53.6382294   22.4019108
+#> [4016]    3.4466097   11.8166838   31.7925739           NA    7.1903763
+#> [4021]   22.3436050   21.0166111   11.6625166    9.6446323   11.8060122
+#> [4026]   10.7140808   20.5072823           NA    5.8385706   12.4566240
+#> [4031]   27.2418690 1374.2124023    5.0976796    8.5298624    8.9547720
+#> [4036]   14.1582394           NA    3.6345949    8.9698286  746.4771729
+#> [4041]   16.0491295   14.2799292   12.4969416   16.1063213   17.6739025
+#> [4046]           NA   13.8779955    5.8102989    4.7912970    8.5829220
+#> [4051]    7.5092740   16.8982792    8.7955656   27.1313457           NA
+#> [4056]   10.5999660  102.9700699    5.2469325   78.4538498   23.4321194
+#> [4061]   13.5085144   28.0264759   42.0644264           NA    3.0340507
+#> [4066]   16.6190434 1717.7260742    6.9299235   10.5656214   27.8841705
+#> [4071]   17.4288807   47.0360756           NA    5.2313685   49.5542450
+#> [4076]    4.6091428    7.5845995    5.1649594    5.6527944    6.7112393
+#> [4081]    7.1952438           NA    2.8361075  936.4321899   10.8392658
+#> [4086]  300.9952393    3.7918711    5.8666444    9.0892420    7.9013219
+#> [4091]           NA    5.9726405    6.4315825    6.7033081  174.0914154
+#> [4096]    9.4583406   13.8090487   25.1833706   10.3936863           NA
+#> [4101]   11.1641397    3.6089337    4.3211293    4.5236745    5.9249415
+#> [4106]   19.1762638   44.9207954 1162.3734131           NA    9.1217899
+#> [4111]    6.2500715   14.8576088    9.4355440   27.3175831   75.4738541
+#> [4116] 1927.7430420   10.6061239           NA    2.5857298    5.2106519
+#> [4121]   16.0033913   13.5474854   30.9249420 2882.4428711   37.9162636
+#> [4126]   75.5530014           NA    6.0951519    4.3891191   10.3061371
+#> [4131]    6.6429935   39.4176941   10.0774698   83.8411789   21.2222996
+#> [4136]           NA           NA    0.6372588    3.5606251    2.5927734
+#> [4141]    3.2620273    2.3674390    1.8626410    6.6079321           NA
+#> [4146]    2.4800649    6.8728633    2.8025930   10.0381966    4.8456726
+#> [4151]   89.1146164    4.3337107    3.8712926           NA   42.9793968
+#> [4156]    2.5299530    7.4297533    4.6089058           NA    3.5378845
+#> [4161]           NA    0.1817949    1.1290787    1.5784779    1.1125787
+#> [4166]           NA           NA           NA           NA    2.0033450
+#> [4171]           NA           NA           NA           NA    1.0376083
+#> [4176]    1.9011122    2.3181555           NA           NA           NA
+#> [4181]    1.6446155           NA           NA           NA    0.9089839
+#> [4186]    0.4841611           NA    0.6897894    0.7658206    0.6156495
+#> [4191]    1.4828655    2.3340645    1.1662629    0.9815852    2.3534944
+#> [4196]           NA           NA           NA    2.1499813    0.7019742
+#> [4201]    0.3516256    3.2850077    5.8242555           NA           NA
+#> [4206]    1.3007295    1.5015216    0.8093400    3.2225409    2.6426129
+#> [4211]           NA    2.3901305    2.9790335    2.9894137    5.2419791
+#> [4216]    4.8620076           NA    0.3997991    3.0470288   11.9397249
+#> [4221]    3.6320026    8.3058691    1.3834330           NA    4.1316576
+#> [4226]    3.7130520    3.9005911   16.1633472    3.6801958   12.0339565
+#> [4231]           NA    1.1500748    1.2219627    0.5826390    3.3800447
+#> [4236]    5.2994637           NA    2.6451149           NA    2.7287869
+#> [4241]    3.1930273           NA    1.8436399    2.9893756           NA
+#> [4246]    4.9069676           NA    5.8526864           NA    1.9956532
+#> [4251]    5.7515755           NA    9.3381653           NA    3.7572572
+#> [4256]           NA           NA           NA           NA           NA
+#> [4261]           NA           NA           NA           NA           NA
+#> [4266]           NA    0.4758977           NA           NA           NA
+#> [4271]           NA    0.5950958           NA    1.2651656    0.5604061
+#> [4276]           NA           NA           NA           NA           NA
+#> [4281]           NA           NA           NA           NA    1.5873302
+#> [4286]           NA           NA    1.7309831           NA    2.2026825
+#> [4291]           NA           NA           NA           NA           NA
+#> [4296]           NA           NA           NA           NA           NA
+#> [4301]           NA    0.8321332           NA           NA           NA
+#> [4306]           NA           NA           NA    3.1331923           NA
+#> [4311]           NA           NA    1.8596388           NA    4.0986276
+#> [4316]           NA    1.4462790    5.0948448           NA    3.3446779
+#> [4321]           NA   14.7490797    4.2720022    2.3573306   12.4373245
+#> [4326]    5.4349809           NA    5.5168352    7.1895194           NA
+#> [4331]    1.3353804   31.1978798    6.0550547    5.3862381           NA
+#> [4336]    2.3742425    1.6283454           NA           NA           NA
+#> [4341]    3.8663564           NA    2.5557170           NA           NA
+#> [4346]    3.9340308           NA    4.8355684           NA           NA
+#> [4351]           NA           NA    0.8258027           NA           NA
+#> [4356]    1.6850734           NA           NA    8.2018566           NA
+#> [4361]    2.8547313           NA    2.7901099           NA    1.2237481
+#> [4366]           NA    1.2317826    5.9977107           NA    2.4985216
+#> [4371]    5.4254308   10.2619724    3.6585343           NA    0.7505842
+#> [4376]    1.0290449    1.4102111   31.6295795    6.0977502    3.3116033
+#> [4381]           NA    6.6416101   13.4169693           NA    2.0772371
+#> [4386]    2.5722609    1.4239205    1.1951129   19.3541183    6.6528106
+#> [4391]    7.6534238           NA    3.3320429    3.9984677    2.1092513
+#> [4396]    8.5107756    2.7920604   28.8576584    1.6512991    2.0430546
+#> [4401]           NA    6.1738434    2.2872250    3.3046799    4.1366568
+#> [4406]    2.0184140    3.4700344    2.1820960    9.8032455           NA
+#> [4411]    9.3485680    7.2345314   20.3594875    7.5089312 1627.1451416
+#> [4416]    5.3730831    8.5319214   12.6467562           NA    6.4055276
+#> [4421]    5.4178729    3.8174756   60.1280174    6.4091296   14.2986145
+#> [4426]   13.2007456   17.6533527           NA    4.6876645 2218.6071777
+#> [4431]    5.9873571    5.4104090   13.5144920    4.3813696    8.5980825
+#> [4436]   19.0352879           NA 1989.9606934    6.5922198    8.3580027
+#> [4441]    5.7576084  341.0995483    3.3168538    9.5687895    9.9157639
+#> [4446]           NA    8.6866083  366.3923645    6.9480758   10.2027311
+#> [4451]    7.9508238   12.0425510    5.7334862    5.7009211           NA
+#> [4456]    9.3929729    4.2744284   16.8116989    3.3318050   61.5876274
+#> [4461]    3.6692767    4.6599665           NA   16.0338726   43.3646393
+#> [4466]           NA    0.4666836    1.1231649    3.3837605    5.3292937
+#> [4471]    3.6405241    9.7523746           NA    0.9140767    0.7435523
+#> [4476]    0.2535407    5.4856982   15.5203247           NA           NA
+#> [4481]    3.2470930    2.7420650           NA    0.6101449    1.0404911
+#> [4486]    2.7917345    6.6811185    2.0745556           NA    1.2540616
+#> [4491]    0.3098164    1.6586421    9.5700045           NA    0.7319268
+#> [4496]   12.7017021           NA           NA    0.6637144           NA
+#> [4501]    1.5885706    0.8827127           NA    2.1940100    3.7667232
+#> [4506]           NA    2.0905075           NA    0.6379106    2.9787626
+#> [4511]           NA           NA           NA    0.4874143           NA
+#> [4516]           NA    0.3836070           NA           NA    0.5107485
+#> [4521]           NA           NA           NA    1.1823709    1.2667042
+#> [4526]           NA   19.2034588    1.6550628    1.1661954    0.8966293
+#> [4531]           NA    3.2779715           NA   11.0150242           NA
+#> [4536]    1.6130922   26.5314026    2.5117977    2.3132839    2.2919271
+#> [4541]           NA    3.1338563    1.5114740           NA    2.0381725
+#> [4546]    5.2738991    2.9814677    3.5173035           NA    2.9813018
+#> [4551]    1.8998176           NA    7.4101906    5.3717108    4.2854128
+#> [4556]           NA    0.2399864    6.4908400    1.6760609    4.9045634
+#> [4561]    3.0678418           NA    2.1384492    9.3216219   10.4645767
+#> [4566]           NA    0.3764410    1.2218126    1.2995534    9.7801199
+#> [4571]    2.0047073   26.3789768           NA    1.0760976    0.9736537
+#> [4576]    2.0357609 1576.8568115    1.4469386    3.0481942    1.6708410
+#> [4581]           NA    0.9496741    2.6938272    1.8960530    2.1988547
+#> [4586]    1.2718045    1.2236259           NA    1.4919758    4.3979073
+#> [4591]   71.3828812    2.0391872    2.2703087    2.6103971    1.4898348
+#> [4596]           NA    1.5168892    0.8818803    1.8848048    0.6037043
+#> [4601]    1.8731611    7.1765389    1.9562593           NA   11.7375755
+#> [4606]    1.6933267    1.5986614    5.0060325    5.2257977           NA
+#> [4611]    4.1671195    4.4332304    6.8677626           NA    2.4653215
+#> [4616]    6.3500257   10.9838686    6.4111762    9.4890432    4.7053976
+#> [4621]    1.8102279    1.4213001           NA    1.6444297    1.9174886
+#> [4626]    0.4131429    1.5709261    3.1760740    1.0655589  919.2457886
+#> [4631]    1.5643872           NA    1.7901465    1.7823997    6.9229293
+#> [4636]    2.2213833           NA    0.8164910           NA    6.7707281
+#> [4641] 1034.1815186    2.8209743    0.6380021           NA    1.1908475
+#> [4646]    2.2225995           NA           NA           NA    1.8188674
+#> [4651]           NA           NA    2.1192210           NA    1.1434188
+#> [4656]           NA    1.2050375           NA           NA           NA
+#> [4661]           NA    1.7906495           NA           NA    3.5892394
+#> [4666]           NA           NA           NA           NA           NA
+#> [4671]           NA           NA           NA    0.7533023           NA
+#> [4676]           NA           NA           NA           NA           NA
+#> [4681]           NA    1.4840194    2.2305763           NA           NA
+#> [4686]           NA           NA           NA           NA           NA
+#> [4691]           NA           NA           NA           NA           NA
+#> [4696]           NA           NA           NA           NA           NA
+#> [4701]           NA           NA           NA           NA           NA
+#> [4706]           NA           NA           NA           NA           NA
+#> [4711]           NA           NA           NA           NA           NA
+#> [4716]           NA           NA           NA           NA           NA
+#> [4721]           NA    2.4143374           NA           NA           NA
+#> [4726]           NA           NA           NA           NA           NA
+#> [4731]           NA           NA           NA    1.9114826           NA
+#> [4736]    1.0137789           NA           NA    4.2369156           NA
+#> [4741]    2.1006327    2.7787836    0.9601986           NA    8.1295986
+#> [4746]    7.2806950    1.1032010           NA    2.3385823           NA
+#> [4751]    1.1522059    1.4659723    8.5681458    1.8708251           NA
+#> [4756]           NA           NA    9.6687212    5.7849174           NA
+#> [4761]           NA    2.4449232    1.6775528    4.9673247    1.8457032
+#> [4766]           NA           NA   11.6521568           NA    5.6321864
+#> [4771]    0.9540480           NA   12.1773853    0.4559720           NA
+#> [4776]           NA           NA           NA           NA           NA
+#> [4781]           NA           NA           NA           NA    0.7230437
+#> [4786]           NA    1.5481060           NA           NA           NA
+#> [4791]    1.7013626           NA    1.9925474           NA           NA
+#> [4796]           NA    4.0501847           NA    1.5732721    2.9336040
+#> [4801]           NA           NA    1.2153755    2.3473213           NA
+#> [4806]    1.6044481    3.8102901    5.9565816           NA           NA
+#> [4811]    3.5146675           NA    2.6926224           NA    4.9956584
+#> [4816]           NA    7.3882804   31.3160343    1.3993325    6.2274776
+#> [4821]           NA    2.9698203           NA    3.2010090           NA
+#> [4826]    1.3510920    5.6216455           NA           NA    3.3691561
+#> [4831]    2.7835443           NA    0.4399868    2.5057735    5.0695376
+#> [4836]           NA    0.6980689    1.8963152    8.0071716    9.3238049
+#> [4841]           NA    2.4393957    4.9562755    2.4916747           NA
+#> [4846]    1.4161593    1.7179910    2.8897645    2.1166553    2.5877254
+#> [4851]   12.7337999           NA    1.2360386    2.1893265    1.5300977
+#> [4856]    3.0833626    8.4302454           NA    4.9040179   10.9480925
+#> [4861]           NA           NA    2.1738741    3.3114023    6.0667453
+#> [4866]           NA           NA    0.6554648           NA    3.5936801
+#> [4871]    1.5739572           NA    5.1975174           NA           NA
+#> [4876]    3.9125762    9.3439398    7.9241571    3.9933949           NA
+#> [4881]    4.6318932           NA           NA    8.3959627           NA
+#> [4886]    0.7565725    2.3423707   15.7967987   12.7200508           NA
+#> [4891]           NA           NA    3.1725900   11.7995720           NA
+#> [4896]    0.9761860           NA    1.1349560           NA           NA
+#> [4901]    1.9718618           NA    4.9297872           NA    7.0475721
+#> [4906]           NA           NA           NA    2.8053823           NA
+#> [4911]   34.1454964  156.3358002           NA           NA           NA
+#> [4916]    2.1250823    4.3354549           NA   64.4767151  278.9322815
+#> [4921]           NA    0.7963252           NA    3.8422236           NA
+#> [4926]   61.7775192  190.2516785    1.4124620    1.3479694           NA
+#> [4931]    1.6552913    4.4471312  329.0337830    2.3342044    2.1571195
+#> [4936]    0.9733863    2.4092717    4.8433948           NA    2.3092387
+#> [4941]  360.7164307    3.0873225    1.7288386           NA    2.3073480
+#> [4946]    0.5996385    5.3622589 1420.7687988    7.9223099    5.6030631
+#> [4951]           NA    0.6277632    0.8355366    0.4711815    1.3496840
+#> [4956]    0.8089792    5.8526330           NA    1.8503476    0.6572140
+#> [4961]           NA  305.6041870    1.4397534           NA    0.8994330
+#> [4966]  277.0521240    2.2045338           NA           NA           NA
+#> [4971]           NA           NA           NA           NA           NA
+#> [4976]           NA    0.5602361           NA    1.2226131           NA
+#> [4981]           NA           NA           NA    1.3568290    1.7129589
+#> [4986]           NA    2.0047822    1.7247094           NA           NA
+#> [4991]           NA           NA    6.7786064           NA    2.6411271
+#> [4996]           NA           NA    1.9010485    1.7608452           NA
+#> [5001]    4.4309907           NA    3.1676409           NA           NA
+#> [5006]           NA           NA    3.3830304    4.6565275    3.3298314
+#> [5011]           NA    1.5452514           NA           NA    3.5828693
+#> [5016]           NA           NA           NA           NA    1.7718617
+#> [5021]    0.8061830           NA    1.2403909    4.6554375           NA
+#> [5026]           NA           NA           NA           NA           NA
+#> [5031]    1.6074916    3.6399906    1.1538744           NA           NA
+#> [5036]    4.6306715           NA   22.4013309           NA           NA
+#> [5041]           NA    4.1293302    6.8009396           NA   32.1985893
+#> [5046]           NA    9.7335100           NA           NA           NA
+#> [5051]           NA           NA           NA           NA           NA
+#> [5056]           NA           NA    0.5418288           NA           NA
+#> [5061]           NA           NA           NA           NA           NA
+#> [5066]           NA           NA           NA    0.5632182           NA
+#> [5071]           NA           NA    2.9177530           NA    2.1166260
+#> [5076]           NA    6.6263289           NA    2.1903484    6.9556012
+#> [5081]    3.3954957           NA    3.9068611           NA    1.8365928
+#> [5086]           NA    3.1866224    6.6193805    5.9870872           NA
+#> [5091]    2.3148339   31.7243080    1.7895136    3.5860963           NA
+#> [5096]           NA           NA    1.8591824   77.3616867           NA
+#> [5101]    3.4268165    0.5249496    1.5734435    3.8141046           NA
+#> [5106]    2.7002668           NA 1096.7601318           NA 1496.8631592
+#> [5111]    3.2043941           NA    1.8505754  587.6149292 1741.0694580
+#> [5116]           NA  885.2774048           NA   23.7601643           NA
+#> [5121]           NA           NA  594.6196899           NA           NA
+#> [5126]           NA           NA           NA    0.4923916   29.5300331
+#> [5131]           NA           NA           NA           NA           NA
+#> [5136]           NA           NA           NA           NA           NA
+#> [5141]    1.3024459           NA           NA           NA           NA
+#> [5146]           NA           NA           NA           NA           NA
+#> [5151]           NA           NA    0.7680741           NA    0.8888112
+#> [5156]           NA           NA    2.1178827    1.4857029           NA
+#> [5161]    1.1276029    1.3496284    2.1555452           NA           NA
+#> [5166]           NA    2.1827545    1.2788655           NA           NA
+#> [5171]           NA           NA    1.2924441           NA    0.9934639
+#> [5176]           NA           NA           NA           NA    5.3240347
+#> [5181]    1.0079803    1.3528888           NA           NA           NA
+#> [5186]           NA           NA   10.8723679           NA           NA
+#> [5191]           NA           NA           NA           NA    1.9321351
+#> [5196]           NA           NA           NA           NA    2.5913424
+#> [5201]           NA           NA           NA           NA    2.0170100
+#> [5206]    2.6124203           NA           NA           NA   25.0653572
+#> [5211]    0.7242321           NA           NA           NA           NA
+#> [5216]           NA           NA           NA           NA           NA
+#> [5221]    2.9123745           NA    1.8755200           NA    5.4409308
+#> [5226]           NA    1.6049031           NA    4.8650875    3.9305305
+#> [5231]    2.3677256    2.1769772           NA    6.9278378    0.9471752
+#> [5236]   11.2096748    8.1439409           NA    7.7992425    8.1538477
+#> [5241]    7.7033796           NA   15.1453743   31.8052731   18.0042858
+#> [5246]           NA    1.2677478    5.5277863    2.1457639           NA
+#> [5251]    3.4404881    6.6042099           NA    4.3178186   10.6584396
+#> [5256]    4.6253743           NA    4.4684582    9.8839989           NA
+#> [5261]    0.4913557           NA    4.2288108           NA    2.3422270
+#> [5266]  220.2428894   76.3024292    2.4397397           NA    0.7708665
+#> [5271]    0.5308517  153.5867767           NA    0.7601256           NA
+#> [5276]    5.8568654    3.3581190    1.1768376           NA    1.9733516
+#> [5281]    8.9577475           NA           NA    1.6991717           NA
+#> [5286]           NA           NA           NA           NA           NA
+#> [5291]    0.6544989    0.8063468           NA           NA    0.5237735
+#> [5296]           NA    1.2291242           NA           NA           NA
+#> [5301]    0.4108943   11.5966806           NA           NA           NA
+#> [5306]           NA    1.5359516           NA           NA           NA
+#> [5311]           NA           NA           NA           NA           NA
+#> [5316]    0.5914992           NA           NA           NA           NA
+#> [5321]           NA           NA    1.5501552           NA           NA
+#> [5326]           NA           NA           NA           NA           NA
+#> [5331]    0.4674177           NA           NA           NA           NA
+#> [5336]           NA    1.4722780           NA   10.3540297   12.8971653
+#> [5341]   76.4729843    3.3384745           NA           NA           NA
+#> [5346]           NA           NA           NA           NA           NA
+#> [5351]           NA           NA           NA           NA           NA
+#> [5356]           NA           NA           NA           NA           NA
+#> [5361]           NA    8.8360243           NA    0.8269219           NA
+#> [5366]           NA           NA           NA           NA           NA
+#> [5371]           NA           NA           NA    0.8899398    6.1822929
+#> [5376]    1.4949089           NA           NA           NA           NA
+#> [5381]           NA           NA           NA           NA           NA
+#> [5386]           NA           NA    6.1136923   45.9732246    1.8630898
+#> [5391]           NA           NA           NA           NA           NA
+#> [5396]           NA           NA           NA           NA           NA
+#> [5401]           NA           NA           NA           NA           NA
+#> [5406]           NA           NA           NA           NA           NA
+#> [5411]           NA           NA           NA    0.4607324           NA
+#> [5416]           NA           NA           NA           NA           NA
+#> [5421]           NA           NA    2.4314377           NA           NA
+#> [5426]           NA           NA           NA           NA           NA
+#> [5431]           NA           NA           NA           NA           NA
+#> [5436]           NA           NA           NA           NA           NA
+#> [5441]           NA           NA           NA           NA           NA
+#> [5446]           NA           NA           NA           NA           NA
+#> [5451]           NA           NA           NA           NA    0.3267280
+#> [5456]    7.7629838           NA           NA           NA           NA
+#> [5461]           NA    0.9005343           NA           NA           NA
+#> [5466]           NA    6.4958630    0.6801585    1.1879852           NA
+#> [5471]   13.1560583           NA           NA           NA           NA
+#> [5476]           NA    2.3879337           NA           NA           NA
+#> [5481]           NA           NA           NA           NA           NA
+#> [5486]           NA           NA           NA           NA           NA
+#> [5491]           NA           NA    0.7733446           NA    1.1475980
+#> [5496]           NA    3.0229218   14.0746317           NA           NA
+#> [5501]           NA           NA           NA           NA           NA
+#> [5506]           NA           NA           NA    0.5247985           NA
+#> [5511]           NA           NA           NA           NA           NA
+#> [5516]           NA           NA           NA           NA    1.2050325
+#> [5521]    9.2619877           NA    0.7634576           NA           NA
+#> [5526]           NA           NA           NA           NA           NA
+#> [5531]           NA           NA           NA    1.0241749    1.0909539
+#> [5536]    5.3293109           NA           NA           NA           NA
+#> [5541]           NA    2.7063551           NA    3.4095821           NA
+#> [5546]           NA           NA           NA           NA           NA
+#> [5551]           NA           NA           NA    0.6897098           NA
+#> [5556]           NA           NA           NA           NA           NA
+#> [5561]    1.0274373           NA           NA           NA           NA
+#> [5566]           NA           NA           NA           NA           NA
+#> [5571]           NA           NA           NA           NA    0.8178927
+#> [5576]           NA           NA           NA           NA           NA
+#> [5581]    1.5089374    0.7430726           NA    1.1275156           NA
+#> [5586]           NA           NA           NA           NA           NA
+#> [5591]           NA           NA           NA           NA           NA
+#> [5596]           NA           NA           NA           NA           NA
+#> [5601]           NA           NA           NA           NA           NA
+#> [5606]   21.9422588    1.3811653           NA    3.5942285           NA
+#> [5611]           NA    1.6271605           NA           NA           NA
+#> [5616]           NA           NA           NA           NA           NA
+#> [5621]           NA           NA           NA           NA           NA
+#> [5626]    2.1611414           NA           NA           NA           NA
+#> [5631]           NA    0.8879982           NA    0.8763292           NA
+#> [5636]           NA           NA           NA    1.7225560   13.2923336
+#> [5641]           NA           NA           NA           NA           NA
+#> [5646]           NA           NA           NA           NA           NA
+#> [5651]           NA           NA           NA           NA           NA
+#> [5656]           NA           NA           NA           NA           NA
+#> [5661]    3.3895564   21.7352753           NA           NA           NA
+#> [5666]           NA           NA           NA           NA           NA
+#> [5671]           NA           NA           NA           NA           NA
+#> [5676]           NA           NA           NA           NA           NA
+#> [5681]           NA           NA           NA           NA           NA
+#> [5686]           NA           NA           NA           NA    0.4632308
+#> [5691]           NA           NA           NA    1.5177442           NA
+#> [5696]           NA           NA           NA           NA           NA
+#> [5701]    1.9604896           NA           NA           NA           NA
+#> [5706]           NA           NA           NA    5.8416729           NA
+#> [5711]    0.6393901    2.9566762    0.3774208           NA           NA
+#> [5716]           NA           NA           NA           NA           NA
+#> [5721]           NA    1.6599923    3.0378304           NA           NA
+#> [5726]           NA           NA           NA    2.7158394           NA
+#> [5731]           NA           NA           NA           NA           NA
+#> [5736]           NA           NA           NA           NA           NA
+#> [5741]           NA           NA           NA           NA           NA
+#> [5746]           NA           NA           NA           NA           NA
+#> [5751]           NA           NA           NA           NA           NA
+#> [5756]           NA           NA           NA           NA           NA
+#> [5761]           NA    0.6954392           NA           NA           NA
+#> [5766]    1.9243698           NA           NA           NA           NA
+#> [5771]           NA           NA           NA    1.4208319           NA
+#> [5776]           NA           NA           NA    0.3644979           NA
+#> [5781]           NA           NA           NA           NA           NA
+#> [5786]           NA           NA           NA           NA           NA
+#> [5791]           NA           NA           NA           NA           NA
+#> [5796]           NA           NA           NA           NA    0.9764859
+#> [5801]           NA           NA           NA           NA           NA
+#> [5806]           NA           NA           NA    1.7312529    1.9927244
+#> [5811]    8.3358564           NA           NA           NA           NA
+#> [5816]           NA           NA           NA           NA           NA
+#> [5821]           NA           NA           NA           NA           NA
+#> [5826]           NA           NA           NA           NA           NA
+#> [5831]           NA           NA    0.3344689           NA           NA
+#> [5836]           NA    1.5944563           NA           NA           NA
+#> [5841]           NA           NA           NA           NA           NA
+#> [5846]    1.4439087    2.7181752           NA           NA           NA
+#> [5851]           NA    0.9094949    1.2030648           NA           NA
+#> [5856]           NA           NA           NA    2.7429266    6.6508756
+#> [5861]           NA           NA           NA           NA           NA
+#> [5866]           NA           NA           NA    2.8126271    3.6208489
+#> [5871]    6.5295534           NA    0.3424659           NA           NA
+#> [5876]           NA           NA           NA           NA           NA
+#> [5881]           NA           NA           NA           NA           NA
+#> [5886]    0.5115961    0.5035965           NA           NA           NA
+#> [5891]           NA           NA           NA           NA           NA
+#> [5896]           NA           NA           NA           NA           NA
+#> [5901]           NA           NA           NA           NA           NA
+#> [5906]           NA           NA           NA           NA           NA
+#> [5911]    1.0872059           NA           NA    1.5785052           NA
+#> [5916]    0.2461324           NA           NA           NA           NA
+#> [5921]           NA           NA    1.9896445           NA           NA
+#> [5926]           NA           NA           NA           NA    0.8427312
+#> [5931]    0.7660883           NA           NA           NA           NA
+#> [5936]           NA    2.3450923    2.4805903           NA           NA
+#> [5941]           NA           NA    0.8671566           NA           NA
+#> [5946]           NA    0.6639645           NA           NA           NA
+#> [5951]           NA           NA           NA           NA           NA
+#> [5956]           NA           NA           NA    0.5334827    0.4702013
+#> [5961]           NA           NA           NA           NA           NA
+#> [5966]           NA           NA    3.1127882   64.2761841    5.7723532
+#> [5971]           NA           NA           NA           NA           NA
+#> [5976]           NA           NA           NA           NA           NA
+#> [5981]    0.9449326           NA           NA           NA    9.8559513
+#> [5986]           NA    1.5376849           NA           NA           NA
+#> [5991]    0.6502208           NA    0.8867813    0.9406697           NA
+#> [5996]           NA           NA           NA           NA           NA
+#> [6001]           NA           NA           NA           NA           NA
+#> [6006]           NA    2.6839008           NA    3.2349586   26.2348919
+#> [6011]    2.3463531           NA    0.7232664    0.5971866           NA
+#> [6016]           NA           NA           NA           NA           NA
+#> [6021]    2.7867749    1.2694967           NA    5.0291767           NA
+#> [6026]           NA           NA           NA           NA           NA
+#> [6031]           NA           NA           NA           NA           NA
+#> [6036]           NA           NA           NA           NA           NA
+#> [6041]           NA           NA           NA    1.4869373           NA
+#> [6046]    1.9182748           NA           NA           NA           NA
+#> [6051]           NA           NA           NA    0.8268527    4.4961567
+#> [6056]           NA           NA    0.4737805           NA           NA
+#> [6061]           NA           NA           NA           NA           NA
+#> [6066]           NA           NA           NA    2.8711464           NA
+#> [6071]           NA           NA           NA           NA           NA
+#> [6076]    3.6332841           NA    1.5385498           NA           NA
+#> [6081]           NA    4.7165794           NA           NA           NA
+#> [6086]           NA           NA           NA           NA           NA
+#> [6091]    1.2112534           NA           NA           NA           NA
+#> [6096]           NA           NA    2.5973957    4.9447703           NA
+#> [6101]           NA           NA           NA           NA           NA
+#> [6106]           NA           NA           NA    0.9545295           NA
+#> [6111]           NA           NA           NA    1.4072028    1.8630619
+#> [6116]    1.4024746           NA           NA           NA           NA
+#> [6121]           NA           NA           NA           NA    0.5282810
+#> [6126]    1.8168713    4.9301190           NA           NA           NA
+#> [6131]           NA           NA           NA           NA           NA
+#> [6136]           NA           NA           NA           NA           NA
+#> [6141]           NA           NA           NA           NA           NA
+#> [6146]           NA           NA           NA           NA           NA
+#> [6151]           NA    0.1499837    0.7057289           NA           NA
+#> [6156]           NA           NA           NA           NA           NA
+#> [6161]           NA    1.6758749    1.9225767           NA           NA
+#> [6166]           NA           NA           NA    0.6456749    1.0736265
+#> [6171]    0.6631852           NA           NA           NA           NA
+#> [6176]           NA           NA           NA           NA           NA
+#> [6181]           NA           NA           NA           NA           NA
+#> [6186]           NA           NA           NA           NA           NA
+#> [6191]    2.0254166    0.8686433           NA           NA           NA
+#> [6196]           NA    2.9635856           NA           NA           NA
+#> [6201]           NA           NA           NA           NA           NA
+#> [6206]           NA           NA           NA           NA    2.8306408
+#> [6211]    0.6591658           NA    1.8536581           NA    0.7700182
+#> [6216]           NA           NA           NA           NA           NA
+#> [6221]           NA    0.6434809           NA           NA    3.0102704
+#> [6226]           NA    0.6942499    2.7054408           NA           NA
+#> [6231]           NA           NA           NA    6.5840912           NA
+#> [6236]           NA           NA           NA    0.4648814           NA
+#> [6241]    2.2047083           NA           NA           NA           NA
+#> [6246]           NA    0.8025916           NA           NA    0.9868059
+#> [6251]           NA           NA    0.9812470    1.6068337           NA
+#> [6256]           NA           NA           NA    1.6466388    0.6577185
+#> [6261]    3.3152702           NA           NA           NA           NA
+#> [6266]           NA           NA           NA           NA           NA
+#> [6271]           NA    0.3456087    1.4819642    1.6930362           NA
+#> [6276]           NA           NA           NA           NA    0.6172115
+#> [6281]           NA    4.8450933   10.5450792   48.2902794    0.6500265
+#> [6286]           NA           NA           NA           NA           NA
+#> [6291]           NA           NA           NA    0.6208660           NA
+#> [6296]    0.6039580           NA           NA    0.9597225           NA
+#> [6301]           NA           NA           NA           NA           NA
+#> [6306]    0.3537683           NA           NA           NA    0.8526208
+#> [6311]           NA           NA           NA           NA           NA
+#> [6316]           NA    0.2884314    0.8374825           NA           NA
+#> [6321]           NA           NA           NA           NA           NA
+#> [6326]           NA           NA    1.8498940           NA           NA
+#> [6331]           NA           NA           NA           NA           NA
+#> [6336]           NA    2.6492484           NA    0.8956540    1.2795352
+#> [6341]    3.1287794           NA           NA           NA           NA
+#> [6346]           NA    2.0273194           NA           NA           NA
+#> [6351]           NA    3.7718840    1.8026490           NA           NA
+#> [6356]           NA           NA           NA           NA    0.7220110
+#> [6361]           NA           NA           NA    0.7175305    4.3183942
+#> [6366]           NA           NA           NA           NA           NA
+#> [6371]           NA           NA           NA           NA    1.4981960
+#> [6376]           NA           NA           NA           NA           NA
+#> [6381]           NA           NA           NA           NA           NA
+#> [6386]           NA           NA    0.2836370           NA    0.8527241
+#> [6391]    3.5981882           NA           NA           NA           NA
+#> [6396]           NA           NA           NA           NA           NA
+#> [6401]    0.3067524           NA           NA           NA           NA
+#> [6406]    1.3901409           NA           NA           NA           NA
+#> [6411]           NA           NA           NA           NA           NA
+#> [6416]           NA           NA           NA           NA    2.7463164
+#> [6421]           NA           NA           NA           NA    2.1976302
+#> [6426]           NA    0.2309106           NA    0.2099868           NA
+#> [6431]           NA           NA           NA           NA           NA
+#> [6436]           NA    0.8203602           NA    1.9904572    4.0084724
+#> [6441]           NA           NA    0.5368133           NA           NA
+#> [6446]           NA           NA    0.4482878    1.4325606           NA
+#> [6451]           NA           NA           NA    2.3086529           NA
+#> [6456]           NA           NA           NA           NA    0.4549935
+#> [6461]           NA           NA           NA           NA           NA
+#> [6466]           NA           NA           NA           NA           NA
+#> [6471]           NA           NA           NA    3.1426587    1.3987031
+#> [6476]           NA           NA           NA           NA           NA
+#> [6481]           NA           NA           NA    0.4663780           NA
+#> [6486]           NA           NA    2.3534548           NA           NA
+#> [6491]           NA           NA           NA           NA           NA
+#> [6496]           NA           NA           NA           NA           NA
+#> [6501]           NA           NA           NA           NA           NA
+#> [6506]           NA           NA           NA           NA           NA
+#> [6511]           NA           NA           NA           NA           NA
+#> [6516]           NA           NA           NA           NA           NA
+#> [6521]           NA           NA           NA           NA           NA
+#> [6526]           NA           NA           NA    3.8060784           NA
+#> [6531]           NA           NA           NA           NA           NA
+#> [6536]    0.4556686           NA           NA           NA           NA
+#> [6541]           NA           NA           NA           NA           NA
+#> [6546]           NA           NA           NA           NA           NA
+#> [6551]           NA    1.3394214           NA    1.1004189           NA
+#> [6556]           NA           NA           NA           NA           NA
+#> [6561]           NA           NA           NA           NA    2.4211915
+#> [6566]           NA    3.3820996           NA           NA           NA
+#> [6571]           NA           NA           NA           NA           NA
+#> [6576]           NA           NA           NA           NA           NA
+#> [6581]           NA           NA           NA           NA           NA
+#> [6586]           NA   31.4883842           NA           NA           NA
+#> [6591]           NA           NA           NA           NA           NA
+#> [6596]    0.7637222           NA           NA           NA           NA
+#> [6601]           NA           NA           NA           NA    2.0601268
+#> [6606]           NA    0.7897440           NA           NA           NA
+#> [6611]    1.1024669           NA           NA    1.4127746           NA
+#> [6616]           NA           NA           NA           NA           NA
+#> [6621]           NA           NA           NA           NA           NA
+#> [6626]    0.7815835           NA           NA           NA           NA
+#> [6631]           NA           NA           NA           NA           NA
+#> [6636]           NA           NA           NA    0.3922873    2.3492901
+#> [6641]           NA    1.7412961           NA           NA           NA
+#> [6646]           NA           NA    1.0913932           NA           NA
+#> [6651]           NA           NA           NA           NA           NA
+#> [6656]           NA           NA           NA           NA           NA
+#> [6661]           NA    2.1832561    5.6013675           NA    0.5410951
+#> [6666]           NA           NA           NA           NA           NA
+#> [6671]           NA           NA           NA           NA           NA
+#> [6676]           NA           NA           NA           NA           NA
+#> [6681]           NA           NA           NA           NA           NA
+#> [6686]           NA           NA           NA           NA           NA
+#> [6691]           NA           NA           NA           NA    1.5191215
+#> [6696]    8.5703373           NA           NA           NA           NA
+#> [6701]           NA           NA           NA           NA           NA
+#> [6706]           NA    1.4032021           NA           NA           NA
+#> [6711]           NA           NA           NA           NA           NA
+#> [6716]           NA           NA           NA           NA           NA
+#> [6721]           NA           NA           NA           NA           NA
+#> [6726]           NA           NA           NA    2.8650708           NA
+#> [6731]    1.6290002           NA           NA           NA           NA
+#> [6736]           NA    0.6252948           NA           NA           NA
+#> [6741]    2.6510727    5.6316738           NA           NA           NA
+#> [6746]           NA           NA           NA           NA           NA
+#> [6751]    0.6707575    1.2557933    2.8557181           NA           NA
+#> [6756]           NA           NA           NA           NA           NA
+#> [6761]           NA           NA           NA           NA           NA
+#> [6766]           NA           NA           NA           NA    6.8578634
+#> [6771]           NA    0.6140221           NA           NA           NA
+#> [6776]           NA           NA           NA    4.2484360           NA
+#> [6781]    0.6619285    1.2980875    3.2068131           NA    1.3282340
+#> [6786]           NA           NA           NA           NA           NA
+#> [6791]           NA    1.5175761           NA           NA           NA
+#> [6796]           NA           NA           NA           NA           NA
+#> [6801]    2.3767309           NA    0.8093471           NA           NA
+#> [6806]           NA           NA           NA           NA           NA
+#> [6811]    0.6040459           NA           NA           NA           NA
+#> [6816]    0.6218860           NA           NA           NA           NA
+#> [6821]           NA           NA           NA           NA           NA
+#> [6826]           NA    1.4518211           NA           NA           NA
+#> [6831]           NA           NA           NA    1.7191668           NA
+#> [6836]    1.9510572           NA           NA           NA    0.3967183
+#> [6841]           NA           NA           NA           NA           NA
+#> [6846]    1.0216656           NA    3.4807718   12.6569872           NA
+#> [6851]    1.2336719   11.7144327    0.6784623           NA           NA
+#> [6856]           NA           NA           NA           NA           NA
+#> [6861]           NA           NA           NA           NA           NA
+#> [6866]           NA           NA           NA    1.0983104    0.8703533
+#> [6871]           NA           NA           NA    0.9070129           NA
+#> [6876]           NA           NA           NA    2.6424198           NA
+#> [6881]           NA           NA           NA           NA           NA
+#> [6886]           NA           NA           NA           NA           NA
+#> [6891]           NA           NA           NA           NA           NA
+#> [6896]           NA           NA           NA           NA           NA
+#> [6901]           NA           NA           NA    1.1471686           NA
+#> [6906]    0.9019348           NA           NA           NA           NA
+#> [6911]           NA    2.5049481   11.4490557           NA    0.5566154
+#> [6916]           NA           NA           NA           NA           NA
+#> [6921]           NA           NA           NA           NA           NA
+#> [6926]           NA    1.9753987           NA           NA           NA
+#> [6931]           NA           NA    2.3320930    3.7091351    2.4257834
+#> [6936]           NA           NA           NA    0.7362632           NA
+#> [6941]           NA           NA           NA    0.8419358           NA
+#> [6946]    3.9386895           NA           NA           NA           NA
+#> [6951]    0.9128963           NA           NA           NA           NA
+#> [6956]           NA           NA           NA           NA    1.6723500
+#> [6961]           NA           NA           NA           NA           NA
+#> [6966]    1.3298150           NA           NA           NA           NA
+#> [6971]           NA           NA           NA           NA           NA
+#> [6976]           NA           NA           NA           NA           NA
+#> [6981]           NA           NA           NA           NA           NA
+#> [6986]    0.6335756           NA           NA           NA           NA
+#> [6991]           NA           NA           NA           NA           NA
+#> [6996]           NA           NA           NA           NA    0.6562991
+#> [7001]           NA           NA           NA    3.2722898           NA
+#> [7006]           NA           NA           NA           NA           NA
+#> [7011]    2.3044112           NA           NA           NA           NA
+#> [7016]           NA    1.4757828           NA           NA           NA
+#> [7021]           NA           NA           NA           NA           NA
+#> [7026]           NA           NA           NA           NA    8.4148054
+#> [7031]           NA    0.3076566    1.2632453    0.8317384    6.0139632
+#> [7036]    2.7857358           NA    1.4718702           NA           NA
+#> [7041]           NA    2.8902125           NA           NA           NA
+#> [7046]    3.4636676           NA           NA           NA           NA
+#> [7051]           NA           NA           NA           NA           NA
+#> [7056]    2.9858587           NA           NA    1.1537194    6.6131492
+#> [7061]           NA           NA           NA           NA           NA
+#> [7066]    0.2267639    0.5474497    0.4946014           NA           NA
+#> [7071]           NA    1.2936714           NA           NA           NA
+#> [7076]           NA           NA           NA           NA           NA
+#> [7081]           NA           NA           NA           NA           NA
+#> [7086]           NA           NA           NA           NA           NA
+#> [7091]           NA           NA           NA           NA           NA
+#> [7096]           NA           NA           NA           NA           NA
+#> [7101]           NA           NA           NA           NA    1.6368855
+#> [7106]    0.9594902    1.4098917           NA           NA           NA
+#> [7111]           NA           NA    0.7878828           NA           NA
+#> [7116]           NA           NA           NA    0.6673341           NA
+#> [7121]           NA           NA           NA    3.1816411           NA
+#> [7126]           NA           NA           NA           NA           NA
+#> [7131]           NA           NA    1.2840652           NA    2.6560736
+#> [7136]   19.9554462           NA           NA           NA           NA
+#> [7141]           NA           NA           NA           NA           NA
+#> [7146]           NA           NA           NA    1.0239617           NA
+#> [7151]    1.8550906    2.3586714           NA           NA           NA
+#> [7156]           NA           NA           NA           NA           NA
+#> [7161]           NA           NA           NA           NA           NA
+#> [7166]           NA           NA           NA    0.4221451           NA
+#> [7171]           NA           NA           NA           NA           NA
+#> [7176]           NA           NA           NA           NA           NA
+#> [7181]           NA           NA           NA           NA           NA
+#> [7186]           NA           NA           NA    2.8507216    3.4885705
+#> [7191]    7.3413062           NA           NA           NA           NA
+#> [7196]           NA           NA           NA           NA           NA
+#> [7201]           NA           NA   35.7378654           NA    1.4843854
+#> [7206]    0.8229836           NA    1.9679027           NA           NA
+#> [7211]           NA           NA           NA           NA           NA
+#> [7216]           NA           NA           NA           NA           NA
+#> [7221]           NA           NA           NA           NA           NA
+#> [7226]           NA           NA           NA           NA           NA
+#> [7231]    0.9418428           NA    2.5392017           NA           NA
+#> [7236]           NA           NA           NA           NA           NA
+#> [7241]           NA           NA           NA           NA           NA
+#> [7246]           NA           NA           NA           NA           NA
+#> [7251]           NA           NA           NA           NA           NA
+#> [7256]    0.9196062           NA           NA           NA    4.2101269
+#> [7261]           NA           NA           NA    0.8723121           NA
+#> [7266]    1.1009536           NA    2.2867596    5.5058069           NA
+#> [7271]           NA           NA           NA           NA           NA
+#> [7276]           NA           NA    1.2713206           NA           NA
+#> [7281]           NA           NA           NA           NA           NA
+#> [7286]           NA    2.4941492           NA           NA           NA
+#> [7291]           NA           NA           NA           NA           NA
+#> [7296]           NA           NA    1.5185130    2.7117639           NA
+#> [7301]           NA           NA           NA           NA           NA
+#> [7306]           NA           NA           NA           NA           NA
+#> [7311]           NA           NA           NA           NA           NA
+#> [7316]           NA    4.5919437    5.1406364           NA    2.8025935
+#> [7321]    5.8709002   13.7791338   14.5640020    4.8297606    7.8658409
+#> [7326]    6.8229294   27.7137413           NA    5.3379407   14.4617805
+#> [7331]    4.4964433   16.1921463   10.2128115    4.2068844   10.3527794
+#> [7336]   30.8382893           NA    6.8301725    9.5161114   46.6889000
+#> [7341]    5.9609809   13.2284927    7.8532238   36.7056198    8.2213917
+#> [7346]           NA    7.4940300   11.8976650   13.4008360   19.2198009
+#> [7351]    2.2085142   16.2607841   27.6975002   84.5502777           NA
+#> [7356]    8.9375477   17.9089260   15.0652647    9.7659874   20.4718914
+#> [7361]   10.5261488  102.4522476   17.9931507           NA   11.4199753
+#> [7366]   19.1676826   17.0927010   24.3487606    6.6103988    8.1302404
+#> [7371]    9.6394157   30.0782166           NA   10.6189022    3.9972832
+#> [7376]   13.7391968   28.9560966    6.7734051    8.2172832   10.3078299
+#> [7381]   20.1655922           NA   18.3504696    2.8396056   27.5377102
+#> [7386]    4.3330150    4.9756093    8.2070942    2.5828452    7.6423254
+#> [7391]           NA    7.4956326    3.3020027    8.2716713   10.5372095
+#> [7396]    5.9630933    5.2237558    9.0436430    7.9005804           NA
+#> [7401]    4.6265149    4.5348096   14.0217648   11.7508678    5.1471868
+#> [7406]   11.1270819    7.9933724   12.3714352           NA           NA
+#> [7411]    9.6415024    1.0363822    2.1618273    2.2038519   16.1064682
+#> [7416]    6.1964874    5.3220701           NA    1.6039859   98.4771194
+#> [7421]    4.0282149    2.6477625   16.8007278    3.5877471    2.6565950
+#> [7426]    5.3537140           NA   39.1409950    3.9032741   51.0578613
+#> [7431]   14.7823324           NA   23.7130947   41.8512573   27.0040703
+#> [7436]    8.8542757   40.3777084   36.5384369    6.2642756   10.2587223
+#> [7441]           NA   25.8907166   44.1283989   16.7547779    1.5664260
+#> [7446]   36.2730598   45.0348854    5.4926982    9.8852091           NA
+#> [7451]   38.9618721   45.9797630           NA    3.3837142           NA
+#> [7456]    1.5297805    2.0968738           NA    4.4807029           NA
+#> [7461]           NA           NA    0.6716859           NA    4.6078916
+#> [7466]    2.3965619    0.9893416           NA           NA    1.2310627
+#> [7471]           NA    5.1445694    1.9888287           NA    0.6328241
+#> [7476]    0.5137627           NA    5.9770460    0.9208446           NA
+#> [7481]           NA    1.4403317           NA           NA           NA
+#> [7486]    4.3081975    0.9803630    0.8477652    0.4548255   11.3158970
+#> [7491]    1.3294666           NA           NA           NA    1.6702332
+#> [7496]           NA    4.7679958    0.8518687    1.8222345    2.7682319
+#> [7501]           NA           NA           NA           NA           NA
+#> [7506]           NA           NA           NA           NA           NA
+#> [7511]           NA           NA           NA    4.0749702           NA
+#> [7516]    0.4489682           NA           NA           NA           NA
+#> [7521]           NA           NA           NA           NA           NA
+#> [7526]           NA           NA           NA           NA           NA
+#> [7531]           NA           NA           NA    0.6329405    1.6010697
+#> [7536]           NA           NA           NA           NA           NA
+#> [7541]           NA           NA           NA           NA           NA
+#> [7546]           NA           NA           NA           NA           NA
+#> [7551]    0.1622699    0.8471114           NA    0.4407594           NA
+#> [7556]           NA           NA           NA           NA           NA
+#> [7561]           NA           NA           NA           NA           NA
+#> [7566]    1.1682943           NA    1.4405993           NA    2.0458810
+#> [7571]    6.8692994           NA           NA           NA    2.7137775
+#> [7576]           NA    1.1100407           NA           NA           NA
+#> [7581]           NA           NA           NA           NA           NA
+#> [7586]           NA           NA           NA           NA           NA
+#> [7591]    0.3899231           NA           NA           NA           NA
+#> [7596]           NA           NA           NA           NA           NA
+#> [7601]           NA           NA
+
+## We can replace the precursor intensity values of the originating
+## object:
+sps_dda$precursorIntensity <- pi
+sps_dda |>
+    filterMsLevel(2L) |>
+    precursorIntensity()
+#>    [1]    0.2562894    0.6533012           NA    0.9115737    2.0881963
+#>    [6]    0.4161463    1.6393325    1.9403350    0.2138104    2.2869656
+#>   [11]    0.3581794    1.2965702    7.1932635    1.7952728    1.7991002
+#>   [16]    4.6187558    2.3082116    2.1572299    7.6883049    0.6671617
+#>   [21]    1.3682123    1.7227559    0.8182324    1.3030148    0.4186687
+#>   [26]    0.4893252           NA           NA    0.6470237           NA
+#>   [31]    1.2660308    0.3448766    1.0501561    1.0818608    0.1523102
+#>   [36]    1.6358998    1.0994979    2.0477426    0.9073558    0.5244763
+#>   [41]    2.2316427    2.6152663    1.7466167    1.7643924    1.0328368
+#>   [46]    2.0097375    0.3149102    0.5953222    0.8350294    1.0704968
+#>   [51]    1.3077880    1.5747164    0.3147899    0.4084390    0.4539037
+#>   [56]    0.9779218    2.4162381    6.3833795    2.8862731    1.2910393
+#>   [61]   10.6581869    1.4951602    3.7959058    2.8722730    2.4529448
+#>   [66]    5.3233647    3.5772564    4.4303422    2.9447591    2.1176453
+#>   [71]    5.0967083    3.3420610    2.4258153    0.8650878    7.3779054
+#>   [76]    6.8362355    2.1940181    0.7469152    2.0079441    6.3011317
+#>   [81]   10.4023485    3.3065796    2.3813672    1.3428380    4.0137057
+#>   [86]    1.4098256    2.4288177    1.3962808    7.4319925   20.5047512
+#>   [91]    0.9047846    1.3858606    2.8306339    3.7321482    2.8828564
+#>   [96]    5.5602937  115.1193542    2.0473588    4.9510341  118.5648346
+#>  [101]    2.0066054    2.9266124    2.4156189    4.2713437           NA
+#>  [106]    0.2551613    2.6899714    5.8423100   11.0782356    0.8772338
+#>  [111]    2.3091309    3.4256361    3.7716985    1.5463245    1.8332181
+#>  [116]    1.1230040    3.6158812    1.1808953    1.2916937    3.6537952
+#>  [121]    1.9253193    6.6556292    2.8096755    0.4722714    1.5738993
+#>  [126]    3.1981614    2.3436296    1.1402670    4.2488189    5.5579276
+#>  [131]    1.3360999    1.4311922  165.9235382    1.0471303    2.2803576
+#>  [136]    2.3772638    1.4516939    2.6042576    1.4513292  110.1937103
+#>  [141]    1.6985731    7.4143949    2.9037418    4.3727541    2.5551207
+#>  [146]    3.4643288    3.0462031    5.5572038    5.8211880    3.4240117
+#>  [151]    3.9230976  326.0313110    2.8209546    4.4502177   45.2657852
+#>  [156]    2.6507335    2.4535000    5.7406173    5.1763091    1.5400567
+#>  [161]    1.0795214    1.5230681    3.4662752    4.3179688    0.7036181
+#>  [166]    3.9843678    3.7730997    0.8382843    0.5566598    0.8787179
+#>  [171]    0.4405660    2.2968674    0.4199017           NA    0.9166892
+#>  [176]    3.8255417    0.5752081    0.5180702    1.5857564    1.6556677
+#>  [181]    0.5855740    1.0657172    0.4307829    1.3963100    2.4678311
+#>  [186]    0.9768236    1.0707787    0.8175089    1.4743868           NA
+#>  [191]           NA    5.0737371    0.5766439    1.4214748    0.2014372
+#>  [196]    2.2585330    0.7659990    0.6345024    1.1232179    1.2145635
+#>  [201]   10.4214382    1.5072360    1.6478479    2.0655625    0.5699065
+#>  [206]    1.0214655    0.6936538    2.5300288    0.5699503    0.4178057
+#>  [211]    2.3085105    7.4867916    2.4417286    3.0711961    2.6359253
+#>  [216]    1.0029373    0.3156207    3.3271339    0.7859326    0.9116367
+#>  [221]    2.2751508    3.6905310    1.7462349    0.6127930    0.6677385
+#>  [226]    0.3307993    2.4790754    0.9691072    3.0772917    0.3885723
+#>  [231]    0.3215049    1.6329483    4.4057989    0.4121964    0.8756598
+#>  [236]    1.1511103    1.2199212    2.9056976    0.9633790    1.1713226
+#>  [241]    2.6179757    7.3096509    4.6009355    0.6218465    4.1894031
+#>  [246]   10.0505095   12.7552290   10.4093504    2.2360206    1.2496341
+#>  [251]    0.4214600    1.4234974    5.9685678    1.4870299    6.5259218
+#>  [256]   10.9112473    3.0024679    5.5636888    1.0834279    6.3247514
+#>  [261]    8.4820938    1.0724249    1.7462807    0.2578186    2.8363187
+#>  [266]    2.7652164    9.1981554    2.7739875   27.5907974    3.4431446
+#>  [271]    7.6219230    7.2448454    0.9365459    1.4254460    1.9484344
+#>  [276]   25.4685478    3.3151047    5.4201798    1.0591918           NA
+#>  [281]    2.2389860    7.2797980  177.9112701  712.0562744    1.9180223
+#>  [286]    1.0850360   15.4796858    2.2603140    1.6407841    3.5157232
+#>  [291]    1.3970622    2.8673556    4.1254120    2.8693426    4.2749281
+#>  [296]    0.8203884    2.7943869    3.3467057    3.0753074    2.7253366
+#>  [301]    2.1626289    5.0227842    2.3628030    1.2205384    0.8150464
+#>  [306]    3.2100937 4247.9296875           NA 4877.1162109    1.7616867
+#>  [311]    1.8174063    0.7508621    3.5258093    2.7256949    2.5574954
+#>  [316]    1.5129316    0.6094913    2.6934810    0.9192376    1.3823618
+#>  [321]  111.0667496    0.6147639    1.4611453    0.7056657    0.4673733
+#>  [326]    0.5605560    1.7962961    0.7591861    0.6475862    1.0416414
+#>  [331]   13.4244280    0.8334653    1.4189600    0.8297019    2.9611456
+#>  [336]    1.5615076           NA    1.4051919           NA    0.9027803
+#>  [341]           NA    3.6805460  145.7117004    0.3470792    1.5938562
+#>  [346]    1.4932191    4.3753552    0.6481672    2.1519599    1.0128362
+#>  [351]    0.6915093    1.9947214           NA    0.2430045    2.9182062
+#>  [356]    0.6795040    1.6664841    2.3586757    0.8883650    3.2617228
+#>  [361]    2.8392348    1.6086547    0.6026787    1.2004064    1.3173006
+#>  [366]    3.6571672    2.2624974    0.9398944    3.5710230    1.0233446
+#>  [371]    1.3720112    1.0055754    0.5655854    1.5054272    1.0397023
+#>  [376]    3.3238027    2.1077371    2.7032313    3.8104489    2.8180630
+#>  [381]    7.8234811    4.9062996    1.3160198    1.0076615    1.0950712
+#>  [386]    3.9908450    4.2435541    0.7174511    5.2825084    0.8802158
+#>  [391]    0.3888731    0.7251250    1.0856016    0.5659533    0.4917859
+#>  [396]    0.4981284    0.9569623    0.7542380    1.5303959    2.5028656
+#>  [401]    1.2001288    1.7258205    0.5163053    1.1474305    2.1486368
+#>  [406]    2.4524887    3.0907106    3.9163256    6.1858454    6.0148554
+#>  [411]    3.3022101    6.8535738    0.9091500    5.3752904    2.6620142
+#>  [416]   14.2303267    0.3268394    3.2703023    3.7256567    3.4891803
+#>  [421]    6.1556778    1.2317547    3.0012579    6.3596826    0.6037928
+#>  [426]    0.5698133    3.7267346   10.2576380    0.8706866    4.9864445
+#>  [431]    4.3741260    1.0901091   10.9061537    4.1417003    0.5189514
+#>  [436]    8.2503548    2.2269182           NA    0.3962348    0.3956501
+#>  [441]    2.1887872    1.7824746    3.7205944    3.6917150    0.7435969
+#>  [446]    9.6342754   24.0429783    1.5591800    1.9394968    3.0097637
+#>  [451]    5.7848148    9.7665796    2.0749505    0.4870613    2.6161067
+#>  [456]    0.6431220    1.2651863    3.6852174    1.1431226   21.9405651
+#>  [461]    1.2046832    1.8209703    0.5066832    0.9095992    9.7609291
+#>  [466]    3.3460293    0.4121834    0.9202868    0.6617500    2.0171058
+#>  [471]    1.1644038    2.6082158    3.6380553    0.8339515    1.4020016
+#>  [476]    7.2250385    0.7268345    0.7294782    0.9507068    2.5481384
+#>  [481]    3.6101770    0.6119207    5.6888528   16.1643982    2.6750910
+#>  [486]    4.8989611    0.4897856   15.6936617    3.9424517    1.3334647
+#>  [491]    0.4453856    3.3320382    7.2846007    3.1082804    3.1209931
+#>  [496]    9.3145094    0.8143211    1.1926577    0.6434940    0.6482291
+#>  [501]    2.3913691    2.1481240    2.7833135    4.5657282    5.3265414
+#>  [506]   10.3909426   15.4557104    0.6454072   43.3171730    1.4262301
+#>  [511]    2.5555761    1.7280343    2.7765193    1.3546977    1.9755590
+#>  [516]    1.4631903    1.5031183    1.5941623    1.5892071    5.8746567
+#>  [521]    2.2622027    2.5123510    5.3907886    5.1953430    3.1958568
+#>  [526]    3.0968442    4.0582609    3.2192631    2.5363874    4.4969444
+#>  [531]    5.3325839    2.3695500    3.0062342    5.6627531    6.4923205
+#>  [536]    4.7920384    4.5700383    4.0006895    9.5566549    5.8871794
+#>  [541]    7.4422898    5.2004848    9.2628069  784.9196167    4.6816382
+#>  [546]    4.1257901    6.6807156    4.1821823    6.8080244    7.7087774
+#>  [551]   12.4988031    1.4474308  985.7752686    5.5145364    2.7746949
+#>  [556]    2.3561726    3.7145381    6.2821894   10.4331989    1.7673082
+#>  [561]    3.1912456    7.3891306    1.3537637    0.2704858    4.0082321
+#>  [566]    8.5943022    1.3064193    3.6371551    2.5390623           NA
+#>  [571]    0.7411902    0.5046070    0.5680771    1.2300223    2.8467999
+#>  [576]    2.6166818    0.5497193   16.0667572    1.9547974    0.9511589
+#>  [581]   15.4262342    2.4667881    1.0057802    2.2017863    3.7578349
+#>  [586]    5.2645087    0.7512842    2.5041356    1.8741575   11.7041502
+#>  [591]   22.0120201    3.6391535    2.4130566           NA    1.3888769
+#>  [596]    1.4703723    1.5291082    2.3573880    0.6399383    1.6180218
+#>  [601]    2.6052721 1237.6204834   19.8997154   39.6545715 4069.6533203
+#>  [606]    3.8779757    2.9248793   14.3836384   38.9334831 4267.4248047
+#>  [611]    6.9302726    5.0617962    4.1785703   28.3963814    6.4566789
+#>  [616]    3.4296451    3.7816880   11.0247078   27.2765732    2.2371943
+#>  [621]    0.9170940    0.7460240    0.8210835    1.6487689    9.5727634
+#>  [626]    1.6570802           NA    0.8196399    0.8946962   13.3170853
+#>  [631]   28.8410645    1.4570224    0.2454604    0.6586674    1.0929065
+#>  [636]    1.2879230           NA    2.9674864    0.5844296   11.5823431
+#>  [641]           NA    2.6197197    0.6617230    1.0072753    1.0431374
+#>  [646]    1.7980380    1.8940541    4.3480368    2.6686113           NA
+#>  [651]    2.4794784    4.1561966    1.2986863    1.2777241    3.0134482
+#>  [656]  101.8303833    3.4352007    3.0277224   13.1016092    0.5244251
+#>  [661]    1.7064619    0.3486639   50.7429390    1.7649055    2.7503626
+#>  [666]    0.3800137    3.3221421    3.1534879   15.4715948    1.4704005
+#>  [671]    1.8855512    4.0389700    1.0823137    2.6767426    2.1071370
+#>  [676]    3.6332088    0.6826217    1.0185049    3.3197520    3.8973808
+#>  [681]    6.3822713    5.1280479    8.5763950    3.2864881    1.3272406
+#>  [686]    3.2673051    5.7568297    8.3966360   16.3681469    7.2476711
+#>  [691]    5.4942021    2.1211190    1.5519290    3.6947889    3.6529276
+#>  [696]    7.1617284   23.2306347   20.4122696   17.6928806    5.1081491
+#>  [701]  117.3710403    2.7161827   48.0717468   18.4067097    3.7467299
+#>  [706]    3.6180439   15.2693739    4.7089896    2.5892634    9.7226076
+#>  [711]  139.4568787    7.4229794   11.8008423   44.5208054   10.5249119
+#>  [716]    5.9375591   20.7310448  216.7257538   12.0509796   32.5807915
+#>  [721]  140.1287079   18.1983509    7.9473476    4.0145078           NA
+#>  [726]    5.9600363    4.9861374   40.1272926   16.1208572   13.0407543
+#>  [731]    6.8589644    4.9722199   11.0004854    7.2423544    6.4803615
+#>  [736]   14.1402922   23.9029579   15.6984034   17.9236164    3.2453372
+#>  [741]    9.5185261    8.6210403    3.0081079    3.5888493    6.0433631
+#>  [746]    7.4204693   11.3490496    3.6138747    1.7851294    4.3751335
+#>  [751]   38.7952423   25.8243275   20.6631317    2.3311818  701.8855591
+#>  [756]  333.9076538    5.9194384    5.2374392   50.5938759    6.6050563
+#>  [761]   29.6740894    6.8099937  729.9282227    4.7258272  377.9533081
+#>  [766]    3.7225027    5.8937206    8.3230190    8.7469826    1.2891947
+#>  [771]    2.5859647   75.5915375    4.7863827   45.3149376    2.4862499
+#>  [776]    6.5945859    6.9634075   35.3314667    3.0827610   86.5234299
+#>  [781] 1061.5833740    3.1925797   39.1028519    5.1561656  727.2340088
+#>  [786]    4.6954513    4.7806416    2.0299914   67.0260162           NA
+#>  [791]    8.1010742    1.6631573    1.8530455   79.0636978   30.3669281
+#>  [796]    0.8927791   10.3849897    1.0268044    3.1952302    0.7755960
+#>  [801]    5.7425203    7.2843447    1.2209314    1.8280462    7.8098340
+#>  [806]    3.8438480    1.6488374    1.9727218   21.7567501    0.7352579
+#>  [811]    1.9201657   52.0057869  127.3143768    5.6821346    2.5211284
+#>  [816]    2.3330369    2.1601825    9.7243500    9.3593960    2.9505100
+#>  [821]    5.4880805    8.6688786    2.6024387   11.9668989    2.1561337
+#>  [826]   12.3195581    1.2745084    1.9595144    5.3821392   19.5642281
+#>  [831]   16.0015182    3.0178616    4.6744413   21.4054432    2.3722150
+#>  [836]   17.8877811    7.6304569   36.1747169    4.2541361   33.9568787
+#>  [841]    6.3856707    2.6096203   13.1905775    2.4566786   47.8784180
+#>  [846]    6.1847539   46.1483879    3.2702918    3.5770297   12.7957163
+#>  [851]    5.9115996    4.5292888    5.1561074    4.0170932    3.9871593
+#>  [856]    5.1863651    1.8988326    7.9102783    5.5774412 2934.2749023
+#>  [861]    1.7749847    8.5469313   16.3584347   10.1700211    0.2661873
+#>  [866]    6.4565039    8.4741077    0.1989040    0.4645469    1.7402502
+#>  [871]   29.9008598    0.5417653    0.7619571    2.3052864   23.7764740
+#>  [876]    3.5269954    6.3716865    4.5834875    0.6944337    9.3756256
+#>  [881]    0.4391756    0.4102839           NA    0.4088447    4.4651365
+#>  [886]    2.3560781    0.8629871    1.7296497    2.3054824    0.4738956
+#>  [891]    0.8453057    0.6674856    2.9770677    0.9882508    2.5485382
+#>  [896]    1.3252913    0.9046306    3.3730309    1.3325157    0.8287238
+#>  [901]    3.2393219    2.8408599    1.1969875    4.9852405   16.4274426
+#>  [906]    0.7676155    5.0130310    2.2948136    2.0398157    1.0926311
+#>  [911]    1.6752559    2.0661981    0.7237425    4.8128242   11.1487827
+#>  [916]    0.8632420    1.8443307    0.4144078    1.5147480    2.7527251
+#>  [921]   13.0752268    1.8903236    7.9921408    1.5463461    0.8109860
+#>  [926]    1.0667026    1.1346698    3.6560605    3.3797889    3.5629609
+#>  [931]    3.4544880    4.5592079   16.6013031    4.6765566    1.6968081
+#>  [936]    1.1385404    1.4192655    2.8486712    2.6313102    0.6307487
+#>  [941]    2.3814776    2.7711914    0.7061450    4.9312925    1.1609619
+#>  [946]    6.7711430    2.8384895    3.6513107    3.9373784    5.0244951
+#>  [951]    9.3638000   17.6887131    8.8094635    4.6279211    1.6137590
+#>  [956]    0.6182525    0.8786079   15.0547085   24.5552330    7.9792995
+#>  [961]   64.7950058   97.0138016    9.9027309    0.5985516    1.5779028
+#>  [966]   11.9724445    1.9544525  163.6211090    2.1614091    8.1083727
+#>  [971]    2.6397953    3.5538256    7.1930056    0.6664237  442.5400391
+#>  [976]    3.0430346    6.4073930    5.0266309    5.8590345   19.6998043
+#>  [981]    4.3898072    1.1305788   13.5925970    7.2308283    1.1136869
+#>  [986]    1.3520640    1.6164834    1.0973755    2.0894964    9.5560360
+#>  [991]           NA    8.9295197  779.4788818    2.5705523  809.9169312
+#>  [996]    3.0098879   94.3604507    8.8758574    3.4457500    4.9686089
+#> [1001]    1.5195554    2.1578839    4.8023272    2.1327522    0.3200580
+#> [1006]   12.4226055   12.1050863 1096.2231445 1066.9301758  129.4904938
+#> [1011]    4.5963664    3.0736189    8.0031509    3.2705626    0.3757358
+#> [1016]   15.2121391    2.8834486   15.9752741 1346.7353516    2.6217887
+#> [1021] 1228.9621582    5.0895567    2.1218104  184.3674316    4.2164469
+#> [1026]    2.8267379    6.7104831    3.8288674    3.0664554    4.4310689
+#> [1031] 2268.6291504 1836.1269531    2.0746028    2.2918937   10.7542877
+#> [1036]   51.3735046    6.6448908    6.1085730    1.4560728    2.8452797
+#> [1041]    3.7901433    2.0456872    1.9614782    5.3406096    6.5233908
+#> [1046]    5.8153443    4.9779243    5.2980742    1.9569403    3.0366473
+#> [1051]    0.8441148    0.7282568    0.6270677    1.9153599    2.5157802
+#> [1056]    2.5211849    1.3664742   16.0325813    1.9972137    1.1040767
+#> [1061]    0.9441139    0.9234766    2.2210290    0.8783525    2.1501570
+#> [1066]    8.6357822           NA    1.6162349    1.9563223    1.2261102
+#> [1071]    5.9679408    2.4582469    3.3074541    0.6635520    3.4940929
+#> [1076]    2.6760423    1.0429727    0.5086066    1.0268028    3.8812792
+#> [1081]    3.5886321    3.9809752    7.7894588    0.8405986    1.1336366
+#> [1086]    2.8971629    0.7070799    0.7151046    0.5353748    1.3802744
+#> [1091]    4.1309824    4.8025975    8.7120161    2.2102430   10.5090933
+#> [1096]   10.4218655   22.3232746   36.9990120    2.9090240    2.3153019
+#> [1101]   76.6485138    2.9318345    1.6010859    5.8318458    2.6627228
+#> [1106]    6.4075303    2.0914986   11.3002634    1.0663972    9.0038490
+#> [1111]    7.7891731    1.4418688    4.8872490   13.7815018    7.2834721
+#> [1116]    0.6722869   12.7788944   14.1886673    6.0767541   17.2682152
+#> [1121]    5.8392038    3.2879653   25.1995487   27.0342846   11.1438723
+#> [1126]   38.4615974   10.6467648   20.4387722    3.0112209    1.9950336
+#> [1131]   10.1919136    1.5909361    4.7708578 1141.7640381    9.8121815
+#> [1136]   22.5490570    3.3931487    9.8001604    4.6790090 1271.7685547
+#> [1141]    2.8506472 1103.0401611   17.5955009    5.1776738    2.9927020
+#> [1146]    2.1627703    3.1698050           NA   13.8667717 1411.4106445
+#> [1151] 1272.9426270   21.3413105    0.8185354    2.8377655    2.0303440
+#> [1156]   21.7762794 1345.3233643 1350.6333008    6.6278219   29.8857651
+#> [1161]   52.9047775 1294.8477783   12.9526482    9.6068335   17.7135353
+#> [1166]           NA    2.6911139    3.7828991    0.7059131    5.9516506
+#> [1171]    4.0300317    2.7630870    5.6403260    7.4636693    2.0741365
+#> [1176]    5.1799192    6.4390368    9.8243055    1.5092793    4.3210769
+#> [1181]    1.7446249    3.4029963 2283.2792969    3.9234891    6.9994988
+#> [1186]    4.1006012    0.6282611    1.8591487    4.4599166    2.1398880
+#> [1191] 2337.1853027    4.3932910    9.6464186   12.7156582    0.9086848
+#> [1196]    9.3874264    3.2540348 2646.2402344    6.6778555    3.9801006
+#> [1201]   21.6677666    1.3727722    2.5189867    7.1042595   10.0052004
+#> [1206]    1.5813689   23.2121410    2.8682461    1.3422523    0.7672858
+#> [1211]    0.6866859    3.6084216   18.3351460    0.8394666    1.9887234
+#> [1216]    1.5026515    1.3683980    5.7951837    9.8654814    2.1221330
+#> [1221]    2.1047983    3.0744431    1.9053514    2.6970651    2.0816550
+#> [1226]    1.9742609    9.6418734    7.6057978    3.4838214    8.8084707
+#> [1231]    6.6040335    3.2611005    9.0701380    3.0636346    1.7033354
+#> [1236]   12.7065725    1.9277512   11.4872437   12.6639729    1.8488846
+#> [1241]    4.4552321    4.2770810    9.8547640    3.8485291    2.1161973
+#> [1246]    2.0724041    6.0630097    2.5432432   29.9757633    3.4243822
+#> [1251]    1.5343714    7.8658175    1.2879468    6.8999977    6.3626080
+#> [1256]  268.5536194    5.7748380           NA    5.2410469    2.0550699
+#> [1261]    0.4435597    5.4935684    0.9196581   75.9311295    3.3142908
+#> [1266]   80.4429626    5.9293828    2.2810714    2.8269784   20.1030636
+#> [1271]    1.1432312    3.6678035    1.0070125    3.5375540    2.9908266
+#> [1276]   22.7290974    2.3943624    0.9211383    1.9665295    0.8259042
+#> [1281]    0.4845653   25.3855438    3.8617392    6.6030455   18.8038082
+#> [1286]           NA    0.5806934    3.3330538  101.8569031   14.4165783
+#> [1291]    1.7161655    7.3081284    2.1098645    0.8144141    1.3382024
+#> [1296]    1.4885535    0.8770674    0.6791099    1.6695246    1.2673935
+#> [1301]    0.6891360    1.2439822    5.2793922    1.2573010           NA
+#> [1306]    3.7120969    4.9950824   11.5787373    1.9612808   10.3544693
+#> [1311]    6.0420938   18.6085644    1.5667670    1.2138346   30.0845642
+#> [1316]   19.6141224    3.2639980    3.6546156   29.6098766    2.8610103
+#> [1321]    6.0040512    1.8776323    3.8169975    4.7191100    1.0195367
+#> [1326]    3.8605018    8.1590776    2.8668685   12.0980616    5.0243416
+#> [1331]    7.0915346    2.7560163    6.1319265    5.5243936   46.6120872
+#> [1336]   24.7890339    6.4685655    9.1421661   10.3797007   10.7507782
+#> [1341]    7.7589669   12.2742815    4.6532531    5.1379547   23.7994213
+#> [1346]   29.3476200    4.0036497    7.5182543   11.9706621   63.0551071
+#> [1351]    5.1469116    8.4730129   72.0657578   10.1063595   65.6397705
+#> [1356]    4.1467509   13.0881023   27.2654285   96.3133926  108.4684830
+#> [1361]   15.9769907   16.9430561   14.3318129    4.6791883  126.8739243
+#> [1366]    6.6298981   18.2740936   28.1178570    8.4018116   24.9042740
+#> [1371]   22.9308643    5.7845116 2804.5610352    6.1323233    7.0216298
+#> [1376]   34.0006905   11.0745640   23.1465626   26.1845646   15.7390766
+#> [1381]    6.2733459   11.7022743    4.5109916    3.0380044   72.1676025
+#> [1386]   18.0594807   16.0637493    8.0370464  176.6657867 2181.4362793
+#> [1391]    9.6984138 3978.9870605    8.6989155   11.3172474   39.0961494
+#> [1396] 2588.9499512 3505.7983398  144.8855133    5.1680942   30.6885090
+#> [1401]    6.6054115    5.6432614    2.7389083   53.9481773   62.0971260
+#> [1406] 2972.6391602  161.4343109   35.4546394   11.2379074   13.3652372
+#> [1411]   15.0986557   20.7111149    9.2977657  425.2767639  216.2778320
+#> [1416]    7.9142838    5.0309882    1.0399815    1.0769179    4.5379925
+#> [1421]    3.6899538    2.2575519   17.9379234   22.7302589    6.5185528
+#> [1426]   19.6637669    0.2854209    7.1664414    9.3295479    1.1119181
+#> [1431]    1.1998634   44.4294777    6.0005445    1.2984159    0.4181677
+#> [1436]    1.3962787    0.8486760    0.6826237    1.3289268   41.6967010
+#> [1441]    1.6696991    0.8142897    0.3997326   64.2423019    4.2105532
+#> [1446]    8.1320543    0.8433636   21.3994884    0.6499675    1.6173933
+#> [1451]    2.2819724   79.2927475    2.7942066    0.6122881    5.6340408
+#> [1456]    2.3877366    2.5358839    1.6963638    2.8207321    1.6094570
+#> [1461]    3.0496490    5.2695556    0.7497861    1.1942160    2.8949137
+#> [1466]    1.8337013    7.7278204    3.0212984    4.6463079    1.1313710
+#> [1471]    3.0398493    1.1938435    0.5559963    3.7946312    0.7459199
+#> [1476]    2.6556878    4.8397417    2.1508582    4.1808691    1.3044889
+#> [1481]    3.6563311    5.6848607    4.3057156    4.3253880   44.0154037
+#> [1486]    6.8031969    1.0149941   16.5446339   50.2134972    1.4178553
+#> [1491]    5.2461462    6.6964250    1.3668361    7.0547361   15.4979038
+#> [1496]    2.5466137   12.0476017   16.9358387    4.2765665    3.0282452
+#> [1501]    2.0438735    3.0750351   30.2993698    4.1311669   10.5620518
+#> [1506]    6.3157725    2.0541127    6.4616790   52.7001801    6.5350013
+#> [1511]    2.7538323    5.5697684    7.0785255    0.7346154    4.6684666
+#> [1516]    2.3665750    2.1643167   13.1310358   11.3682957    1.0712550
+#> [1521]   12.9957743 1371.8287354    1.3735292    4.6520715   20.4687824
+#> [1526]   14.5587559 1770.5562744    2.6400170   15.1324883    1.9400562
+#> [1531]    4.7408748    2.0517797   32.1368103    0.9072015 1766.3382568
+#> [1536]   11.0576754    2.3649356    7.1545792    5.3592334   29.8745804
+#> [1541]   99.2443008    1.9519557    3.5576828    5.4862013   19.1255341
+#> [1546]    1.0205218   74.6288681    2.6257737    3.8454990    0.9508846
+#> [1551]   15.9569130    3.9706428    6.0614076    0.9358777    0.4645265
+#> [1556]    1.3660873    2.9063818    6.6953201    1.7190092    0.9622721
+#> [1561]    1.7018661   11.3596716    3.0443096    0.6346511   10.0340395
+#> [1566]    0.8095649    0.9709995    3.2444031    0.5028589    2.7934396
+#> [1571]    6.8828177    0.5587204    1.6042945    1.3587892    0.8313419
+#> [1576]    2.4558291    1.7974735    3.6726115    5.6037540    6.7877126
+#> [1581]    3.6458204    0.8579472    8.0946331   12.1906815    1.5101539
+#> [1586]    6.0351577   11.0641689   17.6339569    3.6026669   16.1998940
+#> [1591]    2.8316128    4.9478583   27.5424156    7.0986490    3.9904847
+#> [1596]    4.6039705    3.3738575   12.1051941   11.3188763   14.8368187
+#> [1601]    9.5498314    1.9773377   13.8263979   23.9170589   13.4375019
+#> [1606]    9.8440132   11.2628098    2.5026691   22.5849972   29.0189171
+#> [1611]   18.8118534   22.0679207    4.0647068    2.0535538    1.5048116
+#> [1616]    3.3824587    2.3311884   32.8195572   37.0816650    7.0685787
+#> [1621]    5.5009451    5.8517952    4.9319654    3.4151902    4.2116370
+#> [1626]    8.8043442 1099.1087646    5.3256183    5.2614517  480.0812378
+#> [1631]    5.3612590   12.7172546    6.3167968   14.1994934   59.6927795
+#> [1636]  964.6279297 1400.3564453  535.6882324   23.6954079   14.5343561
+#> [1641]    2.9595783   17.3649712    1.0824900 1221.8245850  147.4770660
+#> [1646]  683.7954712    6.1305389    4.9751444   15.9264107   18.4570618
+#> [1651] 1083.5487061  191.7899017  875.8353271  577.2622681   71.0305328
+#> [1656]    8.1075430    5.3227873   11.6976309    0.4594952    1.4792782
+#> [1661]    1.6332765    4.2618947    6.4441838    2.9269114  130.0458374
+#> [1666]    5.1534815    3.5288918    2.2328265    7.3872643   35.0871201
+#> [1671]  164.8385925   41.0983658    3.6965251    3.6046982   34.9871025
+#> [1676]   54.6165199    3.3092432    6.2893038   54.9078522    4.6468277
+#> [1681]    5.5542288   52.0769882    7.5430121   11.7523575   32.7870789
+#> [1686]    4.3187008   22.1579170    5.4699397    1.8834021    9.8157177
+#> [1691]    3.3649621   10.4119244   12.9897251    3.0194745   20.3988075
+#> [1696]    9.6839437    1.9245056   27.7328892    4.6774187    2.8958423
+#> [1701]    5.1254649   25.3332367   15.3362989    5.6253791    9.0580263
+#> [1706]    3.3217881   16.1069527    5.7460155    9.0998583    6.4395881
+#> [1711]   27.5900745   11.9862118   10.4788322    4.7713022    7.4465909
+#> [1716]   21.6194534    3.4900868   11.9859657    7.1533313   53.6382294
+#> [1721]   22.4019108    3.4466097   11.8166838   31.7925739    7.1903763
+#> [1726]   22.3436050   21.0166111   11.6625166    9.6446323   11.8060122
+#> [1731]   10.7140808   20.5072823    5.8385706   12.4566240   27.2418690
+#> [1736] 1374.2124023    5.0976796    8.5298624    8.9547720   14.1582394
+#> [1741]    3.6345949    8.9698286  746.4771729   16.0491295   14.2799292
+#> [1746]   12.4969416   16.1063213   17.6739025   13.8779955    5.8102989
+#> [1751]    4.7912970    8.5829220    7.5092740   16.8982792    8.7955656
+#> [1756]   27.1313457   10.5999660  102.9700699    5.2469325   78.4538498
+#> [1761]   23.4321194   13.5085144   28.0264759   42.0644264    3.0340507
+#> [1766]   16.6190434 1717.7260742    6.9299235   10.5656214   27.8841705
+#> [1771]   17.4288807   47.0360756    5.2313685   49.5542450    4.6091428
+#> [1776]    7.5845995    5.1649594    5.6527944    6.7112393    7.1952438
+#> [1781]    2.8361075  936.4321899   10.8392658  300.9952393    3.7918711
+#> [1786]    5.8666444    9.0892420    7.9013219    5.9726405    6.4315825
+#> [1791]    6.7033081  174.0914154    9.4583406   13.8090487   25.1833706
+#> [1796]   10.3936863   11.1641397    3.6089337    4.3211293    4.5236745
+#> [1801]    5.9249415   19.1762638   44.9207954 1162.3734131    9.1217899
+#> [1806]    6.2500715   14.8576088    9.4355440   27.3175831   75.4738541
+#> [1811] 1927.7430420   10.6061239    2.5857298    5.2106519   16.0033913
+#> [1816]   13.5474854   30.9249420 2882.4428711   37.9162636   75.5530014
+#> [1821]    6.0951519    4.3891191   10.3061371    6.6429935   39.4176941
+#> [1826]   10.0774698   83.8411789   21.2222996           NA    0.6372588
+#> [1831]    3.5606251    2.5927734    3.2620273    2.3674390    1.8626410
+#> [1836]    6.6079321    2.4800649    6.8728633    2.8025930   10.0381966
+#> [1841]    4.8456726   89.1146164    4.3337107    3.8712926   42.9793968
+#> [1846]    2.5299530    7.4297533    4.6089058    3.5378845    0.1817949
+#> [1851]    1.1290787    1.5784779    1.1125787    2.0033450           NA
+#> [1856]    1.0376083    1.9011122    2.3181555    1.6446155    0.9089839
+#> [1861]    0.4841611    0.6897894    0.7658206    0.6156495    1.4828655
+#> [1866]    2.3340645    1.1662629    0.9815852    2.3534944    2.1499813
+#> [1871]    0.7019742    0.3516256    3.2850077    5.8242555           NA
+#> [1876]    1.3007295    1.5015216    0.8093400    3.2225409    2.6426129
+#> [1881]    2.3901305    2.9790335    2.9894137    5.2419791    4.8620076
+#> [1886]    0.3997991    3.0470288   11.9397249    3.6320026    8.3058691
+#> [1891]    1.3834330    4.1316576    3.7130520    3.9005911   16.1633472
+#> [1896]    3.6801958   12.0339565    1.1500748    1.2219627    0.5826390
+#> [1901]    3.3800447    5.2994637    2.6451149    2.7287869    3.1930273
+#> [1906]    1.8436399    2.9893756    4.9069676    5.8526864    1.9956532
+#> [1911]    5.7515755    9.3381653    3.7572572    0.4758977    0.5950958
+#> [1916]    1.2651656    0.5604061    1.5873302    1.7309831    2.2026825
+#> [1921]           NA    0.8321332    3.1331923    1.8596388    4.0986276
+#> [1926]    1.4462790    5.0948448    3.3446779   14.7490797    4.2720022
+#> [1931]    2.3573306   12.4373245    5.4349809    5.5168352    7.1895194
+#> [1936]    1.3353804   31.1978798    6.0550547    5.3862381    2.3742425
+#> [1941]    1.6283454    3.8663564    2.5557170    3.9340308    4.8355684
+#> [1946]    0.8258027           NA    1.6850734    8.2018566    2.8547313
+#> [1951]    2.7901099    1.2237481    1.2317826    5.9977107    2.4985216
+#> [1956]    5.4254308   10.2619724    3.6585343    0.7505842    1.0290449
+#> [1961]    1.4102111   31.6295795    6.0977502    3.3116033    6.6416101
+#> [1966]   13.4169693    2.0772371    2.5722609    1.4239205    1.1951129
+#> [1971]   19.3541183    6.6528106    7.6534238    3.3320429    3.9984677
+#> [1976]    2.1092513    8.5107756    2.7920604   28.8576584    1.6512991
+#> [1981]    2.0430546    6.1738434    2.2872250    3.3046799    4.1366568
+#> [1986]    2.0184140    3.4700344    2.1820960    9.8032455    9.3485680
+#> [1991]    7.2345314   20.3594875    7.5089312 1627.1451416    5.3730831
+#> [1996]    8.5319214   12.6467562    6.4055276    5.4178729    3.8174756
+#> [2001]   60.1280174    6.4091296   14.2986145   13.2007456   17.6533527
+#> [2006]    4.6876645 2218.6071777    5.9873571    5.4104090   13.5144920
+#> [2011]    4.3813696    8.5980825   19.0352879 1989.9606934    6.5922198
+#> [2016]    8.3580027    5.7576084  341.0995483    3.3168538    9.5687895
+#> [2021]    9.9157639    8.6866083  366.3923645    6.9480758   10.2027311
+#> [2026]    7.9508238   12.0425510    5.7334862    5.7009211    9.3929729
+#> [2031]    4.2744284   16.8116989    3.3318050   61.5876274    3.6692767
+#> [2036]    4.6599665   16.0338726   43.3646393    0.4666836    1.1231649
+#> [2041]    3.3837605    5.3292937    3.6405241    9.7523746    0.9140767
+#> [2046]    0.7435523    0.2535407    5.4856982   15.5203247    3.2470930
+#> [2051]    2.7420650    0.6101449    1.0404911    2.7917345    6.6811185
+#> [2056]    2.0745556    1.2540616    0.3098164    1.6586421    9.5700045
+#> [2061]    0.7319268   12.7017021    0.6637144    1.5885706    0.8827127
+#> [2066]    2.1940100    3.7667232    2.0905075    0.6379106    2.9787626
+#> [2071]    0.4874143    0.3836070    0.5107485    1.1823709    1.2667042
+#> [2076]   19.2034588    1.6550628    1.1661954    0.8966293    3.2779715
+#> [2081]   11.0150242    1.6130922   26.5314026    2.5117977    2.3132839
+#> [2086]    2.2919271    3.1338563    1.5114740    2.0381725    5.2738991
+#> [2091]    2.9814677    3.5173035    2.9813018    1.8998176    7.4101906
+#> [2096]    5.3717108    4.2854128    0.2399864    6.4908400    1.6760609
+#> [2101]    4.9045634    3.0678418    2.1384492    9.3216219   10.4645767
+#> [2106]    0.3764410    1.2218126    1.2995534    9.7801199    2.0047073
+#> [2111]   26.3789768    1.0760976    0.9736537    2.0357609 1576.8568115
+#> [2116]    1.4469386    3.0481942    1.6708410    0.9496741    2.6938272
+#> [2121]    1.8960530    2.1988547    1.2718045    1.2236259    1.4919758
+#> [2126]    4.3979073   71.3828812    2.0391872    2.2703087    2.6103971
+#> [2131]    1.4898348    1.5168892    0.8818803    1.8848048    0.6037043
+#> [2136]    1.8731611    7.1765389    1.9562593   11.7375755    1.6933267
+#> [2141]    1.5986614    5.0060325    5.2257977    4.1671195    4.4332304
+#> [2146]    6.8677626    2.4653215    6.3500257   10.9838686    6.4111762
+#> [2151]    9.4890432    4.7053976    1.8102279    1.4213001    1.6444297
+#> [2156]    1.9174886    0.4131429    1.5709261    3.1760740    1.0655589
+#> [2161]  919.2457886    1.5643872    1.7901465    1.7823997    6.9229293
+#> [2166]    2.2213833    0.8164910    6.7707281 1034.1815186    2.8209743
+#> [2171]    0.6380021    1.1908475    2.2225995           NA    1.8188674
+#> [2176]    2.1192210    1.1434188    1.2050375    1.7906495    3.5892394
+#> [2181]    0.7533023           NA    1.4840194    2.2305763    2.4143374
+#> [2186]    1.9114826    1.0137789    4.2369156    2.1006327    2.7787836
+#> [2191]    0.9601986    8.1295986    7.2806950    1.1032010    2.3385823
+#> [2196]    1.1522059    1.4659723    8.5681458    1.8708251    9.6687212
+#> [2201]    5.7849174           NA    2.4449232    1.6775528    4.9673247
+#> [2206]    1.8457032   11.6521568    5.6321864    0.9540480   12.1773853
+#> [2211]    0.4559720    0.7230437    1.5481060    1.7013626    1.9925474
+#> [2216]    4.0501847    1.5732721    2.9336040    1.2153755    2.3473213
+#> [2221]    1.6044481    3.8102901    5.9565816    3.5146675    2.6926224
+#> [2226]    4.9956584    7.3882804   31.3160343    1.3993325    6.2274776
+#> [2231]    2.9698203    3.2010090    1.3510920    5.6216455    3.3691561
+#> [2236]    2.7835443    0.4399868    2.5057735    5.0695376    0.6980689
+#> [2241]    1.8963152    8.0071716    9.3238049    2.4393957    4.9562755
+#> [2246]    2.4916747    1.4161593    1.7179910    2.8897645    2.1166553
+#> [2251]    2.5877254   12.7337999    1.2360386    2.1893265    1.5300977
+#> [2256]    3.0833626    8.4302454    4.9040179   10.9480925    2.1738741
+#> [2261]    3.3114023    6.0667453           NA    0.6554648    3.5936801
+#> [2266]    1.5739572    5.1975174    3.9125762    9.3439398    7.9241571
+#> [2271]    3.9933949    4.6318932    8.3959627    0.7565725    2.3423707
+#> [2276]   15.7967987   12.7200508    3.1725900   11.7995720    0.9761860
+#> [2281]    1.1349560    1.9718618    4.9297872    7.0475721    2.8053823
+#> [2286]   34.1454964  156.3358002    2.1250823    4.3354549   64.4767151
+#> [2291]  278.9322815    0.7963252    3.8422236   61.7775192  190.2516785
+#> [2296]    1.4124620    1.3479694    1.6552913    4.4471312  329.0337830
+#> [2301]    2.3342044    2.1571195    0.9733863    2.4092717    4.8433948
+#> [2306]    2.3092387  360.7164307    3.0873225    1.7288386    2.3073480
+#> [2311]    0.5996385    5.3622589 1420.7687988    7.9223099    5.6030631
+#> [2316]    0.6277632    0.8355366    0.4711815    1.3496840    0.8089792
+#> [2321]    5.8526330    1.8503476    0.6572140  305.6041870    1.4397534
+#> [2326]    0.8994330  277.0521240    2.2045338           NA           NA
+#> [2331]    0.5602361    1.2226131    1.3568290    1.7129589    2.0047822
+#> [2336]    1.7247094    6.7786064    2.6411271    1.9010485    1.7608452
+#> [2341]    4.4309907    3.1676409    3.3830304    4.6565275    3.3298314
+#> [2346]    1.5452514    3.5828693    1.7718617    0.8061830    1.2403909
+#> [2351]    4.6554375    1.6074916    3.6399906    1.1538744    4.6306715
+#> [2356]   22.4013309    4.1293302    6.8009396   32.1985893    9.7335100
+#> [2361]    0.5418288    0.5632182    2.9177530    2.1166260    6.6263289
+#> [2366]    2.1903484    6.9556012    3.3954957    3.9068611    1.8365928
+#> [2371]    3.1866224    6.6193805    5.9870872    2.3148339   31.7243080
+#> [2376]    1.7895136    3.5860963    1.8591824   77.3616867    3.4268165
+#> [2381]    0.5249496    1.5734435    3.8141046    2.7002668 1096.7601318
+#> [2386] 1496.8631592    3.2043941    1.8505754  587.6149292 1741.0694580
+#> [2391]  885.2774048   23.7601643  594.6196899    0.4923916   29.5300331
+#> [2396]    1.3024459           NA    0.7680741    0.8888112    2.1178827
+#> [2401]    1.4857029    1.1276029    1.3496284    2.1555452    2.1827545
+#> [2406]    1.2788655    1.2924441    0.9934639    5.3240347    1.0079803
+#> [2411]    1.3528888   10.8723679    1.9321351    2.5913424    2.0170100
+#> [2416]    2.6124203   25.0653572    0.7242321    2.9123745    1.8755200
+#> [2421]    5.4409308    1.6049031    4.8650875    3.9305305    2.3677256
+#> [2426]    2.1769772    6.9278378    0.9471752   11.2096748    8.1439409
+#> [2431]    7.7992425    8.1538477    7.7033796   15.1453743   31.8052731
+#> [2436]   18.0042858    1.2677478    5.5277863    2.1457639    3.4404881
+#> [2441]    6.6042099    4.3178186   10.6584396    4.6253743    4.4684582
+#> [2446]    9.8839989    0.4913557    4.2288108    2.3422270  220.2428894
+#> [2451]   76.3024292    2.4397397    0.7708665    0.5308517  153.5867767
+#> [2456]    0.7601256    5.8568654    3.3581190    1.1768376    1.9733516
+#> [2461]    8.9577475    1.6991717    0.6544989    0.8063468    0.5237735
+#> [2466]    1.2291242    0.4108943   11.5966806    1.5359516    0.5914992
+#> [2471]    1.5501552    0.4674177    1.4722780   10.3540297   12.8971653
+#> [2476]   76.4729843    3.3384745    8.8360243    0.8269219    0.8899398
+#> [2481]    6.1822929    1.4949089    6.1136923   45.9732246    1.8630898
+#> [2486]    0.4607324    2.4314377           NA    0.3267280    7.7629838
+#> [2491]    0.9005343    6.4958630    0.6801585    1.1879852   13.1560583
+#> [2496]    2.3879337           NA    0.7733446    1.1475980    3.0229218
+#> [2501]   14.0746317    0.5247985    1.2050325    9.2619877    0.7634576
+#> [2506]    1.0241749    1.0909539    5.3293109    2.7063551    3.4095821
+#> [2511]    0.6897098    1.0274373    0.8178927    1.5089374    0.7430726
+#> [2516]    1.1275156   21.9422588    1.3811653    3.5942285    1.6271605
+#> [2521]    2.1611414    0.8879982    0.8763292    1.7225560   13.2923336
+#> [2526]    3.3895564   21.7352753    0.4632308    1.5177442    1.9604896
+#> [2531]    5.8416729    0.6393901    2.9566762    0.3774208    1.6599923
+#> [2536]    3.0378304    2.7158394    0.6954392    1.9243698    1.4208319
+#> [2541]    0.3644979    0.9764859    1.7312529    1.9927244    8.3358564
+#> [2546]    0.3344689    1.5944563    1.4439087    2.7181752    0.9094949
+#> [2551]    1.2030648    2.7429266    6.6508756    2.8126271    3.6208489
+#> [2556]    6.5295534    0.3424659    0.5115961    0.5035965    1.0872059
+#> [2561]    1.5785052    0.2461324    1.9896445    0.8427312    0.7660883
+#> [2566]    2.3450923    2.4805903    0.8671566    0.6639645    0.5334827
+#> [2571]    0.4702013    3.1127882   64.2761841    5.7723532    0.9449326
+#> [2576]    9.8559513    1.5376849    0.6502208    0.8867813    0.9406697
+#> [2581]    2.6839008    3.2349586   26.2348919    2.3463531    0.7232664
+#> [2586]    0.5971866    2.7867749    1.2694967    5.0291767    1.4869373
+#> [2591]    1.9182748    0.8268527    4.4961567    0.4737805    2.8711464
+#> [2596]    3.6332841    1.5385498    4.7165794    1.2112534    2.5973957
+#> [2601]    4.9447703    0.9545295    1.4072028    1.8630619    1.4024746
+#> [2606]    0.5282810    1.8168713    4.9301190    0.1499837    0.7057289
+#> [2611]    1.6758749    1.9225767    0.6456749    1.0736265    0.6631852
+#> [2616]    2.0254166    0.8686433    2.9635856    2.8306408    0.6591658
+#> [2621]    1.8536581    0.7700182    0.6434809    3.0102704    0.6942499
+#> [2626]    2.7054408    6.5840912    0.4648814    2.2047083    0.8025916
+#> [2631]    0.9868059    0.9812470    1.6068337    1.6466388    0.6577185
+#> [2636]    3.3152702    0.3456087    1.4819642    1.6930362    0.6172115
+#> [2641]    4.8450933   10.5450792   48.2902794    0.6500265    0.6208660
+#> [2646]    0.6039580    0.9597225    0.3537683    0.8526208    0.2884314
+#> [2651]    0.8374825    1.8498940    2.6492484    0.8956540    1.2795352
+#> [2656]    3.1287794    2.0273194    3.7718840    1.8026490    0.7220110
+#> [2661]    0.7175305    4.3183942    1.4981960    0.2836370    0.8527241
+#> [2666]    3.5981882    0.3067524    1.3901409    2.7463164    2.1976302
+#> [2671]    0.2309106    0.2099868    0.8203602    1.9904572    4.0084724
+#> [2676]    0.5368133    0.4482878    1.4325606    2.3086529    0.4549935
+#> [2681]    3.1426587    1.3987031    0.4663780    2.3534548           NA
+#> [2686]    3.8060784    0.4556686    1.3394214    1.1004189    2.4211915
+#> [2691]    3.3820996   31.4883842    0.7637222    2.0601268    0.7897440
+#> [2696]    1.1024669    1.4127746    0.7815835    0.3922873    2.3492901
+#> [2701]    1.7412961    1.0913932    2.1832561    5.6013675    0.5410951
+#> [2706]           NA    1.5191215    8.5703373    1.4032021    2.8650708
+#> [2711]    1.6290002    0.6252948    2.6510727    5.6316738    0.6707575
+#> [2716]    1.2557933    2.8557181    6.8578634    0.6140221    4.2484360
+#> [2721]    0.6619285    1.2980875    3.2068131    1.3282340    1.5175761
+#> [2726]    2.3767309    0.8093471    0.6040459    0.6218860    1.4518211
+#> [2731]    1.7191668    1.9510572    0.3967183    1.0216656    3.4807718
+#> [2736]   12.6569872    1.2336719   11.7144327    0.6784623    1.0983104
+#> [2741]    0.8703533    0.9070129    2.6424198    1.1471686    0.9019348
+#> [2746]    2.5049481   11.4490557    0.5566154    1.9753987    2.3320930
+#> [2751]    3.7091351    2.4257834    0.7362632    0.8419358    3.9386895
+#> [2756]    0.9128963    1.6723500    1.3298150    0.6335756    0.6562991
+#> [2761]    3.2722898    2.3044112    1.4757828    8.4148054    0.3076566
+#> [2766]    1.2632453    0.8317384    6.0139632    2.7857358    1.4718702
+#> [2771]    2.8902125    3.4636676    2.9858587    1.1537194    6.6131492
+#> [2776]    0.2267639    0.5474497    0.4946014    1.2936714    1.6368855
+#> [2781]    0.9594902    1.4098917    0.7878828    0.6673341    3.1816411
+#> [2786]    1.2840652    2.6560736   19.9554462    1.0239617    1.8550906
+#> [2791]    2.3586714    0.4221451    2.8507216    3.4885705    7.3413062
+#> [2796]   35.7378654    1.4843854    0.8229836    1.9679027    0.9418428
+#> [2801]    2.5392017    0.9196062    4.2101269           NA    0.8723121
+#> [2806]    1.1009536    2.2867596    5.5058069    1.2713206    2.4941492
+#> [2811]    1.5185130    2.7117639    4.5919437    5.1406364    2.8025935
+#> [2816]    5.8709002   13.7791338   14.5640020    4.8297606    7.8658409
+#> [2821]    6.8229294   27.7137413    5.3379407   14.4617805    4.4964433
+#> [2826]   16.1921463   10.2128115    4.2068844   10.3527794   30.8382893
+#> [2831]    6.8301725    9.5161114   46.6889000    5.9609809   13.2284927
+#> [2836]    7.8532238   36.7056198    8.2213917    7.4940300   11.8976650
+#> [2841]   13.4008360   19.2198009    2.2085142   16.2607841   27.6975002
+#> [2846]   84.5502777    8.9375477   17.9089260   15.0652647    9.7659874
+#> [2851]   20.4718914   10.5261488  102.4522476   17.9931507   11.4199753
+#> [2856]   19.1676826   17.0927010   24.3487606    6.6103988    8.1302404
+#> [2861]    9.6394157   30.0782166   10.6189022    3.9972832   13.7391968
+#> [2866]   28.9560966    6.7734051    8.2172832   10.3078299   20.1655922
+#> [2871]   18.3504696    2.8396056   27.5377102    4.3330150    4.9756093
+#> [2876]    8.2070942    2.5828452    7.6423254    7.4956326    3.3020027
+#> [2881]    8.2716713   10.5372095    5.9630933    5.2237558    9.0436430
+#> [2886]    7.9005804    4.6265149    4.5348096   14.0217648   11.7508678
+#> [2891]    5.1471868   11.1270819    7.9933724   12.3714352           NA
+#> [2896]    9.6415024    1.0363822    2.1618273    2.2038519   16.1064682
+#> [2901]    6.1964874    5.3220701    1.6039859   98.4771194    4.0282149
+#> [2906]    2.6477625   16.8007278    3.5877471    2.6565950    5.3537140
+#> [2911]   39.1409950    3.9032741   51.0578613   14.7823324   23.7130947
+#> [2916]   41.8512573   27.0040703    8.8542757   40.3777084   36.5384369
+#> [2921]    6.2642756   10.2587223   25.8907166   44.1283989   16.7547779
+#> [2926]    1.5664260   36.2730598   45.0348854    5.4926982    9.8852091
+#> [2931]   38.9618721   45.9797630           NA    3.3837142    1.5297805
+#> [2936]    2.0968738    4.4807029    0.6716859    4.6078916    2.3965619
+#> [2941]    0.9893416    1.2310627    5.1445694    1.9888287    0.6328241
+#> [2946]    0.5137627    5.9770460    0.9208446    1.4403317    4.3081975
+#> [2951]    0.9803630    0.8477652    0.4548255   11.3158970    1.3294666
+#> [2956]    1.6702332    4.7679958    0.8518687    1.8222345    2.7682319
+#> [2961]    4.0749702    0.4489682           NA    0.6329405    1.6010697
+#> [2966]    0.1622699    0.8471114    0.4407594    1.1682943    1.4405993
+#> [2971]    2.0458810    6.8692994    2.7137775    1.1100407    0.3899231
+
+
+
+
+ + +
+ + + +
+ + + + + + + diff --git a/reference/asDataFrame.html b/reference/asDataFrame.html index 49a023ae..2aeb298e 100644 --- a/reference/asDataFrame.html +++ b/reference/asDataFrame.html @@ -1,8 +1,8 @@ - + - + diff --git a/reference/backendBpparam,Spectra-method.html b/reference/backendBpparam,Spectra-method.html index 49a023ae..e410f220 100644 --- a/reference/backendBpparam,Spectra-method.html +++ b/reference/backendBpparam,Spectra-method.html @@ -1,8 +1,8 @@ - + - + diff --git a/reference/bin,Spectra-method.html b/reference/bin,Spectra-method.html index 49a023ae..f87e600b 100644 --- a/reference/bin,Spectra-method.html +++ b/reference/bin,Spectra-method.html @@ -1,8 +1,8 @@ - + - + diff --git a/reference/bin.html b/reference/bin.html new file mode 100644 index 00000000..f87e600b --- /dev/null +++ b/reference/bin.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/reference/c,Spectra-method.html b/reference/c,Spectra-method.html index 49a023ae..beaf87b8 100644 --- a/reference/c,Spectra-method.html +++ b/reference/c,Spectra-method.html @@ -1,8 +1,8 @@ - + - + diff --git a/reference/centroided,Spectra-method.html b/reference/centroided,Spectra-method.html index 49a023ae..2aeb298e 100644 --- a/reference/centroided,Spectra-method.html +++ b/reference/centroided,Spectra-method.html @@ -1,8 +1,8 @@ - + - + diff --git a/reference/centroided.html b/reference/centroided.html new file mode 100644 index 00000000..2aeb298e --- /dev/null +++ b/reference/centroided.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/reference/chunkapply.html b/reference/chunkapply.html index d9cd41ca..e7d17722 100644 --- a/reference/chunkapply.html +++ b/reference/chunkapply.html @@ -15,7 +15,7 @@ Spectra - 1.15.8 + 1.15.9 + + + + + +
+
+
+ +
+

In addition to aggregating content of spectra variables (describe in +combineSpectra()) it is also possible to aggregate and combine mass peaks +data from individual spectra within a Spectra. These combinePeaks() +function combines mass peaks within each spectrum with a difference in +their m/z values that is smaller than the maximal acceptable difference +defined by ppm and tolerance. Parameters intensityFun and mzFun +allow to define functions to aggregate the intensity and m/z values for +each such group of peaks. With weighted = TRUE (the default), the m/z +value of the combined peak is calculated using an intensity-weighted mean +and parameter mzFun is ignored. The MsCoreUtils::group() function is +used for the grouping of mass peaks. Parameter msLevel. allows to define +selected MS levels for which peaks should be combined. This function +returns a Spectra with the same number of spectra than the input object, +but with possibly combined peaks within each spectrum. +Additional peak variables (other than "mz" and "intensity") are +dropped (i.e. their values are replaced with NA) for combined peaks +unless they are constant across the combined peaks. See also +reduceSpectra() for a function to select a single representative +mass peak for each peak group.

+
+ +
+

Usage

+
# S4 method for class 'Spectra'
+combinePeaks(
+  object,
+  tolerance = 0,
+  ppm = 20,
+  intensityFun = base::mean,
+  mzFun = base::mean,
+  weighted = TRUE,
+  msLevel. = uniqueMsLevels(object),
+  ...
+)
+
+ +
+

Arguments

+ + +
object
+

A Spectra object.

+ + +
tolerance
+

numeric(1) allowing to define a constant maximal +accepted difference between m/z values for peaks to be grouped. Default +is tolerance = 0.

+ + +
ppm
+

numeric(1) defining a relative, m/z-dependent, maximal +accepted difference between m/z values for peaks to be grouped. Default +is ppm = 20.

+ + +
intensityFun
+

Function to aggregate intensities for all peaks in +each peak group into a single intensity value.

+ + +
mzFun
+

Function to aggregate m/z values for all mass peaks within +each peak group into a single m/z value. This parameter is ignored if +weighted = TRUE (the default).

+ + +
weighted
+

logical(1) whether m/z values of peaks within each peak +group should be aggregated into a single m/z value using an +intensity-weighted mean. Defaults to weighted = TRUE.

+ + +
msLevel.
+

integer defining the MS level(s) of the spectra to which +the function should be applied (defaults to all MS levels of object.

+ + +
...
+

ignored.

+ +
+
+

See also

+
+
+
+
+

Author

+

Sebastian Gibb, Johannes Rainer, Laurent Gatto

+
+ +
+

Examples

+

+## Create a Spectra from mzML files and use the `MsBackendMzR` on-disk
+## backend.
+sciex_file <- dir(system.file("sciex", package = "msdata"),
+    full.names = TRUE)
+sciex <- Spectra(sciex_file, backend = MsBackendMzR())
+
+## Combine mass peaks per spectrum with a difference in their m/z value
+## that is smaller than 20 ppm. The intensity values of such peaks are
+## combined by summing their values, while for the m/z values the median
+## is reported
+sciex_comb <- combinePeaks(sciex, ppm = 20,
+    intensityFun = sum, mzFun = median)
+
+## Comparing the number of mass peaks before and after aggregation
+lengths(sciex) |> head()
+#> [1]  578 1529 1600 1664 1417 1602
+lengths(sciex_comb) |> head()
+#> [1] 149 366 379 374 344 378
+
+## Plotting the first spectrum before and after aggregation
+par(mfrow = c(1, 2))
+plotSpectra(sciex[2L])
+plotSpectra(sciex_comb[2L])
+
+
+## Using `reduceSpectra()` to keep for each group of mass peaks with a
+## difference in their m/z values < 20ppm the one with the highest intensity.
+sciex_red <- reduceSpectra(sciex, ppm = 20)
+
+## Comparing the number of mass peaks before and after the operation
+lengths(sciex) |> head()
+#> [1]  578 1529 1600 1664 1417 1602
+lengths(sciex_red) |> head()
+#> [1] 149 366 379 374 344 378
+
+
+
+ + +
+ + + +
+ + + + + + diff --git a/reference/combinePeaksData.html b/reference/combinePeaksData.html index c865910c..74ce5ba5 100644 --- a/reference/combinePeaksData.html +++ b/reference/combinePeaksData.html @@ -63,7 +63,7 @@ Spectra - 1.15.8 + 1.15.9 + + + + + +
+
+
+ +
+

Various functions are availabe to combine, aggregate or split data from one +of more Spectra objects. These are:

  • c() and concatenateSpectra(): combines several Spectra objects into +a single object. The resulting Spectra contains all data from all +individual Spectra, i.e. the union of all their spectra variables. +Concatenation will fail if the processing queue of any of the Spectra +objects is not empty or if different backends are used for the Spectra +objects. In such cases it is suggested to first change the backends of +all Spectra to the same type of backend (using the setBackend() +function and to eventually (if needed) apply the processing queue using +the applyProcessing() function.

  • +
  • combineSpectra(): combines sets of spectra (defined with parameter f) +into a single spectrum per set aggregating their MS data (i.e. their +peaks data matrices with the m/z and intensity values of their +mass peaks). The spectra variable values of the first spectrum per set +are reported for the combined spectrum. The peak matrices of the spectra +per set are combined using the function specified with parameter FUN +which uses by default the combinePeaksData() function. See the +documentation of combinePeaksData() for details on the aggregation of +the peak data and the package vignette for examples. +The sets of spectra can be specified with parameter f which is expected +to be a factor or vector of length equal to the length of the +Spectra specifying to which set a spectrum belongs to. The function +returns a Spectra of length equal to the unique levels of f. The +optional parameter p allows to define how the Spectra should be +split for potential parallel processing. The default is +p = x$dataStorage and hence a per storage file parallel processing is +applied for Spectra with on disk data representations (such as the +MsBackendMzR()). This also prevents that spectra from different data +files/samples are combined (eventually use e.g. p = x$dataOrigin or any +other spectra variables defining the originating samples for a spectrum). +Before combining the peaks data, all eventual present processing steps are +applied (by calling applyProcessing() on the Spectra). This function +will replace the original m/z and intensity values of a Spectra hence +it can not be called on a Spectra with a read-only backend. In such +cases, the backend should be changed to a writeable backend before +using the setBackend() function (to e.g. a MsBackendMemory() backend).

  • +
  • joinSpectraData(): Individual spectra variables can be directly +added with the $<- or [[<- syntax. The joinSpectraData() +function allows to merge a DataFrame to the existing spectra +data of a Spectra. This function diverges from the merge() method in +two main ways:

    • The by.x and by.y column names must be of length 1.

    • +
    • If variable names are shared in x and y, the spectra +variables of x are not modified. It's only the y +variables that are appended with the suffix defined in +suffix.y. This is to avoid modifying any core spectra +variables that would lead to an invalid object.

    • +
    • Duplicated Spectra keys (i.e. x[[by.x]]) are not +allowed. Duplicated keys in the DataFrame (i.e y[[by.y]]) +throw a warning and only the last occurrence is kept. These +should be explored and ideally be removed using for +QFeatures::reduceDataFrame(), PMS::reducePSMs() or similar +functions.

    • +
  • +
  • split(): splits the Spectra object based on parameter f into a list +of Spectra objects.

  • +
+ +
+

Usage

+
concatenateSpectra(x, ...)
+
+combineSpectra(
+  x,
+  f = x$dataStorage,
+  p = x$dataStorage,
+  FUN = combinePeaksData,
+  ...,
+  BPPARAM = bpparam()
+)
+
+joinSpectraData(x, y, by.x = "spectrumId", by.y, suffix.y = ".y")
+
+# S4 method for class 'Spectra'
+c(x, ...)
+
+# S4 method for class 'Spectra,ANY'
+split(x, f, drop = FALSE, ...)
+
+ +
+

Arguments

+ + +
x
+

A Spectra object.

+ + +
...
+

Additional arguments.

+ + +
f
+

For split(): factor defining how to split x. See base::split() +for details. +For combineSpectra(): factor defining the grouping of the spectra +that should be combined. Defaults to x$dataStorage.

+ + +
p
+

For combineSpectra(): factor defining how to split the input +Spectra for parallel processing. Defaults to x$dataStorage, i.e., +depending on the used backend, per-file parallel processing will be +performed.

+ + +
FUN
+

For combineSpectra(): function to combine the (peak matrices) +of the spectra. Defaults to combinePeaksData().

+ + +
BPPARAM
+

Parallel setup configuration. See bpparam() for more +information. This is passed directly to the backendInitialize() method +of the MsBackend.

+ + +
y
+

A DataFrame with the spectra variables to join/add.

+ + +
by.x
+

A character(1) specifying the spectra variable used +for merging. Default is "spectrumId".

+ + +
by.y
+

A character(1) specifying the column used for +merging. Set to by.x if missing.

+ + +
suffix.y
+

A character(1) specifying the suffix to be used +for making the names of columns in the merged spectra variables +unique. This suffix will be used to amend names(y), while +spectraVariables(x) will remain unchanged.

+ + +
drop
+

For split(): not considered.

+ +
+
+

See also

+
+
  • combinePeaks() for functions to aggregate mass peaks data.

  • +
  • Spectra for a general description of the Spectra object.

  • +
+
+
+

Author

+

Sebastian Gibb, Johannes Rainer, Laurent Gatto

+
+ +
+

Examples

+

+## Create a Spectra providing a `DataFrame` containing a MS data.
+
+spd <- DataFrame(msLevel = c(1L, 2L), rtime = c(1.1, 1.2))
+spd$mz <- list(c(100, 103.2, 104.3, 106.5), c(45.6, 120.4, 190.2))
+spd$intensity <- list(c(200, 400, 34.2, 17), c(12.3, 15.2, 6.8))
+
+s <- Spectra(spd)
+s
+#> MSn data (Spectra) with 2 spectra in a MsBackendMemory backend:
+#>     msLevel     rtime scanIndex
+#>   <integer> <numeric> <integer>
+#> 1         1       1.1        NA
+#> 2         2       1.2        NA
+#>  ... 16 more variables/columns.
+
+## Create a second Spectra from mzML files and use the `MsBackendMzR`
+## on-disk backend.
+sciex_file <- dir(system.file("sciex", package = "msdata"),
+    full.names = TRUE)
+sciex <- Spectra(sciex_file, backend = MsBackendMzR())
+sciex
+#> MSn data (Spectra) with 1862 spectra in a MsBackendMzR backend:
+#>        msLevel     rtime scanIndex
+#>      <integer> <numeric> <integer>
+#> 1            1     0.280         1
+#> 2            1     0.559         2
+#> 3            1     0.838         3
+#> 4            1     1.117         4
+#> 5            1     1.396         5
+#> ...        ...       ...       ...
+#> 1858         1   258.636       927
+#> 1859         1   258.915       928
+#> 1860         1   259.194       929
+#> 1861         1   259.473       930
+#> 1862         1   259.752       931
+#>  ... 33 more variables/columns.
+#> 
+#> file(s):
+#> 20171016_POOL_POS_1_105-134.mzML
+#> 20171016_POOL_POS_3_105-134.mzML
+
+## Subset to the first 100 spectra to reduce running time of the examples
+sciex <- sciex[1:100]
+
+
+##  --------  COMBINE SPECTRA  --------
+
+## Combining the `Spectra` object `s` with the MS data from `sciex`.
+## Calling directly `c(s, sciex)` would result in an error because
+## both backends use a different backend. We thus have to first change
+## the backends to the same backend. We change the backend of the `sciex`
+## `Spectra` to a `MsBackendMemory`, the backend used by `s`.
+
+sciex <- setBackend(sciex, MsBackendMemory())
+
+## Combine the two `Spectra`
+all <- c(s, sciex)
+all
+#> MSn data (Spectra) with 102 spectra in a MsBackendMemory backend:
+#>       msLevel     rtime scanIndex
+#>     <integer> <numeric> <integer>
+#> 1           1     1.100        NA
+#> 2           2     1.200        NA
+#> 3           1     0.280         1
+#> 4           1     0.559         2
+#> 5           1     0.838         3
+#> ...       ...       ...       ...
+#> 98          1    26.786        96
+#> 99          1    27.065        97
+#> 100         1    27.344        98
+#> 101         1    27.623        99
+#> 102         1    27.902       100
+#>  ... 33 more variables/columns.
+#> Processing:
+#>  Switch backend from MsBackendMzR to MsBackendMemory [Wed Sep 25 13:45:18 2024]
+#>  Merge 2 Spectra into one [Wed Sep 25 13:45:18 2024] 
+
+## The new `Spectra` objects contains the union of spectra variables from
+## both:
+spectraVariables(all)
+#>  [1] "msLevel"                  "rtime"                   
+#>  [3] "acquisitionNum"           "scanIndex"               
+#>  [5] "dataStorage"              "dataOrigin"              
+#>  [7] "centroided"               "smoothed"                
+#>  [9] "polarity"                 "precScanNum"             
+#> [11] "precursorMz"              "precursorIntensity"      
+#> [13] "precursorCharge"          "collisionEnergy"         
+#> [15] "isolationWindowLowerMz"   "isolationWindowTargetMz" 
+#> [17] "isolationWindowUpperMz"   "peaksCount"              
+#> [19] "totIonCurrent"            "basePeakMZ"              
+#> [21] "basePeakIntensity"        "ionisationEnergy"        
+#> [23] "lowMZ"                    "highMZ"                  
+#> [25] "mergedScan"               "mergedResultScanNum"     
+#> [27] "mergedResultStartScanNum" "mergedResultEndScanNum"  
+#> [29] "injectionTime"            "filterString"            
+#> [31] "spectrumId"               "ionMobilityDriftTime"    
+#> [33] "scanWindowLowerLimit"     "scanWindowUpperLimit"    
+
+## The spectra variables that were not present in `s`:
+setdiff(spectraVariables(all), spectraVariables(s))
+#>  [1] "peaksCount"               "totIonCurrent"           
+#>  [3] "basePeakMZ"               "basePeakIntensity"       
+#>  [5] "ionisationEnergy"         "lowMZ"                   
+#>  [7] "highMZ"                   "mergedScan"              
+#>  [9] "mergedResultScanNum"      "mergedResultStartScanNum"
+#> [11] "mergedResultEndScanNum"   "injectionTime"           
+#> [13] "filterString"             "spectrumId"              
+#> [15] "ionMobilityDriftTime"     "scanWindowLowerLimit"    
+#> [17] "scanWindowUpperLimit"    
+
+## The values for these were filled with missing values for spectra from
+## `s`:
+all$peaksCount |> head()
+#> [1]   NA   NA  578 1529 1600 1664
+
+
+##  --------  AGGREGATE SPECTRA  --------
+
+## Sets of spectra can be combined into a single, representative spectrum
+## per set using `combineSpectra()`. This aggregates the peaks data (i.e.
+## the spectra's m/z and intensity values) while using the values for all
+## spectra variables from the first spectrum per set. Below we define the
+## sets as all spectra measured in the *same second*, i.e. rounding their
+## retention time to the next closer integer value.
+f <- round(rtime(sciex))
+head(f)
+#> [1] 0 1 1 1 1 2
+
+cmp <- combineSpectra(sciex, f = f)
+
+## The length of `cmp` is now equal to the length of unique levels in `f`:
+length(cmp)
+#> [1] 29
+
+## The spectra variable value from the first spectrum per set is used in
+## the representative/combined spectrum:
+cmp$rtime
+#>  [1]  0.280  0.559  1.675  2.512  3.628  4.744  5.581  6.697  7.534  8.650
+#> [11]  9.766 10.603 11.719 12.556 13.672 14.509 15.625 16.741 17.578 18.694
+#> [21] 19.531 20.647 21.763 22.601 23.717 24.554 25.670 26.507 27.623
+
+## The peaks data was aggregated: the number of mass peaks of the first six
+## spectra from the original `Spectra`:
+lengths(sciex) |> head()
+#> [1]  578 1529 1600 1664 1417 1602
+
+## and for the first aggreagated spectra:
+lengths(cmp) |> head()
+#> [1]  578 3928 3177 3597 3928 3190
+
+## The default peaks data aggregation method joins all mass peaks. See
+## documentation of the `combinePeaksData()` function for more options.
+
+
+##  --------  SPLITTING DATA  --------
+
+## A `Spectra` can be split into a `list` of `Spectra` objects using the
+## `split()` function defining the sets into which the `Spectra` should
+## be splitted into with parameter `f`.
+sciex_split <- split(sciex, f)
+
+length(sciex_split)
+#> [1] 29
+sciex_split |> head()
+#> $`0`
+#> MSn data (Spectra) with 1 spectra in a MsBackendMemory backend:
+#>     msLevel     rtime scanIndex
+#>   <integer> <numeric> <integer>
+#> 1         1      0.28         1
+#>  ... 33 more variables/columns.
+#> Processing:
+#>  Switch backend from MsBackendMzR to MsBackendMemory [Wed Sep 25 13:45:18 2024] 
+#> 
+#> $`1`
+#> MSn data (Spectra) with 4 spectra in a MsBackendMemory backend:
+#>     msLevel     rtime scanIndex
+#>   <integer> <numeric> <integer>
+#> 1         1     0.559         2
+#> 2         1     0.838         3
+#> 3         1     1.117         4
+#> 4         1     1.396         5
+#>  ... 33 more variables/columns.
+#> Processing:
+#>  Switch backend from MsBackendMzR to MsBackendMemory [Wed Sep 25 13:45:18 2024] 
+#> 
+#> $`2`
+#> MSn data (Spectra) with 3 spectra in a MsBackendMemory backend:
+#>     msLevel     rtime scanIndex
+#>   <integer> <numeric> <integer>
+#> 1         1     1.675         6
+#> 2         1     1.954         7
+#> 3         1     2.233         8
+#>  ... 33 more variables/columns.
+#> Processing:
+#>  Switch backend from MsBackendMzR to MsBackendMemory [Wed Sep 25 13:45:18 2024] 
+#> 
+#> $`3`
+#> MSn data (Spectra) with 4 spectra in a MsBackendMemory backend:
+#>     msLevel     rtime scanIndex
+#>   <integer> <numeric> <integer>
+#> 1         1     2.512         9
+#> 2         1     2.791        10
+#> 3         1     3.070        11
+#> 4         1     3.349        12
+#>  ... 33 more variables/columns.
+#> Processing:
+#>  Switch backend from MsBackendMzR to MsBackendMemory [Wed Sep 25 13:45:18 2024] 
+#> 
+#> $`4`
+#> MSn data (Spectra) with 4 spectra in a MsBackendMemory backend:
+#>     msLevel     rtime scanIndex
+#>   <integer> <numeric> <integer>
+#> 1         1     3.628        13
+#> 2         1     3.907        14
+#> 3         1     4.186        15
+#> 4         1     4.465        16
+#>  ... 33 more variables/columns.
+#> Processing:
+#>  Switch backend from MsBackendMzR to MsBackendMemory [Wed Sep 25 13:45:18 2024] 
+#> 
+#> $`5`
+#> MSn data (Spectra) with 3 spectra in a MsBackendMemory backend:
+#>     msLevel     rtime scanIndex
+#>   <integer> <numeric> <integer>
+#> 1         1     4.744        17
+#> 2         1     5.023        18
+#> 3         1     5.302        19
+#>  ... 33 more variables/columns.
+#> Processing:
+#>  Switch backend from MsBackendMzR to MsBackendMemory [Wed Sep 25 13:45:18 2024] 
+#> 
+
+
+##  --------  ADDING SPECTRA DATA  --------
+
+## Adding new spectra variables
+sciex1 <- filterDataOrigin(sciex, dataOrigin(sciex)[1])
+spv <- DataFrame(spectrumId = sciex1$spectrumId[3:12], ## used for merging
+                 var1 = rnorm(10),
+                 var2 = sample(letters, 10))
+spv
+#> DataFrame with 10 rows and 3 columns
+#>                spectrumId       var1        var2
+#>               <character>  <numeric> <character>
+#> 1  sample=1 period=1 cy.. -0.8468964           p
+#> 2  sample=1 period=1 cy..  1.1970777           o
+#> 3  sample=1 period=1 cy.. -0.5486274           r
+#> 4  sample=1 period=1 cy..  0.3030457           q
+#> 5  sample=1 period=1 cy.. -0.0569705           z
+#> 6  sample=1 period=1 cy.. -0.9578494           e
+#> 7  sample=1 period=1 cy..  0.5910619           c
+#> 8  sample=1 period=1 cy..  0.1731049           f
+#> 9  sample=1 period=1 cy..  1.3997834           k
+#> 10 sample=1 period=1 cy..  0.1174596           x
+
+sciex2 <- joinSpectraData(sciex1, spv, by.y = "spectrumId")
+
+spectraVariables(sciex2)
+#>  [1] "msLevel"                  "rtime"                   
+#>  [3] "acquisitionNum"           "scanIndex"               
+#>  [5] "dataStorage"              "dataOrigin"              
+#>  [7] "centroided"               "smoothed"                
+#>  [9] "polarity"                 "precScanNum"             
+#> [11] "precursorMz"              "precursorIntensity"      
+#> [13] "precursorCharge"          "collisionEnergy"         
+#> [15] "isolationWindowLowerMz"   "isolationWindowTargetMz" 
+#> [17] "isolationWindowUpperMz"   "peaksCount"              
+#> [19] "totIonCurrent"            "basePeakMZ"              
+#> [21] "basePeakIntensity"        "ionisationEnergy"        
+#> [23] "lowMZ"                    "highMZ"                  
+#> [25] "mergedScan"               "mergedResultScanNum"     
+#> [27] "mergedResultStartScanNum" "mergedResultEndScanNum"  
+#> [29] "injectionTime"            "filterString"            
+#> [31] "spectrumId"               "ionMobilityDriftTime"    
+#> [33] "scanWindowLowerLimit"     "scanWindowUpperLimit"    
+#> [35] "var1"                     "var2"                    
+spectraData(sciex2)[1:13, c("spectrumId", "var1", "var2")]
+#> DataFrame with 13 rows and 3 columns
+#>                 spectrumId      var1        var2
+#>                <character> <numeric> <character>
+#> 1   sample=1 period=1 cy..        NA          NA
+#> 2   sample=1 period=1 cy..        NA          NA
+#> 3   sample=1 period=1 cy.. -0.846896           p
+#> 4   sample=1 period=1 cy..  1.197078           o
+#> 5   sample=1 period=1 cy.. -0.548627           r
+#> ...                    ...       ...         ...
+#> 9   sample=1 period=1 cy..  0.591062           c
+#> 10  sample=1 period=1 cy..  0.173105           f
+#> 11  sample=1 period=1 cy..  1.399783           k
+#> 12  sample=1 period=1 cy..  0.117460           x
+#> 13  sample=1 period=1 cy..        NA          NA
+
+
+
+ + +
+ + + +
+ + + + + + diff --git a/reference/compareSpectra,Spectra,Spectra-method.html b/reference/compareSpectra,Spectra,Spectra-method.html index 49a023ae..4a859b38 100644 --- a/reference/compareSpectra,Spectra,Spectra-method.html +++ b/reference/compareSpectra,Spectra,Spectra-method.html @@ -1,8 +1,8 @@ - + - + diff --git a/reference/compareSpectra,Spectra,missing-method.html b/reference/compareSpectra,Spectra,missing-method.html index 49a023ae..4a859b38 100644 --- a/reference/compareSpectra,Spectra,missing-method.html +++ b/reference/compareSpectra,Spectra,missing-method.html @@ -1,8 +1,8 @@ - + - + diff --git a/reference/compareSpectra.html b/reference/compareSpectra.html new file mode 100644 index 00000000..04a5b2cd --- /dev/null +++ b/reference/compareSpectra.html @@ -0,0 +1,353 @@ + +Spectra similarity calculations — compareSpectra • Spectra + Skip to contents + + +
+
+
+ +
+

compareSpectra() compares each spectrum in x with each spectrum in y +using the function provided with FUN (defaults to ndotproduct()). If +y is missing, each spectrum in x is compared with each other spectrum +in x. +The matching/mapping of peaks between the compared spectra is done with the +MAPFUN function. The default joinPeaks() matches peaks of both spectra +and allows to keep all peaks from the first spectrum (type = "left"), +from the second (type = "right"), from both (type = "outer") and to +keep only matching peaks (type = "inner"); see joinPeaks() for more +information and examples). The MAPFUN function should have parameters +x, y, xPrecursorMz and yPrecursorMz as these values are passed to +the function.

+

In addition to joinPeaks() also joinPeaksGnps() is supported for +GNPS-like similarity score calculations. Note that joinPeaksGnps() should +only be used in combination with FUN = MsCoreUtils::gnps +(see joinPeaksGnps() for more information and details). Use +MAPFUN = joinPeaksNone to disable internal peak matching/mapping if a +similarity scoring function is used that performs the matching internally.

+

FUN is supposed to be a function to compare intensities of (matched) +peaks of the two spectra that are compared. The function needs to take two +matrices with columns "mz" and "intensity" as input and is supposed +to return a single numeric as result. In addition to the two peak matrices +the spectra's precursor m/z values are passed to the function as parameters +xPrecursorMz (precursor m/z of the x peak matrix) and yPrecursorMz +(precursor m/z of the y peak matrix). Additional parameters to functions +FUN and MAPFUN can be passed with .... Parameters ppm and +tolerance are passed to both MAPFUN and FUN. +The function returns a matrix with the results of FUN for each +comparison, number of rows equal to length(x) and number of columns +equal length(y) (i.e. element in row 2 and column 3 is the result from +the comparison of x[2] with y[3]). If SIMPLIFY = TRUE the matrix +is simplified to a numeric if length of x or y is one. See also +the vignette for additional examples, such as using spectral entropy +similarity in the scoring.

+
+ +
+

Usage

+
# S4 method for class 'Spectra,Spectra'
+compareSpectra(
+  x,
+  y,
+  MAPFUN = joinPeaks,
+  tolerance = 0,
+  ppm = 20,
+  FUN = ndotproduct,
+  ...,
+  SIMPLIFY = TRUE
+)
+
+# S4 method for class 'Spectra,missing'
+compareSpectra(
+  x,
+  y = NULL,
+  MAPFUN = joinPeaks,
+  tolerance = 0,
+  ppm = 20,
+  FUN = ndotproduct,
+  ...,
+  SIMPLIFY = TRUE
+)
+
+ +
+

Arguments

+ + +
x
+

A Spectra object.

+ + +
y
+

A Spectra object.

+ + +
MAPFUN
+

For compareSpectra(): function to map/match peaks between +the two compared spectra. See joinPeaks() for more information and +possible functions. Defaults to joinPeaks().

+ + +
tolerance
+

numeric(1) allowing to define a constant maximal +accepted difference between m/z values for peaks to be matched. This +parameter is directly passed to MAPFUN.

+ + +
ppm
+

numeric(1) defining a relative, m/z-dependent, maximal +accepted difference between m/z values for peaks to be matched. This +parameter is directly passed to MAPFUN.

+ + +
FUN
+

function to compare intensities of peaks between two spectra. +Defaults to ndotproduct().

+ + +
...
+

Additional arguments passed to the internal functions.

+ + +
SIMPLIFY
+

logical(1) defining whether the result matrix should be +simplified to a numeric if possible (i.e. if either x or y is +of length 1).

+ +
+
+

Author

+

Sebastian Gibb, Johannes Rainer, Laurent Gatto

+
+ +
+

Examples

+

+## Load a `Spectra` object with LC-MS/MS data.
+fl <- system.file("TripleTOF-SWATH", "PestMix1_DDA.mzML",
+    package = "msdata")
+sps_dda <- Spectra(fl)
+sps_dda
+#> MSn data (Spectra) with 7602 spectra in a MsBackendMzR backend:
+#>        msLevel     rtime scanIndex
+#>      <integer> <numeric> <integer>
+#> 1            1     0.231         1
+#> 2            1     0.351         2
+#> 3            1     0.471         3
+#> 4            1     0.591         4
+#> 5            1     0.711         5
+#> ...        ...       ...       ...
+#> 7598         1   899.491      7598
+#> 7599         1   899.613      7599
+#> 7600         1   899.747      7600
+#> 7601         1   899.872      7601
+#> 7602         1   899.993      7602
+#>  ... 33 more variables/columns.
+#> 
+#> file(s):
+#> PestMix1_DDA.mzML
+
+## Restrict to MS2 (fragment) spectra:
+sps_ms2 <- filterMsLevel(sps_dda, msLevel = 2L)
+
+## Compare spectra: comparing spectra 2 and 3 against spectra 10:20 using
+## the normalized dotproduct method.
+res <- compareSpectra(sps_ms2[2:3], sps_ms2[10:20])
+## first row contains comparisons of spectrum 2 with spectra 10 to 20 and
+## the second row comparisons of spectrum 3 with spectra 10 to 20
+res
+#>      [,1] [,2]       [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11]
+#> [1,]    0    0 0.05181365    0    0    0    0    0    0     0     0
+#> [2,]    0    0 0.20331585    0    0    0    0    0    0     0     0
+
+## We next calculate the pairwise similarity for the first 10 spectra
+compareSpectra(sps_ms2[1:10])
+#>             [,1]       [,2]       [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
+#>  [1,] 1.00000000 0.03261724 0.12798950    0    0    0    0  NaN    0     0
+#>  [2,] 0.03261724 1.00000000 0.07398183    0    0    0    0  NaN    0     0
+#>  [3,] 0.12798950 0.07398183 1.00000000    0    0    0    0  NaN    0     0
+#>  [4,] 0.00000000 0.00000000 0.00000000    1    0    0    0  NaN    0     0
+#>  [5,] 0.00000000 0.00000000 0.00000000    0    1    0    0  NaN    0     0
+#>  [6,] 0.00000000 0.00000000 0.00000000    0    0    1    0  NaN    0     0
+#>  [7,] 0.00000000 0.00000000 0.00000000    0    0    0    1  NaN    0     0
+#>  [8,]        NaN        NaN        NaN  NaN  NaN  NaN  NaN  NaN  NaN   NaN
+#>  [9,] 0.00000000 0.00000000 0.00000000    0    0    0    0  NaN    1     0
+#> [10,] 0.00000000 0.00000000 0.00000000    0    0    0    0  NaN    0     1
+
+## Use compareSpectra to determine the number of common (matching) peaks
+## with a ppm of 10:
+## type = "inner" uses a *inner join* to match peaks, i.e. keeps only
+## peaks that can be mapped betwen both spectra. The provided FUN returns
+## simply the number of matching peaks.
+compareSpectra(sps_ms2[2:3], sps_ms2[10:20], ppm = 10, type = "inner",
+    FUN = function(x, y, ...) nrow(x))
+#>      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11]
+#> [1,]    0    0    0    0    0    0    0    0    0     0     0
+#> [2,]    0    0    0    0    0    0    0    0    0     0     0
+
+## We repeat this calculation between all pairwise combinations
+## of the first 20 spectra
+compareSpectra(sps_ms2[1:20], ppm = 10, type = "inner",
+    FUN = function(x, y, ...) nrow(x))
+#>       [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
+#>  [1,]    3    0    0    0    0    0    0    0    0     0     0     1     0
+#>  [2,]    0    3    1    0    0    0    0    0    0     0     0     0     0
+#>  [3,]    0    1    3    0    0    0    0    0    0     0     0     0     0
+#>  [4,]    0    0    0    3    0    0    0    0    0     0     0     0     0
+#>  [5,]    0    0    0    0    1    0    0    0    0     0     0     0     0
+#>  [6,]    0    0    0    0    0   11    0    0    0     0     0     0     0
+#>  [7,]    0    0    0    0    0    0    8    0    0     0     0     0     0
+#>  [8,]    0    0    0    0    0    0    0    0    0     0     0     0     0
+#>  [9,]    0    0    0    0    0    0    0    0    7     0     0     0     0
+#> [10,]    0    0    0    0    0    0    0    0    0     4     0     0     0
+#> [11,]    0    0    0    0    0    0    0    0    0     0     3     0     0
+#> [12,]    1    0    0    0    0    0    0    0    0     0     0     4     0
+#> [13,]    0    0    0    0    0    0    0    0    0     0     0     0     2
+#> [14,]    0    0    0    0    0    0    0    0    0     0     0     0     0
+#> [15,]    0    0    0    0    0    0    0    0    0     0     0     0     0
+#> [16,]    0    0    0    0    0    0    0    0    0     0     0     0     0
+#> [17,]    0    0    0    0    0    0    0    0    0     0     0     0     0
+#> [18,]    0    0    0    0    0    0    0    0    0     0     0     0     0
+#> [19,]    0    0    0    0    0    0    0    0    1     0     0     0     0
+#> [20,]    0    0    0    0    0    0    0    0    0     0     0     0     0
+#>       [,14] [,15] [,16] [,17] [,18] [,19] [,20]
+#>  [1,]     0     0     0     0     0     0     0
+#>  [2,]     0     0     0     0     0     0     0
+#>  [3,]     0     0     0     0     0     0     0
+#>  [4,]     0     0     0     0     0     0     0
+#>  [5,]     0     0     0     0     0     0     0
+#>  [6,]     0     0     0     0     0     0     0
+#>  [7,]     0     0     0     0     0     0     0
+#>  [8,]     0     0     0     0     0     0     0
+#>  [9,]     0     0     0     0     0     1     0
+#> [10,]     0     0     0     0     0     0     0
+#> [11,]     0     0     0     0     0     0     0
+#> [12,]     0     0     0     0     0     0     0
+#> [13,]     0     0     0     0     0     0     0
+#> [14,]    16     0     2     0     0     2     0
+#> [15,]     0     1     0     0     0     0     0
+#> [16,]     2     0     5     0     0     2     0
+#> [17,]     0     0     0     3     1     0     0
+#> [18,]     0     0     0     1     1     0     0
+#> [19,]     2     0     2     0     0    11     0
+#> [20,]     0     0     0     0     0     0     4
+
+
+
+ + +
+ + + +
+ + + + + + + diff --git a/reference/containsMz,Spectra-method.html b/reference/containsMz,Spectra-method.html index 49a023ae..f87e600b 100644 --- a/reference/containsMz,Spectra-method.html +++ b/reference/containsMz,Spectra-method.html @@ -1,8 +1,8 @@ - + - + diff --git a/reference/containsMz.html b/reference/containsMz.html index 8dfe552b..f87e600b 100644 --- a/reference/containsMz.html +++ b/reference/containsMz.html @@ -1,8 +1,8 @@ - + - + diff --git a/reference/containsNeutralLoss,Spectra-method.html b/reference/containsNeutralLoss,Spectra-method.html index 49a023ae..f87e600b 100644 --- a/reference/containsNeutralLoss,Spectra-method.html +++ b/reference/containsNeutralLoss,Spectra-method.html @@ -1,8 +1,8 @@ - + - + diff --git a/reference/containsNeutralLoss.html b/reference/containsNeutralLoss.html index 8dfe552b..f87e600b 100644 --- a/reference/containsNeutralLoss.html +++ b/reference/containsNeutralLoss.html @@ -1,8 +1,8 @@ - + - + diff --git a/reference/coreSpectraVariables.html b/reference/coreSpectraVariables.html index 49a023ae..2aeb298e 100644 --- a/reference/coreSpectraVariables.html +++ b/reference/coreSpectraVariables.html @@ -1,8 +1,8 @@ - + - + diff --git a/reference/countIdentifications.html b/reference/countIdentifications.html index ae72aaf3..0922b339 100644 --- a/reference/countIdentifications.html +++ b/reference/countIdentifications.html @@ -21,7 +21,7 @@ Spectra - 1.15.8 + 1.15.9 + + + + + +
+
+
+ +
+

A variety of functions to filter or subset Spectra objects are available. +These can be generally separated into two main classes: I) classical +subset operations that immediately reduce the number of spectra in the +object and II) filters that reduce the content of the object without +changing its length (i.e. the number of spectra). The latter can be further +subdivided into functions that affect the content of the spectraData (i.e. +the general spectrum metadata) and those that reduce the content of the +object's peaksData (i.e. the m/z and intensity values of a spectrum's +mass peaks).

+

A description of functions from these 3 different categories are given below +in sections Subset Spectra, Filter content of spectraData() and +Filter content of peaksData(), respectively.

+
+ +
+

Usage

+
deisotopeSpectra(
+  x,
+  substDefinition = isotopicSubstitutionMatrix("HMDB_NEUTRAL"),
+  tolerance = 0,
+  ppm = 20,
+  charge = 1
+)
+
+reduceSpectra(x, tolerance = 0, ppm = 20)
+
+filterPrecursorMaxIntensity(x, tolerance = 0, ppm = 20)
+
+filterPrecursorIsotopes(
+  x,
+  tolerance = 0,
+  ppm = 20,
+  substDefinition = isotopicSubstitutionMatrix("HMDB_NEUTRAL")
+)
+
+filterPrecursorPeaks(
+  object,
+  tolerance = 0,
+  ppm = 20,
+  mz = c("==", ">="),
+  msLevel. = uniqueMsLevels(object)
+)
+
+# S4 method for class 'Spectra'
+dropNaSpectraVariables(object)
+
+# S4 method for class 'Spectra'
+selectSpectraVariables(
+  object,
+  spectraVariables = union(spectraVariables(object), peaksVariables(object))
+)
+
+# S4 method for class 'Spectra'
+x[i, j, ..., drop = FALSE]
+
+# S4 method for class 'Spectra'
+filterAcquisitionNum(
+  object,
+  n = integer(),
+  dataStorage = character(),
+  dataOrigin = character()
+)
+
+# S4 method for class 'Spectra'
+filterEmptySpectra(object)
+
+# S4 method for class 'Spectra'
+filterDataOrigin(object, dataOrigin = character())
+
+# S4 method for class 'Spectra'
+filterDataStorage(object, dataStorage = character())
+
+# S4 method for class 'Spectra'
+filterFourierTransformArtefacts(
+  object,
+  halfWindowSize = 0.05,
+  threshold = 0.2,
+  keepIsotopes = TRUE,
+  maxCharge = 5,
+  isotopeTolerance = 0.005
+)
+
+# S4 method for class 'Spectra'
+filterIntensity(
+  object,
+  intensity = c(0, Inf),
+  msLevel. = uniqueMsLevels(object),
+  ...
+)
+
+# S4 method for class 'Spectra'
+filterIsolationWindow(object, mz = numeric())
+
+# S4 method for class 'Spectra'
+filterMsLevel(object, msLevel. = integer())
+
+# S4 method for class 'Spectra'
+filterMzRange(
+  object,
+  mz = numeric(),
+  msLevel. = uniqueMsLevels(object),
+  keep = TRUE
+)
+
+# S4 method for class 'Spectra'
+filterMzValues(
+  object,
+  mz = numeric(),
+  tolerance = 0,
+  ppm = 20,
+  msLevel. = uniqueMsLevels(object),
+  keep = TRUE
+)
+
+# S4 method for class 'Spectra'
+filterPolarity(object, polarity = integer())
+
+# S4 method for class 'Spectra'
+filterPrecursorMz(object, mz = numeric())
+
+# S4 method for class 'Spectra'
+filterPrecursorMzRange(object, mz = numeric())
+
+# S4 method for class 'Spectra'
+filterPrecursorMzValues(object, mz = numeric(), ppm = 20, tolerance = 0)
+
+# S4 method for class 'Spectra'
+filterPrecursorCharge(object, z = integer())
+
+# S4 method for class 'Spectra'
+filterPrecursorScan(object, acquisitionNum = integer(), f = dataOrigin(object))
+
+# S4 method for class 'Spectra'
+filterRt(object, rt = numeric(), msLevel. = uniqueMsLevels(object))
+
+# S4 method for class 'Spectra'
+filterRanges(
+  object,
+  spectraVariables = character(),
+  ranges = numeric(),
+  match = c("all", "any")
+)
+
+# S4 method for class 'Spectra'
+filterValues(
+  object,
+  spectraVariables = character(),
+  values = numeric(),
+  ppm = 0,
+  tolerance = 0,
+  match = c("all", "any")
+)
+
+ +
+

Arguments

+ + +
x
+

Spectra object.

+ + +
substDefinition
+

For deisotopeSpectra() and +filterPrecursorIsotopes(): matrix or data.frame with definitions +of isotopic substitutions. Uses by default isotopic substitutions +defined from all compounds in the Human Metabolome Database (HMDB). See +isotopologues() or isotopicSubstitutionMatrix() in the +MetaboCoreUtils for details.

+ + +
tolerance
+

For filterMzValues() and reduceSpectra(): +numeric(1) allowing to define a constant maximal accepted difference +between m/z values for peaks to be matched (or grouped). For +containsMz() it can also be of length equal mz to specify a different +tolerance for each m/z value. +For filterPrecursorMaxIntensity(): numeric(1) defining the +(constant) maximal accepted difference of precursor m/z values of +spectra for grouping them into precursor groups. For +filterPrecursorIsotopes(): passed directly to the isotopologues() +function. For filterValues(): numeric of any length allowing to +define a maximal accepted difference between user input values and the +spectraVariables values. If it is not equal to the length of the +value provided with parameter spectraVariables, tolerance[1] will be +recycled. Default is tolerance = 0.

+ + +
ppm
+

For filterMzValues() and reduceSpectra(): numeric(1) +defining a relative, m/z-dependent, maximal accepted difference between +m/z values for peaks to be matched (or grouped). +For filterPrecursorMaxIntensity(): numeric(1) defining the relative +maximal accepted difference of precursor m/z values of spectra for +grouping them into precursor groups. For filterPrecursorIsotopes(): +passed directly to the isotopologues() function. +For filterValues(): numeric of any length allowing to define +a maximal accepted difference between user input values and the +spectraVariables values. If it is not equal to the length of the +value provided with parameter spectraVariables, ppm[1] will be +recycled.

+ + +
charge
+

For deisotopeSpectra(): expected charge of the ionized +compounds. See isotopologues() for details.

+ + +
object
+

Spectra object.

+ + +
mz
+

For filterIsolationWindow(): numeric(1) with the m/z value to +filter the object. For filterPrecursorMz() and filterMzRange(): +numeric(2) defining the lower and upper m/z boundary. +For filterMzValues() and filterPrecursorMzValues(): numeric with +the m/z values to match peaks or precursor m/z against. +For filterPrecursorPeaks(): character(1) defining whether mass peaks +with an m/z matching the spectrum's precursor m/z (mz = "==", +the default) or mass peaks with a m/z that is equal or larger +(mz = ">=") should be removed.

+ + +
msLevel.
+

integer defining the MS level(s) of the spectra to which +the function should be applied (defaults to all MS levels of object. +For filterMsLevel(): the MS level to which object should be +subsetted.

+ + +
spectraVariables
+

For selectSpectraVariables(): character with the +names of the spectra variables to which the backend should be +subsetted. For filterRanges() and filterValues(): character +vector specifying the column(s) from spectraData(object) on which +to filter the data and that correspond to the the names of the +spectra variables that should be used for the filtering.

+ + +
i
+

For [: integer, logical or character to subset the +object.

+ + +
j
+

For [: not supported.

+ + +
...
+

Additional arguments.

+ + +
drop
+

For [: not considered.

+ + +
n
+

for filterAcquisitionNum(): integer with the acquisition +numbers to filter for.

+ + +
dataStorage
+

For filterDataStorage(): character to define which +spectra to keep. +For filterAcquisitionNum(): optionally specify if filtering should +occur only for spectra of selected dataStorage.

+ + +
dataOrigin
+

For filterDataOrigin(): character to define which +spectra to keep. +For filterAcquisitionNum(): optionally specify if filtering should +occurr only for spectra of selected dataOrigin.

+ + +
halfWindowSize
+

For filterFourierTransformArtefacts(): numeric(1) +defining the m/z window left and right of a peak where to remove +fourier transform artefacts.

+ + +
threshold
+

For filterFourierTransformArtefacts(): the relative +intensity (to a peak) below which peaks are considered fourier +artefacts. Defaults to threshold = 0.2 hence removing peaks that +have an intensity below 0.2 times the intensity of the tested peak +(within the selected halfWindowSize).

+ + +
keepIsotopes
+

For filterFourierTransformArtefacts(): whether isotope +peaks should not be removed as fourier artefacts.

+ + +
maxCharge
+

For filterFourierTransformArtefacts(): the maximum charge +to be considered for isotopes.

+ + +
isotopeTolerance
+

For filterFourierTransformArtefacts(): the m/z +tolerance to be used to define whether peaks might be isotopes of +the current tested peak.

+ + +
intensity
+

For filterIntensity(): numeric of length 1 or 2 +defining either the lower or the lower and upper intensity limit for the +filtering, or a function that takes the intensities as input and +returns a logical (same length then peaks in the spectrum) whether the +peak should be retained or not. Defaults to intensity = c(0, Inf) thus +only peaks with NA intensity are removed.

+ + +
keep
+

For filterMzValues() and filterMzRange(): logical(1) +whether the matching peaks should be retained (keep = TRUE, the +default) or dropped (keep = FALSE).

+ + +
polarity
+

for filterPolarity(): integer specifying the polarity to +to subset object.

+ + +
z
+

For filterPrecursorCharge(): integer() with the precursor +charges to be used as filter.

+ + +
acquisitionNum
+

for filterPrecursorScan(): integer with the +acquisition number of the spectra to which the object should be +subsetted.

+ + +
f
+

For filterPrecursorScan(): defining which spectra +belong to the same original data file (sample): Defaults to +f = dataOrigin(x).

+ + +
rt
+

for filterRt(): numeric(2) defining the retention time range to +be used to subset/filter object.

+ + +
ranges
+

for filterRanges(): A numeric vector of paired values +(upper and lower boundary) that define the ranges to filter the object. +These paired values need to be in the same order as the +spectraVariables parameter (see below).

+ + +
match
+

For filterRanges() and filterValues(): character(1) +defining whether the condition has to match for all provided +ranges/values (match = "all"; the default), or for any of them +(match = "any") for spectra to be retained.

+ + +
values
+

for filterValues(): A numeric vector that define the +values to filter the Spectra data. These values need to be in the same +order as the spectraVariables parameter.

+ +
+
+

Subset Spectra

+ + + +

These functions affect the number of spectra in a Spectra object creating +a subset of the original object without affecting its content.

  • [: subsets the spectra keeping only selected elements (i). The method +always returns a Spectra object.

  • +
  • filterAcquisitionNum(): filters the object keeping only spectra matching +the provided acquisition numbers (argument n). If dataOrigin or +dataStorage is also provided, object is subsetted to the spectra with +an acquisition number equal to n in spectra with matching dataOrigin +or dataStorage values retaining all other spectra. +Returns the filtered Spectra.

  • +
  • filterDataOrigin(): filters the object retaining spectra matching the +provided dataOrigin. Parameter dataOrigin has to be of type +character and needs to match exactly the data origin value of the +spectra to subset. +Returns the filtered Spectra object (with spectra ordered according to +the provided dataOrigin parameter).

  • +
  • filterDataStorage(): filters the object retaining spectra stored in the +specified dataStorage. Parameter dataStorage has to be of type +character and needs to match exactly the data storage value of the +spectra to subset. +Returns the filtered Spectra object (with spectra ordered according to +the provided dataStorage parameter).

  • +
  • filterEmptySpectra(): removes empty spectra (i.e. spectra without peaks). +Returns the filtered Spectra object (with spectra in their +original order).

  • +
  • filterIsolationWindow(): retains spectra that contain mz in their +isolation window m/z range (i.e. with an isolationWindowLowerMz <= mz +and isolationWindowUpperMz >= mz. Returns the filtered Spectra +object (with spectra in their original order).

  • +
  • filterMsLevel(): filters object by MS level keeping only spectra matching +the MS level specified with argument msLevel. Returns the filtered +Spectra (with spectra in their original order).

  • +
  • filterPolarity(): filters the object keeping only spectra matching the +provided polarity. Returns the filtered Spectra (with spectra in their +original order).

  • +
  • filterPrecursorCharge(): retains spectra with the defined precursor +charge(s).

  • +
  • filterPrecursorIsotopes(): groups MS2 spectra based on their precursor +m/z and precursor intensity into predicted isotope groups and keep for each +only the spectrum representing the monoisotopic precursor. MS1 spectra +are returned as is. See documentation for deisotopeSpectra() below for +details on isotope prediction and parameter description.

  • +
  • filterPrecursorMaxIntensity(): filters the Spectra keeping for groups +of (MS2) spectra with similar precursor m/z values (given parameters +ppm and tolerance) the one with the highest precursor intensity. The +function filters only MS2 spectra and returns all MS1 spectra. If +precursor intensities are NA for all spectra within a spectra group, the +first spectrum of that groups is returned. +Note: some manufacturers don't provide precursor intensities. These can +however also be estimated with estimatePrecursorIntensity().

  • +
  • filterPrecursorMzRange() (previously filterPrecursorMz() which is now +deprecated): retains spectra with a precursor m/z within the +provided m/z range. See examples for details on selecting spectra with +a precursor m/z for a target m/z accepting a small difference in ppm.

  • +
  • filterPrecursorMzValues(): retains spectra with precursor m/z matching +any of the provided m/z values (given ppm and tolerance). Spectra with +missing precursor m/z value (e.g. MS1 spectra) are dropped.

  • +
  • filterPrecursorScan(): retains parent (e.g. MS1) and children scans (e.g. +MS2) of acquisition number acquisitionNum. Returns the filtered +Spectra (with spectra in their original order). Parameter f allows to +define which spectra belong to the same sample or original data file ( +defaults to f = dataOrigin(object)).

  • +
  • filterRanges(): allows filtering of the Spectra object based on user +defined numeric ranges (parameter ranges) for one or more available +spectra variables in object (spectra variable names can be specified with +parameter spectraVariables). Spectra for which the value of a spectra +variable is within it's defined range are retained. If multiple +ranges/spectra variables are defined, the match parameter can be used +to specify whether all conditions (match = "all"; the default) or if +any of the conditions must match (match = "any"; all spectra for which +values are within any of the provided ranges are retained).

  • +
  • filterRt(): retains spectra of MS level msLevel with retention +times (in seconds) within (>=) rt[1] and (<=) +rt[2]. Returns the filtered Spectra (with spectra in their +original order).

  • +
  • filterValues(): allows filtering of the Spectra object based on +similarities of numeric values of one or more spectraVariables(object) +(parameter spectraVariables) to provided values (parameter values) +given acceptable differences (parameters tolerance and ppm). If multiple +values/spectra variables are defined, the match parameter can be used +to specify whether all conditions (match = "all"; the default) or if +any of the conditions must match (match = "any"; all spectra for which +values are within any of the provided ranges are retained).

  • +
+
+

Filter content of spectraData()

+ + + +

The functions described in this section filter the content from a +Spectra's spectra data, i.e. affect values of, or complete, spectra +variables. None of these functions reduces the object's number of spectra.

  • dropNaSpectraVariables(): removes spectra variables (i.e. columns in the +object's spectraData that contain only missing values (NA). Note that +while columns with only NAs are removed, a spectraData() call after +dropNaSpectraVariables() might still show columns containing NA values +for core spectra variables. The total number of spectra is not changed +by this function.

  • +
  • selectSpectraVariables(): reduces the information within the object to +the selected spectra variables: all data for variables not specified will +be dropped. For mandatory columns (i.e., those listed by +coreSpectraVariables(), such as msLevel, rtime ...) only +the values will be dropped but not the variable itself. Additional (or +user defined) spectra variables will be completely removed. +Returns the filtered Spectra.

  • +
+
+

Filter content of peaksData()

+ + + +

The functions described in this section filter the content of the +Spectra's peaks data, i.e. either the number or the values (m/z or +intensity values) of the mass peaks. Also, the actual operation is only +executed once peaks data is accessed (through peaksData(), +mz() or intensity()) or applyProcessing() is called. +These operations don't affect the number of spectra in the Spectra object.

  • deisotopeSpectra(): deisotopes each spectrum keeping only the +monoisotopic peak for groups of isotopologues. Isotopologues are +estimated using the isotopologues() function from the +MetaboCoreUtils package. Note that +the default parameters for isotope prediction/detection have been +determined using data from the Human Metabolome Database (HMDB) and +isotopes for elements other than CHNOPS might not be detected. See +parameter substDefinition in the documentation of isotopologues() for +more information. The approach and code to define the parameters for +isotope prediction is described +here.

  • +
  • filterFourierTransformArtefacts(): removes (Orbitrap) fast fourier +artefact peaks from spectra (see examples below). The function iterates +through all intensity ordered peaks in a spectrum and removes all peaks +with an m/z within +/- halfWindowSize of the current peak if their +intensity is lower than threshold times the current peak's intensity. +Additional parameters keepIsotopes, maxCharge and isotopeTolerance +allow to avoid removing of potential [13]C isotope peaks (maxCharge +being the maximum charge that should be considered and isotopeTolerance +the absolute acceptable tolerance for matching their m/z). +See filterFourierTransformArtefacts() for details and background and +deisitopeSpectra() for an alternative.

  • +
  • filterIntensity(): filters mass peaks in each spectrum keeping only +those with intensities that are within the provided range or match the +criteria of the provided function. For the former, parameter intensity +has to be a numeric defining the intensity range, for the latter a +function that takes the intensity values of the spectrum and returns +a logical whether the peak should be retained or not (see examples +below for details) - additional parameters to the function can be passed +with .... +To remove only peaks with intensities below a certain threshold, say +100, use intensity = c(100, Inf). Note: also a single value can be +passed with the intensity parameter in which case an upper limit of +Inf is used. +Note that this function removes also peaks with missing intensities +(i.e. an intensity of NA). Parameter msLevel. allows to restrict the +filtering to spectra of the specified MS level(s).

  • +
  • filterMzRange(): filters mass peaks in the object keeping or removing +those in each spectrum that are within the provided m/z range. Whether +peaks are retained or removed can be configured with parameter keep +(default keep = TRUE).

  • +
  • filterMzValues(): filters mass peaks in the object keeping all +peaks in each spectrum that match the provided m/z value(s) (for +keep = TRUE, the default) or removing all of them (for keep = FALSE). +The m/z matching considers also the absolute tolerance and m/z-relative +ppm values. tolerance and ppm have to be of length 1.

  • +
  • filterPeaksRanges(): filters mass peaks of a Spectra object using any +set of range-based filters on numeric spectra or peaks variables. See +filterPeaksRanges() for more information.

  • +
  • filterPrecursorPeaks(): removes peaks from each spectrum in object with +an m/z equal or larger than the m/z of the precursor, depending on the +value of parameter mz: for mz = ==" (the default) peaks with matching m/z (considering an absolute and relative acceptable difference depending on toleranceandppm, respectively) are removed. For mz = ">="all peaks with an m/z larger or equal to the precursor m/z (minustoleranceand theppmof the precursor m/z) are removed. ParametermsLevel.allows to restrict the filter to certain MS levels (by default the filter is applied to all MS levels). Note that no peaks are removed if the precursor m/z isNA` (e.g. typically for MS1 spectra).

  • +
  • reduceSpectra(): keeps for groups of peaks with similar m/z values in +(given ppm and tolerance) in each spectrum only the mass peak with the +highest intensity removing all other peaks hence reducing each +spectrum to the highest intensity peaks per peak group. +Peak groups are defined using the group() function from the +MsCoreUtils package. See also the combinePeaks() function for an +alternative function to combine peaks within each spectrum.

  • +
+
+

See also

+
+
+
+
+

Author

+

Sebastian Gibb, Johannes Rainer, Laurent Gatto, Philippine Louail, Nir Shahaf

+
+ +
+

Examples

+

+## Load a `Spectra` object with LC-MS/MS data.
+fl <- system.file("TripleTOF-SWATH", "PestMix1_DDA.mzML",
+    package = "msdata")
+sps_dda <- Spectra(fl)
+sps_dda
+#> MSn data (Spectra) with 7602 spectra in a MsBackendMzR backend:
+#>        msLevel     rtime scanIndex
+#>      <integer> <numeric> <integer>
+#> 1            1     0.231         1
+#> 2            1     0.351         2
+#> 3            1     0.471         3
+#> 4            1     0.591         4
+#> 5            1     0.711         5
+#> ...        ...       ...       ...
+#> 7598         1   899.491      7598
+#> 7599         1   899.613      7599
+#> 7600         1   899.747      7600
+#> 7601         1   899.872      7601
+#> 7602         1   899.993      7602
+#>  ... 33 more variables/columns.
+#> 
+#> file(s):
+#> PestMix1_DDA.mzML
+
+
+##  --------  SUBSET SPECTRA  --------
+
+## Subset to the first 3 spectra
+tmp <- sps_dda[1:3]
+tmp
+#> MSn data (Spectra) with 3 spectra in a MsBackendMzR backend:
+#>     msLevel     rtime scanIndex
+#>   <integer> <numeric> <integer>
+#> 1         1     0.231         1
+#> 2         1     0.351         2
+#> 3         1     0.471         3
+#>  ... 33 more variables/columns.
+#> 
+#> file(s):
+#> PestMix1_DDA.mzML
+length(tmp)
+#> [1] 3
+
+## Subset to all MS2 spectra; this could be done with [, or, more
+## efficiently, with the `filterMsLevel` function:
+sps_dda[msLevel(sps_dda) == 2L]
+#> MSn data (Spectra) with 2975 spectra in a MsBackendMzR backend:
+#>        msLevel     rtime scanIndex
+#>      <integer> <numeric> <integer>
+#> 1            2     7.216        58
+#> 2            2    13.146       106
+#> 3            2    13.556       108
+#> 4            2    23.085       186
+#> 5            2    25.055       201
+#> ...        ...       ...       ...
+#> 2971         2   895.472      7570
+#> 2972         2   895.592      7571
+#> 2973         2   896.252      7575
+#> 2974         2   896.662      7577
+#> 2975         2   898.602      7591
+#>  ... 33 more variables/columns.
+#> 
+#> file(s):
+#> PestMix1_DDA.mzML
+filterMsLevel(sps_dda, 2L)
+#> MSn data (Spectra) with 2975 spectra in a MsBackendMzR backend:
+#>        msLevel     rtime scanIndex
+#>      <integer> <numeric> <integer>
+#> 1            2     7.216        58
+#> 2            2    13.146       106
+#> 3            2    13.556       108
+#> 4            2    23.085       186
+#> 5            2    25.055       201
+#> ...        ...       ...       ...
+#> 2971         2   895.472      7570
+#> 2972         2   895.592      7571
+#> 2973         2   896.252      7575
+#> 2974         2   896.662      7577
+#> 2975         2   898.602      7591
+#>  ... 33 more variables/columns.
+#> 
+#> file(s):
+#> PestMix1_DDA.mzML
+#> Processing:
+#>  Filter: select MS level(s) 2 [Wed Sep 25 13:46:14 2024] 
+
+## Filter the object keeping only MS2 spectra with an precursor m/z value
+## between a specified range:
+filterPrecursorMzRange(sps_dda, c(80, 90))
+#> MSn data (Spectra) with 138 spectra in a MsBackendMzR backend:
+#>       msLevel     rtime scanIndex
+#>     <integer> <numeric> <integer>
+#> 1           2    13.556       108
+#> 2           2    36.494       290
+#> 3           2    41.684       329
+#> 4           2    42.333       334
+#> 5           2    43.273       340
+#> ...       ...       ...       ...
+#> 134         2   879.043      7451
+#> 135         2   884.043      7489
+#> 136         2   884.103      7490
+#> 137         2   889.513      7528
+#> 138         2   892.542      7551
+#>  ... 33 more variables/columns.
+#> 
+#> file(s):
+#> PestMix1_DDA.mzML
+#> Processing:
+#>  Filter: select spectra with a precursor m/z within [80, 90] [Wed Sep 25 13:46:14 2024] 
+
+## Filter the object to MS2 spectra with an precursor m/z matching a
+## pre-defined value (given ppm and tolerance)
+filterPrecursorMzValues(sps_dda, 85, ppm = 5, tolerance = 0.1)
+#> MSn data (Spectra) with 14 spectra in a MsBackendMzR backend:
+#>       msLevel     rtime scanIndex
+#>     <integer> <numeric> <integer>
+#> 1           2   428.076      3664
+#> 2           2   513.070      4648
+#> 3           2   601.733      5307
+#> 4           2   620.762      5455
+#> 5           2   632.691      5542
+#> ...       ...       ...       ...
+#> 10          2   746.243      6390
+#> 11          2   788.320      6695
+#> 12          2   821.767      6939
+#> 13          2   838.156      7056
+#> 14          2   844.176      7105
+#>  ... 33 more variables/columns.
+#> 
+#> file(s):
+#> PestMix1_DDA.mzML
+#> Processing:
+#>  Filter: select spectra with precursor m/z matching 85 [Wed Sep 25 13:46:14 2024] 
+
+## The `filterRanges()` function allows to filter a `Spectra` based on
+## numerical ranges of any of its (numerical) spectra variables.
+## First, determine the variable(s) on which to base the filtering:
+sv <- c("rtime", "precursorMz", "peaksCount")
+## Note that ANY variables can be chosen here, and as many as wanted.
+
+## Define the ranges (pairs of values with lower and upper boundary) to be
+## used for the individual spectra variables. The first two values will be
+## used for the first spectra variable (e.g., `"rtime"` here), the next two
+## for the second (e.g. `"precursorMz"` here) and so on:
+ranges <- c(30, 350, 200, 500, 350, 600)
+
+## Input the parameters within the filterRanges function:
+filt_spectra <- filterRanges(sps_dda, spectraVariables = sv,
+                ranges = ranges)
+filt_spectra
+#> MSn data (Spectra) with 3 spectra in a MsBackendMzR backend:
+#>     msLevel     rtime scanIndex
+#>   <integer> <numeric> <integer>
+#> 1         2   237.460      1810
+#> 2         2   343.322      2601
+#> 3         2   346.872      2629
+#>  ... 33 more variables/columns.
+#> 
+#> file(s):
+#> PestMix1_DDA.mzML
+#> Processing:
+#>  Filter: select spectra with a rtime within: [30, 350] [Wed Sep 25 13:46:14 2024]
+#>  Filter: select spectra with a precursorMz within: [200, 500] [Wed Sep 25 13:46:14 2024]
+#>  Filter: select spectra with a peaksCount within: [350, 600] [Wed Sep 25 13:46:14 2024] 
+
+## `filterRanges()` can also be used to filter a `Spectra` object with
+## multiple ranges for the same `spectraVariable` (e.g, here `"rtime"`)
+sv <- c("rtime", "rtime")
+ranges <- c(30, 100, 200, 300)
+filt_spectra <- filterRanges(sps_dda, spectraVariables = sv,
+                ranges = ranges, match = "any")
+filt_spectra
+#> MSn data (Spectra) with 1252 spectra in a MsBackendMzR backend:
+#>        msLevel     rtime scanIndex
+#>      <integer> <numeric> <integer>
+#> 1            1    30.050       241
+#> 2            2    30.314       242
+#> 3            1    30.452       243
+#> 4            1    30.601       244
+#> 5            1    30.721       245
+#> ...        ...       ...       ...
+#> 1248         1   299.176      2266
+#> 1249         1   299.304      2267
+#> 1250         2   299.575      2268
+#> 1251         1   299.713      2269
+#> 1252         2   299.985      2270
+#>  ... 33 more variables/columns.
+#> 
+#> file(s):
+#> PestMix1_DDA.mzML
+#> Processing:
+#>  Filter: select spectra with a rtime within: [30, 100] [Wed Sep 25 13:46:14 2024]
+#>  Filter: select spectra with a rtime within: [200, 300] [Wed Sep 25 13:46:14 2024] 
+
+## While `filterRanges()` filtered on numeric ranges, `filterValues()`
+## allows to filter an object matching spectra variable values to user
+## provided values (allowing to configure allowed differences using the
+## `ppm` and `tolerance` parameters).
+## First determine the variable(s) on which to base the filtering:
+sv <- c("rtime", "precursorMz")
+## Note that ANY variables can be chosen here, and as many as wanted.
+
+## Define the values that will be used to filter the spectra based on their
+## similarities to their respective `spectraVariables`.
+## The first values in the parameters values, tolerance and ppm will be
+## used for the first spectra variable (e.g. `"rtime"` here), the next for
+## the second (e.g. `"precursorMz"` here) and so on:
+values <- c(350, 80)
+tolerance <- c(100, 0.1)
+ppm <- c(0, 50)
+
+## Input the parameters within the `filterValues()` function:
+filt_spectra <- filterValues(sps_dda, spectraVariables = sv,
+                values = values, tolerance = tolerance, ppm = ppm)
+filt_spectra
+#> MSn data (Spectra) with 1 spectra in a MsBackendMzR backend:
+#>     msLevel     rtime scanIndex
+#>   <integer> <numeric> <integer>
+#> 1         2   427.546      3657
+#>  ... 33 more variables/columns.
+#> 
+#> file(s):
+#> PestMix1_DDA.mzML
+#> Processing:
+#>  Filter: select spectra with a rtime similar to: 350 [Wed Sep 25 13:46:14 2024]
+#>  Filter: select spectra with a precursorMz similar to: 80 [Wed Sep 25 13:46:14 2024] 
+
+
+##  --------  FILTER SPECTRA DATA  --------
+
+## Remove spectra variables without content (i.e. with only missing values)
+sps_noNA <- dropNaSpectraVariables(sps_dda)
+
+## This reduced the size of the object slightly
+print(object.size(sps_dda), unit = "MB")
+#> 2.2 Mb
+print(object.size(sps_noNA), unit = "MB")
+#> 2 Mb
+
+## With the `selectSpectraVariables()` function it is in addition possible
+## to subset the data of a `Spectra` to the selected columns/variables,
+## keeping only their data:
+tmp <- selectSpectraVariables(sps_dda, c("msLevel", "mz", "intensity",
+    "scanIndex"))
+print(object.size(tmp), units = "MB")
+#> 0.1 Mb
+
+## Except the selected variables, all data is now removed. Accessing
+## core spectra variables still works, but returns only NA
+rtime(tmp) |> head()
+#> [1] NA NA NA NA NA NA
+
+
+##  --------  FILTER PEAKS DATA  --------
+
+## `filterMzValues()` filters the mass peaks data of a `Spectra` retaining
+## only those mass peaks with an m/z value matching the provided value(s).
+sps_sub <- filterMzValues(sps_dda, mz = c(103, 104), tolerance = 0.3)
+
+## The filtered `Spectra` has the same length
+length(sps_dda)
+#> [1] 7602
+length(sps_sub)
+#> [1] 7602
+
+## But the number of mass peaks changed
+lengths(sps_dda) |> head()
+#> [1] 223 211 227 210 220 228
+lengths(sps_sub) |> head()
+#> [1] 2 2 1 2 2 2
+
+## This function can also be used to remove specific peaks from a spectrum
+## by setting `keep = FALSE`.
+sps_sub <- filterMzValues(sps_dda, mz = c(103, 104),
+    tolerance = 0.3, keep = FALSE)
+lengths(sps_sub) |> head()
+#> [1] 221 209 226 208 218 226
+
+## With the `filterMzRange()` function it is possible to keep (or remove)
+## mass peaks with m/z values within a specified numeric range.
+sps_sub <- filterMzRange(sps_dda, mz = c(100, 150))
+lengths(sps_sub) |> head()
+#> [1] 54 55 52 59 60 52
+
+## See also the `filterPeaksRanges()` function for a more flexible framework
+## to filter mass peaks
+
+
+## Removing fourier transform artefacts seen in Orbitra data.
+
+## Loading an Orbitrap spectrum with artefacts.
+data(fft_spectrum)
+plotSpectra(fft_spectrum, xlim = c(264.5, 265.5))
+
+plotSpectra(fft_spectrum, xlim = c(264.5, 265.5), ylim = c(0, 5e6))
+
+
+fft_spectrum <- filterFourierTransformArtefacts(fft_spectrum)
+fft_spectrum
+#> MSn data (Spectra) with 1 spectra in a MsBackendDataFrame backend:
+#>     msLevel     rtime scanIndex
+#>   <integer> <numeric> <integer>
+#> 1         1   367.665       195
+#>  ... 33 more variables/columns.
+#> Lazy evaluation queue: 1 processing step(s)
+#> Processing:
+#>  Switch backend from MsBackendMzR to MsBackendDataFrame [Mon Nov 22 14:14:45 2021]
+#>  Remove fast fourier artefacts. [Wed Sep 25 13:46:17 2024] 
+plotSpectra(fft_spectrum, xlim = c(264.5, 265.5), ylim = c(0, 5e6))
+
+
+## Using a few examples peaks in your data you can optimize the parameters
+fft_spectrum_filtered <- filterFourierTransformArtefacts(fft_spectrum,
+                                               halfWindowSize = 0.2,
+                                               threshold = 0.005,
+                                               keepIsotopes = TRUE,
+                                               maxCharge = 5,
+                                               isotopeTolerance = 0.005
+                                               )
+
+fft_spectrum_filtered
+#> MSn data (Spectra) with 1 spectra in a MsBackendDataFrame backend:
+#>     msLevel     rtime scanIndex
+#>   <integer> <numeric> <integer>
+#> 1         1   367.665       195
+#>  ... 33 more variables/columns.
+#> Lazy evaluation queue: 2 processing step(s)
+#> Processing:
+#>  Switch backend from MsBackendMzR to MsBackendDataFrame [Mon Nov 22 14:14:45 2021]
+#>  Remove fast fourier artefacts. [Wed Sep 25 13:46:17 2024]
+#>  Remove fast fourier artefacts. [Wed Sep 25 13:46:17 2024] 
+length(mz(fft_spectrum_filtered)[[1]])
+#> [1] 297
+plotSpectra(fft_spectrum_filtered, xlim = c(264.5, 265.5), ylim = c(0, 5e6))
+
+
+
+## *Reducing* a `Spectra` keeping for groups of mass peaks (characterized
+## by similarity of their m/z values) only one representative peak. This
+## function helps cleaning fragment spectra.
+## Filter the data set to MS2 spectra
+ms2 <- filterMsLevel(sps_dda, 2L)
+
+## For groups of fragment peaks with a difference in m/z < 0.1, keep only
+## the largest one.
+ms2_red <- reduceSpectra(ms2, ppm = 0, tolerance = 0.1)
+lengths(ms2) |> tail()
+#> [1] 23  3  1 35  2  7
+lengths(ms2_red) |> tail()
+#> [1] 19  2  1 27  1  7
+
+
+
+ + +
+ + + +
+ + + + + + + diff --git a/reference/filterMzRange,Spectra-method.html b/reference/filterMzRange,Spectra-method.html index 49a023ae..231c0b86 100644 --- a/reference/filterMzRange,Spectra-method.html +++ b/reference/filterMzRange,Spectra-method.html @@ -1,8 +1,8 @@ - + - + diff --git a/reference/filterMzRange.html b/reference/filterMzRange.html new file mode 100644 index 00000000..231c0b86 --- /dev/null +++ b/reference/filterMzRange.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/reference/filterMzValues,Spectra-method.html b/reference/filterMzValues,Spectra-method.html index 49a023ae..231c0b86 100644 --- a/reference/filterMzValues,Spectra-method.html +++ b/reference/filterMzValues,Spectra-method.html @@ -1,8 +1,8 @@ - + - + diff --git a/reference/filterMzValues.html b/reference/filterMzValues.html new file mode 100644 index 00000000..231c0b86 --- /dev/null +++ b/reference/filterMzValues.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/reference/filterPeaksRanges.html b/reference/filterPeaksRanges.html index 103f5076..4e2d83b3 100644 --- a/reference/filterPeaksRanges.html +++ b/reference/filterPeaksRanges.html @@ -77,7 +77,7 @@ Spectra - 1.15.8 + 1.15.9 + + + + + +
+
+
+ +
+

As detailed in the documentation of the Spectra class, a Spectra object +is a container for mass spectrometry (MS) data that includes both the mass +peaks data (or peaks data, generally m/z and intensity values) as well +as spectra metadata (so called spectra variables). Spectra variables +generally define one value per spectrum, while for peaks variables one value +per mass peak is defined and hence multiple values per spectrum (depending +on the number of mass peaks of a spectrum).

+

Data can be extracted from a Spectra object using dedicated accessor +functions or also using the $ operator. Depending on the backend class +used by the Spectra to represent the data, data can also be added or +replaced (again, using dedicated functions or using $<-).

+
+ +
+

Usage

+
asDataFrame(
+  object,
+  i = seq_along(object),
+  spectraVars = spectraVariables(object)
+)
+
+# S4 method for class 'Spectra'
+acquisitionNum(object)
+
+# S4 method for class 'Spectra'
+centroided(object)
+
+# S4 method for class 'Spectra'
+centroided(object) <- value
+
+# S4 method for class 'Spectra'
+collisionEnergy(object)
+
+# S4 method for class 'Spectra'
+collisionEnergy(object) <- value
+
+coreSpectraVariables()
+
+# S4 method for class 'Spectra'
+dataOrigin(object)
+
+# S4 method for class 'Spectra'
+dataOrigin(object) <- value
+
+# S4 method for class 'Spectra'
+dataStorage(object)
+
+# S4 method for class 'Spectra'
+intensity(object, f = processingChunkFactor(object), ...)
+
+# S4 method for class 'Spectra'
+ionCount(object)
+
+# S4 method for class 'Spectra'
+isCentroided(object, ...)
+
+# S4 method for class 'Spectra'
+isEmpty(x)
+
+# S4 method for class 'Spectra'
+isolationWindowLowerMz(object)
+
+# S4 method for class 'Spectra'
+isolationWindowLowerMz(object) <- value
+
+# S4 method for class 'Spectra'
+isolationWindowTargetMz(object)
+
+# S4 method for class 'Spectra'
+isolationWindowTargetMz(object) <- value
+
+# S4 method for class 'Spectra'
+isolationWindowUpperMz(object)
+
+# S4 method for class 'Spectra'
+isolationWindowUpperMz(object) <- value
+
+# S4 method for class 'Spectra'
+length(x)
+
+# S4 method for class 'Spectra'
+lengths(x, use.names = FALSE)
+
+# S4 method for class 'Spectra'
+msLevel(object)
+
+# S4 method for class 'Spectra'
+mz(object, f = processingChunkFactor(object), ...)
+
+# S4 method for class 'Spectra'
+peaksData(
+  object,
+  columns = c("mz", "intensity"),
+  f = processingChunkFactor(object),
+  ...,
+  BPPARAM = bpparam()
+)
+
+# S4 method for class 'Spectra'
+peaksVariables(object)
+
+# S4 method for class 'Spectra'
+polarity(object)
+
+# S4 method for class 'Spectra'
+polarity(object) <- value
+
+# S4 method for class 'Spectra'
+precScanNum(object)
+
+# S4 method for class 'Spectra'
+precursorCharge(object)
+
+# S4 method for class 'Spectra'
+precursorIntensity(object)
+
+# S4 method for class 'Spectra'
+precursorMz(object)
+
+# S4 method for class 'Spectra'
+rtime(object)
+
+# S4 method for class 'Spectra'
+rtime(object) <- value
+
+# S4 method for class 'Spectra'
+scanIndex(object)
+
+# S4 method for class 'Spectra'
+smoothed(object)
+
+# S4 method for class 'Spectra'
+smoothed(object) <- value
+
+# S4 method for class 'Spectra'
+spectraData(object, columns = spectraVariables(object))
+
+# S4 method for class 'Spectra'
+spectraData(object) <- value
+
+# S4 method for class 'Spectra'
+spectraNames(object)
+
+# S4 method for class 'Spectra'
+spectraNames(object) <- value
+
+# S4 method for class 'Spectra'
+spectraVariables(object)
+
+# S4 method for class 'Spectra'
+tic(object, initial = TRUE)
+
+# S4 method for class 'Spectra'
+uniqueMsLevels(object, ...)
+
+# S4 method for class 'Spectra'
+x$name
+
+# S4 method for class 'Spectra'
+x$name <- value
+
+# S4 method for class 'Spectra'
+x[[i, j, ...]]
+
+# S4 method for class 'Spectra'
+x[[i, j, ...]] <- value
+
+ +
+

Arguments

+ + +
object
+

A Spectra object.

+ + +
i
+

For asDataFrame(): A numeric indicating which scans to coerce +to a DataFrame (default is seq_along(object)).

+ + +
spectraVars
+

character() indicating what spectra variables to add to +the DataFrame. Default is spectraVariables(object), i.e. all +available variables.

+ + +
value
+

A vector with values to replace the respective spectra +variable. Needs to be of the correct data type for the spectra variable.

+ + +
f
+

For intensity(), mz() and peaksData(): factor defining how +data should be chunk-wise loaded an processed. Defaults to +processingChunkFactor().

+ + +
...
+

Additional arguments.

+ + +
x
+

A Spectra object.

+ + +
use.names
+

For lengths(): ignored.

+ + +
columns
+

For spectraData() accessor: optional character with +column names (spectra variables) that should be included in the +returned DataFrame. By default, all columns are returned. +For peaksData() accessor: optional character with requested columns +in the individual matrix of the returned list. Defaults to +c("mz", "value") but any values returned by peaksVariables(object) +with object being the Spectra object are supported.

+ + +
BPPARAM
+

Parallel setup configuration. See bpparam() for more +information. See also processingChunkSize() for more information +on parallel processing.

+ + +
initial
+

For tic(): logical(1) whether the initially +reported total ion current should be reported, or whether the +total ion current should be (re)calculated on the actual data +(initial = FALSE, same as ionCount()).

+ + +
name
+

For $ and $<-: the name of the spectra variable to return +or set.

+ + +
j
+

For [: not supported.

+ +
+
+

Spectra variables

+ + + +

A common set of core spectra variables are defined for Spectra. These +have a pre-defined data type and each Spectra will return a value for +these if requested. If no value for a spectra variable is defined, a missing +value (of the correct data type) is returned. The list of core spectra +variables and their respective data type is:

  • acquisitionNum integer(1): the index of acquisition of a spectrum +during an MS run.

  • +
  • centroided logical(1): whether the spectrum is in profile or centroid +mode.

  • +
  • collisionEnergy numeric(1): collision energy used to create an MSn +spectrum.

  • +
  • dataOrigin character(1): the origin of the spectrum's data, e.g. the +mzML file from which it was read.

  • +
  • dataStorage character(1): the (current) storage location of the +spectrum data. This value depends on the backend used to handle and +provide the data. For an in-memory backend like the MsBackendDataFrame +this will be "<memory>", for an on-disk backend such as the +MsBackendHdf5Peaks it will be the name of the HDF5 file where the +spectrum's peak data is stored.

  • +
  • isolationWindowLowerMz numeric(1): lower m/z for the isolation +window in which the (MSn) spectrum was measured.

  • +
  • isolationWindowTargetMz numeric(1): the target m/z for the isolation +window in which the (MSn) spectrum was measured.

  • +
  • isolationWindowUpperMz numeric(1): upper m/z for the isolation window +in which the (MSn) spectrum was measured.

  • +
  • msLevel integer(1): the MS level of the spectrum.

  • +
  • polarity integer(1): the polarity of the spectrum (0 and 1 +representing negative and positive polarity, respectively).

  • +
  • precScanNum integer(1): the scan (acquisition) number of the precursor +for an MSn spectrum.

  • +
  • precursorCharge integer(1): the charge of the precursor of an MSn +spectrum.

  • +
  • precursorIntensity numeric(1): the intensity of the precursor of an +MSn spectrum.

  • +
  • precursorMz numeric(1): the m/z of the precursor of an MSn spectrum.

  • +
  • rtime numeric(1): the retention time of a spectrum.

  • +
  • scanIndex integer(1): the index of a spectrum within a (raw) file.

  • +
  • smoothed logical(1): whether the spectrum was smoothed.

  • +

For each of these spectra variable a dedicated accessor function is defined +(such as msLevel() or rtime()) that allows to extract the values of +that spectra variable for all spectra in a Spectra object. Also, +replacement functions are defined, but not all backends might support +replacing values for spectra variables. As described above, additional +spectra variables can be defined or added. The spectraVariables() function +can be used to

+

Values for multiple spectra variables, or all spectra vartiables* can be +extracted with the spectraData() function.

+
+
+

Peaks variables

+ + + +

Spectra also provide mass peak data with the m/z and intensity values +being the core peaks variables:

  • intensity numeric: intensity values for the spectrum's peaks.

  • +
  • mz numeric: the m/z values for the spectrum's peaks.

  • +

Values for these can be extracted with the mz() and intensity() +functions, or the peaksData() function. The former functions return a +NumericList with the respective values, while the latter returns a List +with numeric two-column matrices. The list of peaks matrices can also +be extracted using as(x, "list") or as(x, "SimpleList") with x being +a Spectra object.

+

Some Spectra/backends provide also values for additional peaks variables. +The set of available peaks variables can be extracted with the +peaksVariables() function.

+
+
+

Functions to access MS data

+ + + +

The set of available functions to extract data from, or set data in, a +Spectra object are (in alphabetical order) listed below. Note that there +are also other functions to extract information from a Spectra object +documented in addProcessing().

  • $, $<-: gets (or sets) a spectra variable for all spectra in object. +See examples for details. Note that replacing values of a peaks variable +is not supported with a non-empty processing queue, i.e. if any filtering +or data manipulations on the peaks data was performed. In these cases +applyProcessing() needs to be called first to apply all cached data +operations.

  • +
  • [[, [[<-: access or set/add a single spectrum variable (column) in the +backend.

  • +
  • acquisitionNum(): returns the acquisition number of each +spectrum. Returns an integer of length equal to the number of +spectra (with NA_integer_ if not available).

  • +
  • asDataFrame(): converts the Spectra to a DataFrame (in long format) +contining all data. Returns a DataFrame.

  • +
  • centroided(), centroided<-: gets or sets the centroiding +information of the spectra. centroided() returns a logical +vector of length equal to the number of spectra with TRUE if a +spectrum is centroided, FALSE if it is in profile mode and NA +if it is undefined. See also isCentroided() for estimating from +the spectrum data whether the spectrum is centroided. value +for centroided<- is either a single logical or a logical of +length equal to the number of spectra in object.

  • +
  • collisionEnergy(), collisionEnergy<-: gets or sets the +collision energy for all spectra in object. collisionEnergy() +returns a numeric with length equal to the number of spectra +(NA_real_ if not present/defined), collisionEnergy<- takes a +numeric of length equal to the number of spectra in object.

  • +
  • coreSpectraVariables(): returns the core spectra variables along with +their expected data type.

  • +
  • dataOrigin(), dataOrigin<-: gets or sets the data origin for each +spectrum. dataOrigin() returns a character vector (same length than +object) with the origin of the spectra. dataOrigin<- expects a +character vector (same length than object) with the replacement +values for the data origin of each spectrum.

  • +
  • dataStorage(): returns a character vector (same length than object) +with the data storage location of each spectrum.

  • +
  • intensity(): gets the intensity values from the spectra. Returns +a NumericList() of numeric vectors (intensity values for each +spectrum). The length of the list is equal to the number of +spectra in object.

  • +
  • ionCount(): returns a numeric with the sum of intensities for +each spectrum. If the spectrum is empty (see isEmpty()), +NA_real_ is returned.

  • +
  • isCentroided(): a heuristic approach assessing if the spectra in +object are in profile or centroided mode. The function takes +the qtlth quantile top peaks, then calculates the difference +between adjacent m/z value and returns TRUE if the first +quartile is greater than k. (See Spectra:::.isCentroided() for +the code.)

  • +
  • isEmpty(): checks whether a spectrum in object is empty +(i.e. does not contain any peaks). Returns a logical vector of +length equal number of spectra.

  • +
  • isolationWindowLowerMz(), isolationWindowLowerMz<-: gets or sets the +lower m/z boundary of the isolation window.

  • +
  • isolationWindowTargetMz(), isolationWindowTargetMz<-: gets or sets the +target m/z of the isolation window.

  • +
  • isolationWindowUpperMz(), isolationWindowUpperMz<-: gets or sets the +upper m/z boundary of the isolation window.

  • +
  • length(): gets the number of spectra in the object.

  • +
  • lengths(): gets the number of peaks (m/z-intensity values) per +spectrum. Returns an integer vector (length equal to the +number of spectra). For empty spectra, 0 is returned.

  • +
  • msLevel(): gets the spectra's MS level. Returns an integer vector (names +being spectrum names, length equal to the number of spectra) with the MS +level for each spectrum.

  • +
  • mz(): gets the mass-to-charge ratios (m/z) from the +spectra. Returns a NumericList() or length equal to the number of +spectra, each element a numeric vector with the m/z values of +one spectrum.

  • +
  • peaksData(): gets the peaks data for all spectra in object. Peaks +data consist of the m/z and intensity values as well as possible additional +annotations (variables) of all peaks of each spectrum. The function +returns a SimpleList() of two dimensional arrays (either matrix or +data.frame), with each array providing the values for the requested +peak variables (by default "mz" and "intensity"). Optional parameter +columns is passed to the backend's peaksData() function to allow +the selection of specific (or additional) peaks variables (columns) that +should be extracted (if available). Importantly, +it is not guaranteed that each backend supports this parameter (while +each backend must support extraction of "mz" and "intensity" columns). +Parameter columns defaults to c("mz", "intensity") but any value +returned by peaksVariables(object) is supported. +Note also that it is possible to extract the peak data with +as(x, "list") and as(x, "SimpleList") as a list and SimpleList, +respectively. Note however that, in contrast to peaksData(), as() +does not support the parameter columns.

  • +
  • peaksVariables(): lists the available variables for mass peaks provided +by the backend. Default peak variables are "mz" and "intensity" (which +all backends need to support and provide), but some backends might provide +additional variables. +These variables correspond to the column names of the peak data array +returned by peaksData().

  • +
  • polarity(), polarity<-: gets or sets the polarity for each +spectrum. polarity() returns an integer vector (length equal +to the number of spectra), with 0 and 1 representing negative +and positive polarities, respectively. polarity<- expects an +integer vector of length 1 or equal to the number of spectra.

  • +
  • precursorCharge(), precursorIntensity(), precursorMz(), +precScanNum(), precAcquisitionNum(): gets the charge (integer), +intensity (numeric), m/z (numeric), scan index (integer) +and acquisition number (interger) of the precursor for MS level > +2 spectra from the object. Returns a vector of length equal to +the number of spectra in object. NA are reported for MS1 +spectra of if no precursor information is available.

  • +
  • rtime(), rtime<-: gets or sets the retention times (in seconds) +for each spectrum. rtime() returns a numeric vector (length +equal to the number of spectra) with the retention time for each +spectrum. rtime<- expects a numeric vector with length equal +to the number of spectra.

  • +
  • scanIndex(): returns an integer vector with the scan index +for each spectrum. This represents the relative index of the +spectrum within each file. Note that this can be different to the +acquisitionNum of the spectrum which represents the index of the +spectrum during acquisition/measurement (as reported in the mzML file).

  • +
  • smoothed(),smoothed<-: gets or sets whether a spectrum is +smoothed. smoothed() returns a logical vector of length equal +to the number of spectra. smoothed<- takes a logical vector +of length 1 or equal to the number of spectra in object.

  • +
  • spectraData(): gets general spectrum metadata (annotation, also called +header). spectraData() returns a DataFrame. Note that this +method does by default not return m/z or intensity values.

  • +
  • spectraData<-: replaces the full spectra data of the Spectra +object with the one provided with value. The spectraData<- function +expects a DataFrame to be passed as value with the same number of rows +as there a spectra in object. Note that replacing values of +peaks variables is not supported with a non-empty processing queue, i.e. +if any filtering or data manipulations on the peaks data was performed. +In these cases applyProcessing() needs to be called first to apply all +cached data operations and empty the processing queue.

  • +
  • spectraNames(), spectraNames<-: gets or sets the spectra names.

  • +
  • spectraVariables(): returns a character vector with the +available spectra variables (columns, fields or attributes of each +spectrum) available in object. Note that spectraVariables() does not +list the peak variables ("mz", "intensity" and eventual additional +annotations for each MS peak). Peak variables are returned by +peaksVariables().

  • +
  • tic(): gets the total ion current/count (sum of signal of a +spectrum) for all spectra in object. By default, the value +reported in the original raw data file is returned. For an empty +spectrum, 0 is returned.

  • +
  • uniqueMsLevels(): get the unique MS levels available in object. This +function is supposed to be more efficient than unique(msLevel(object)).

  • +
+
+

See also

+
+
+
+
+

Author

+

Sebastian Gibb, Johannes Rainer, Laurent Gatto, Philippine Louail

+
+ +
+

Examples

+

+## Create a Spectra from mzML files and use the `MsBackendMzR` on-disk
+## backend.
+sciex_file <- dir(system.file("sciex", package = "msdata"),
+    full.names = TRUE)
+sciex <- Spectra(sciex_file, backend = MsBackendMzR())
+sciex
+#> MSn data (Spectra) with 1862 spectra in a MsBackendMzR backend:
+#>        msLevel     rtime scanIndex
+#>      <integer> <numeric> <integer>
+#> 1            1     0.280         1
+#> 2            1     0.559         2
+#> 3            1     0.838         3
+#> 4            1     1.117         4
+#> 5            1     1.396         5
+#> ...        ...       ...       ...
+#> 1858         1   258.636       927
+#> 1859         1   258.915       928
+#> 1860         1   259.194       929
+#> 1861         1   259.473       930
+#> 1862         1   259.752       931
+#>  ... 33 more variables/columns.
+#> 
+#> file(s):
+#> 20171016_POOL_POS_1_105-134.mzML
+#> 20171016_POOL_POS_3_105-134.mzML
+
+## Get the number of spectra in the data set
+length(sciex)
+#> [1] 1862
+
+## Get the number of mass peaks per spectrum - limit to the first 6
+lengths(sciex) |> head()
+#> [1]  578 1529 1600 1664 1417 1602
+
+## Get the MS level for each spectrum - limit to the first 6 spectra
+msLevel(sciex) |> head()
+#> [1] 1 1 1 1 1 1
+
+## Alternatively, we could also use $ to access a specific spectra variable.
+## This could also be used to add additional spectra variables to the
+## object (see further below).
+sciex$msLevel |> head()
+#> [1] 1 1 1 1 1 1
+
+## Get the intensity and m/z values.
+intensity(sciex)
+#> NumericList of length 1862
+#> [[1]] 0 412 0 0 412 0 0 412 0 0 412 0 0 ... 0 412 0 0 412 0 0 412 0 0 412 412 0
+#> [[2]] 0 140 0 0 140 0 0 419 0 0 140 0 0 ... 0 140 0 0 140 0 0 140 0 0 279 140 0
+#> [[3]] 0 132 263 263 132 132 0 0 132 132 0 0 ... 0 0 132 0 0 132 0 0 132 0 132 0
+#> [[4]] 0 139 139 0 0 139 0 0 139 139 0 139 0 ... 0 0 139 0 0 277 0 0 139 0 139 0
+#> [[5]] 0 164 0 0 328 0 164 0 0 164 0 0 164 ... 164 0 0 164 0 0 164 0 164 0 328 0
+#> [[6]] 0 146 146 146 0 0 146 0 0 146 0 0 ... 146 0 0 146 146 0 0 146 0 0 146 0
+#> [[7]] 0 296 0 296 0 0 148 0 0 148 0 0 148 ... 0 0 148 0 0 148 0 0 148 0 0 148 0
+#> [[8]] 0 170 0 170 170 170 0 170 0 0 170 0 ... 170 0 0 170 0 0 170 0 0 170 170 0
+#> [[9]] 0 157 0 314 0 0 157 0 0 157 0 0 314 ... 0 0 157 0 0 157 0 0 157 0 157 0
+#> [[10]] 0 151 302 302 604 0 302 0 0 151 0 0 ... 151 0 0 151 0 151 0 151 0 151 0
+#> ...
+#> <1852 more elements>
+mz(sciex)
+#> NumericList of length 1862
+#> [[1]] 105.043454833354 105.044900379521 ... 133.982027457992 133.983660012089
+#> [[2]] 105.027517517902 105.028962955892 ... 133.982017159657 133.98364971537
+#> [[3]] 105.037635723077 105.03908123069 ... 133.988547442185 133.990180037683
+#> [[4]] 105.037635723077 105.03908123069 ... 133.98364971537 133.985282281029
+#> [[5]] 105.034744757582 105.036190245303 ... 133.986914856634 133.988547442185
+#> [[6]] 105.041972245917 105.043417783368 ... 133.982017159657 133.98364971537
+#> [[7]] 105.037635723077 105.03908123069 ... 133.996710519135 133.998343164363
+#> [[8]] 105.034744757582 105.036190245303 ... 133.980384613891 133.982017159657
+#> [[9]] 105.040526728357 105.041972255863 ... 133.97875207807 133.980384613891
+#> [[10]] 105.036190235357 105.037635733023 ... 133.985282281029 133.986914856634
+#> ...
+#> <1852 more elements>
+
+## Convert a subset of the Spectra object to a long DataFrame.
+asDataFrame(sciex, i = 1:3, spectraVars = c("rtime", "msLevel"))
+#> DataFrame with 3707 rows and 4 columns
+#>             mz intensity     rtime   msLevel
+#>      <numeric> <numeric> <numeric> <integer>
+#> 1      105.043         0      0.28         1
+#> 2      105.045       412      0.28         1
+#> 3      105.046         0      0.28         1
+#> 4      107.055         0      0.28         1
+#> 5      107.057       412      0.28         1
+#> ...        ...       ...       ...       ...
+#> 3703   133.984         0     0.838         1
+#> 3704   133.985       132     0.838         1
+#> 3705   133.987         0     0.838         1
+#> 3706   133.989       132     0.838         1
+#> 3707   133.990         0     0.838         1
+
+## Create a Spectra providing a `DataFrame` containing the spectrum data.
+
+spd <- DataFrame(msLevel = c(1L, 2L), rtime = c(1.1, 1.2))
+spd$mz <- list(c(100, 103.2, 104.3, 106.5), c(45.6, 120.4, 190.2))
+spd$intensity <- list(c(200, 400, 34.2, 17), c(12.3, 15.2, 6.8))
+
+s <- Spectra(spd)
+s
+#> MSn data (Spectra) with 2 spectra in a MsBackendMemory backend:
+#>     msLevel     rtime scanIndex
+#>   <integer> <numeric> <integer>
+#> 1         1       1.1        NA
+#> 2         2       1.2        NA
+#>  ... 16 more variables/columns.
+
+## List all available spectra variables (i.e. spectrum data and metadata).
+spectraVariables(s)
+#>  [1] "msLevel"                 "rtime"                  
+#>  [3] "acquisitionNum"          "scanIndex"              
+#>  [5] "dataStorage"             "dataOrigin"             
+#>  [7] "centroided"              "smoothed"               
+#>  [9] "polarity"                "precScanNum"            
+#> [11] "precursorMz"             "precursorIntensity"     
+#> [13] "precursorCharge"         "collisionEnergy"        
+#> [15] "isolationWindowLowerMz"  "isolationWindowTargetMz"
+#> [17] "isolationWindowUpperMz" 
+
+## For all *core* spectrum variables accessor functions are available. These
+## return NA if the variable was not set.
+centroided(s)
+#> [1] NA NA
+dataStorage(s)
+#> [1] "<memory>" "<memory>"
+rtime(s)
+#> [1] 1.1 1.2
+precursorMz(s)
+#> [1] NA NA
+
+## The core spectra variables are:
+coreSpectraVariables()
+#>                 msLevel                   rtime          acquisitionNum 
+#>               "integer"               "numeric"               "integer" 
+#>               scanIndex                      mz               intensity 
+#>               "integer"           "NumericList"           "NumericList" 
+#>             dataStorage              dataOrigin              centroided 
+#>             "character"             "character"               "logical" 
+#>                smoothed                polarity             precScanNum 
+#>               "logical"               "integer"               "integer" 
+#>             precursorMz      precursorIntensity         precursorCharge 
+#>               "numeric"               "numeric"               "integer" 
+#>         collisionEnergy  isolationWindowLowerMz isolationWindowTargetMz 
+#>               "numeric"               "numeric"               "numeric" 
+#>  isolationWindowUpperMz 
+#>               "numeric" 
+
+## Add an additional metadata column.
+s$spectrum_id <- c("sp_1", "sp_2")
+
+## List spectra variables, "spectrum_id" is now also listed
+spectraVariables(s)
+#>  [1] "msLevel"                 "rtime"                  
+#>  [3] "acquisitionNum"          "scanIndex"              
+#>  [5] "dataStorage"             "dataOrigin"             
+#>  [7] "centroided"              "smoothed"               
+#>  [9] "polarity"                "precScanNum"            
+#> [11] "precursorMz"             "precursorIntensity"     
+#> [13] "precursorCharge"         "collisionEnergy"        
+#> [15] "isolationWindowLowerMz"  "isolationWindowTargetMz"
+#> [17] "isolationWindowUpperMz"  "spectrum_id"            
+
+## Get the values for the new spectra variable
+s$spectrum_id
+#> [1] "sp_1" "sp_2"
+
+## Extract specific spectra variables.
+spectraData(s, columns = c("spectrum_id", "msLevel"))
+#> DataFrame with 2 rows and 2 columns
+#>   spectrum_id   msLevel
+#>   <character> <integer>
+#> 1        sp_1         1
+#> 2        sp_2         2
+
+
+##  --------  PEAKS VARIABLES AND DATA  --------
+
+## Get the peak data (m/z and intensity values).
+pks <- peaksData(s)
+pks
+#> List of length 2
+pks[[1]]
+#>         mz intensity
+#> [1,] 100.0     200.0
+#> [2,] 103.2     400.0
+#> [3,] 104.3      34.2
+#> [4,] 106.5      17.0
+pks[[2]]
+#>         mz intensity
+#> [1,]  45.6      12.3
+#> [2,] 120.4      15.2
+#> [3,] 190.2       6.8
+
+## Note that we could get the same resulb by coercing the `Spectra` to
+## a `list` or `SimpleList`:
+as(s, "list")
+#> [[1]]
+#>         mz intensity
+#> [1,] 100.0     200.0
+#> [2,] 103.2     400.0
+#> [3,] 104.3      34.2
+#> [4,] 106.5      17.0
+#> 
+#> [[2]]
+#>         mz intensity
+#> [1,]  45.6      12.3
+#> [2,] 120.4      15.2
+#> [3,] 190.2       6.8
+#> 
+as(s, "SimpleList")
+#> List of length 2
+
+## Or use `mz()` and `intensity()` to extract the m/z and intensity values
+## separately
+mz(s)
+#> NumericList of length 2
+#> [[1]] 100 103.2 104.3 106.5
+#> [[2]] 45.6 120.4 190.2
+intensity(s)
+#> NumericList of length 2
+#> [[1]] 200 400 34.2 17
+#> [[2]] 12.3 15.2 6.8
+
+## Some `MsBackend` classes provide support for arbitrary peaks variables
+## (in addition to the mandatory `"mz"` and `"intensity"` values. Below
+## we create a simple data frame with an additional peak variable `"pk_ann"`
+## and create a `Spectra` with a `MsBackendMemory` for that data.
+## Importantly the number of values (per spectrum) need to be the same
+## for all peak variables.
+
+tmp <- data.frame(msLevel = c(2L, 2L), rtime = c(123.2, 123.5))
+tmp$mz <- list(c(103.1, 110.4, 303.1), c(343.2, 453.1))
+tmp$intensity <- list(c(130.1, 543.1, 40), c(0.9, 0.45))
+tmp$pk_ann <- list(c(NA_character_, "A", "P"), c("B", "P"))
+
+## Create the Spectra. With parameter `peaksVariables` we can define
+## the columns in `tmp` that contain peaks variables.
+sps <- Spectra(tmp, source = MsBackendMemory(),
+    peaksVariables = c("mz", "intensity", "pk_ann"))
+peaksVariables(sps)
+#> [1] "mz"        "intensity" "pk_ann"   
+
+## Extract just the m/z and intensity values
+peaksData(sps)[[1L]]
+#>         mz intensity
+#> [1,] 103.1     130.1
+#> [2,] 110.4     543.1
+#> [3,] 303.1      40.0
+
+## Extract the full peaks data
+peaksData(sps, columns = peaksVariables(sps))[[1L]]
+#>      mz intensity pk_ann
+#> 1 103.1     130.1   <NA>
+#> 2 110.4     543.1      A
+#> 3 303.1      40.0      P
+
+## Access just the pk_ann variable
+sps$pk_ann
+#> [[1]]
+#> [1] NA  "A" "P"
+#> 
+#> [[2]]
+#> [1] "B" "P"
+#> 
+
+
+
+
+
+ + +
+ + + +
+ + + + + + + diff --git a/reference/spectraNames,Spectra-method.html b/reference/spectraNames,Spectra-method.html index 49a023ae..2aeb298e 100644 --- a/reference/spectraNames,Spectra-method.html +++ b/reference/spectraNames,Spectra-method.html @@ -1,8 +1,8 @@ - + - + diff --git a/reference/spectraNames.html b/reference/spectraNames.html new file mode 100644 index 00000000..2aeb298e --- /dev/null +++ b/reference/spectraNames.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/reference/spectraVariableMapping.html b/reference/spectraVariableMapping.html index e7bc71d0..f9e11195 100644 --- a/reference/spectraVariableMapping.html +++ b/reference/spectraVariableMapping.html @@ -21,7 +21,7 @@ Spectra - 1.15.8 + 1.15.9