Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

MALDIquantForeign-parallel

Parallel Support in Package MALDIquantForeign


Description

MALDIquantForeign-package offers multi-core support using mclapply and mcmapply. This approach is limited to unix-based platforms.

Details

Please note that not all import functions benfit from parallelisation. The current implementation is limited to run the parallelisation over different files. That's why only imports of multiple files could be run on multiple cores. E.g. a single mzML file containing 4 spectra would always be read on a single core. In contrast 4 mzML files each containing just one spectra could be read in using 4 cores.

The improvement in the runtime depends on the amount of data to read, the proportion of parsing/decoding of the data, the amount of memory and the speed of the hard disk.

Please note: It is possible that using parallelisation results in a worse runtime!

Author(s)

Sebastian Gibb mail@sebastiangibb.de

References

See Also

Examples

## load packages
 library("MALDIquant")
 library("MALDIquantForeign")

 exampleDirectory <- system.file("exampledata", package="MALDIquantForeign")

 ## run single-core import
 print(system.time(
   s1 <- importMzMl(exampleDirectory, centroided=TRUE, verbose=FALSE)
 ))

 if(.Platform$OS.type == "unix") {
   ## run multi-core import
   ## (because the example spectra are very small (just 5 data points) the
   ## multi-core solution is slower on most systems)
   print(system.time(
     s2 <- importMzMl(exampleDirectory, centroided=TRUE, mc.cores=2,
                      verbose=FALSE)
   ))
   stopifnot(all.equal(s1, s2))
 }

MALDIquantForeign

Import/Export Routines for 'MALDIquant'

v0.12
GPL (>= 3)
Authors
Sebastian Gibb [aut, cre] (<https://orcid.org/0000-0001-7406-4443>), Pietro Franceschi [ctb]
Initial release
2019-01-30

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.