Title: | Mass Spectrometry Backend for Reading Thermo Fisher Scientific raw Files |
---|---|
Description: | implements a MsBackend for the Spectra package using Thermo Fisher Scientific's NewRawFileReader .Net libraries. The package is generalizing the functionality introduced by the rawrr package Methods defined in this package are supposed to extend the Spectra Bioconductor package. |
Authors: | Christian Panse [aut, cre] , Tobias Kockmann [aut] , Roger Gine Bertomeu [ctb] |
Maintainer: | Christian Panse <[email protected]> |
License: | GPL-3 |
Version: | 1.13.1 |
Built: | 2024-12-08 03:48:18 UTC |
Source: | https://github.com/bioc/MsBackendRawFileReader |
derives numbers to evaluate time performance for reading a single spectrum in dependency from the chunk size (how many spectra are read in one function call) for reading different numbers of overall spectra.
ioBenchmark( nv = c(1000, 5000, 10000), sizev = c(8, 16, 32, 64, 128, 256, 8, 16, 32, 64, 128, 256, 8, 16, 32, 64, 128, 256, 8, 16, 32, 64, 128, 256, 8, 16, 32, 64, 128, 256, 8, 16, 32, 64, 128, 256), rawfile )
ioBenchmark( nv = c(1000, 5000, 10000), sizev = c(8, 16, 32, 64, 128, 256, 8, 16, 32, 64, 128, 256, 8, 16, 32, 64, 128, 256, 8, 16, 32, 64, 128, 256, 8, 16, 32, 64, 128, 256, 8, 16, 32, 64, 128, 256), rawfile )
nv |
number of spectra to be read. |
sizev |
number of spectra write and parsed in one single junk. |
rawfile |
the Thermo Fisher Scientific raw file. |
data.frame
eh <- ExperimentHub::ExperimentHub() EH4547 <- normalizePath(eh[["EH4547"]]) (rawfileEH4547 <- paste0(EH4547 , ".raw")) if (!file.exists(rawfileEH4547 )){ file.link(EH4547 , rawfileEH4547) } S <- ioBenchmark(1000, c(128, 256, 128, 256), rawfile=rawfileEH4547)
eh <- ExperimentHub::ExperimentHub() EH4547 <- normalizePath(eh[["EH4547"]]) (rawfileEH4547 <- paste0(EH4547 , ".raw")) if (!file.exists(rawfileEH4547 )){ file.link(EH4547 , rawfileEH4547) } S <- ioBenchmark(1000, c(128, 256, 128, 256), rawfile=rawfileEH4547)
MsBackendRawFileReader
MsBackendRawFileReader() ## S4 method for signature 'MsBackendRawFileReader' filterScan(object, filter = character(), ...) ## S4 method for signature 'MsBackendRawFileReader' scanType(object, ...) ## S4 method for signature 'MsBackendRawFileReader' scanIndex(object, ...)
MsBackendRawFileReader() ## S4 method for signature 'MsBackendRawFileReader' filterScan(object, filter = character(), ...) ## S4 method for signature 'MsBackendRawFileReader' scanType(object, ...) ## S4 method for signature 'MsBackendRawFileReader' scanIndex(object, ...)
object |
MsBackendRawFileReader object |
filter |
filter string |
... |
Arguments to be passed to methods. |
a MsBackendRawFileReader object.
a character vector of scan types.
a character vector of scan index.
beRaw <- Spectra::backendInitialize(MsBackendRawFileReader::MsBackendRawFileReader(), files = rawrr::sampleFilePath()) beRaw |> MsBackendRawFileReader::filterScan('Ms') beRaw <- Spectra::backendInitialize(MsBackendRawFileReader::MsBackendRawFileReader(), files = rawrr::sampleFilePath()) scanType(beRaw) |> head() beRaw <- Spectra::backendInitialize(MsBackendRawFileReader::MsBackendRawFileReader(), files = rawrr::sampleFilePath()) scanIndex(beRaw) |> head()
beRaw <- Spectra::backendInitialize(MsBackendRawFileReader::MsBackendRawFileReader(), files = rawrr::sampleFilePath()) beRaw |> MsBackendRawFileReader::filterScan('Ms') beRaw <- Spectra::backendInitialize(MsBackendRawFileReader::MsBackendRawFileReader(), files = rawrr::sampleFilePath()) scanType(beRaw) |> head() beRaw <- Spectra::backendInitialize(MsBackendRawFileReader::MsBackendRawFileReader(), files = rawrr::sampleFilePath()) scanIndex(beRaw) |> head()
The 'MsBackendRawFileReader' inherits all slots and methods from the base 'MsBackendDataFrame' (in-memory) backend. It overrides the base 'mz' and 'intensity' methods as well as 'peaksData' to read the respective data from the original raw data files.
The validator function has to ensure that the files exist and that required column names are present.
The 'backendInitialize' method reads the header data from the raw files and hence fills the 'spectraData' slot.
Christian Panse (2019-2021)
beRaw <- Spectra::backendInitialize(MsBackendRawFileReader::MsBackendRawFileReader(), files = rawrr::sampleFilePath()) beRaw Spectra::msLevel(beRaw)
beRaw <- Spectra::backendInitialize(MsBackendRawFileReader::MsBackendRawFileReader(), files = rawrr::sampleFilePath()) beRaw Spectra::msLevel(beRaw)