Skip to content

Commit

Permalink
refactor: address Phili's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jorainer committed Nov 24, 2023
1 parent e6a50c8 commit 194f104
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion R/Spectra-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,7 @@ filterPrecursorPeaks <- function(object, tolerance = 0, ppm = 20,
#'
#' @param value `integer(1)` defining the chunk size.
#'
#' @return `processingChunkSize` returns the currenlty defined processing
#' @return `processingChunkSize` returns the currently defined processing
#' chunk size (or `Inf` if it is not defined). `processingChunkFactor`
#' returns a `factor` defining the chunks into which `x` will be split
#' for (parallel) chunk-wise processing or a `factor` of length 0 if
Expand Down
2 changes: 1 addition & 1 deletion man/processingChunkSize.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions vignettes/Spectra-large-scale.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,10 @@ The resulting `Spectra` uses a `MsBackendMzR` for data representation. This
backend does only load general spectra data into memory while the *full* MS data
(i.e., the *m/z* and intensity values of the individual mass peaks) is only
loaded when requested or needed. In contrast to an *in-memory* backend, the
memory footprint of this backend is thus lower. Below we create a `Spectra` that
keeps the full data in memory by changing the backend to a `MsBackendMemory`
backend and compare the sizes of both objects.
memory footprint of this backend is thus lower.

Below we create a `Spectra` that keeps the full data in memory by changing the
backend to a `MsBackendMemory` backend and compare the sizes of both objects.

```{r}
sps_mem <- setBackend(sps_mzr, MsBackendMemory())
Expand Down Expand Up @@ -173,6 +174,10 @@ peak data. Subset operations that only reduce the number of spectra (such as
`filterRt` or `[`) bypass this mechanism and are applied immediately to the
data.

For an evaluation of chunk-wise processing see also this
[issue](https://github.com/rformassspectrometry/Spectra/issues/304#issuecomment-1825699576)
on the *Spectra* github repository.


# Notes and suggestions for parallel or chunk-wise processing

Expand Down

0 comments on commit 194f104

Please sign in to comment.