This repository provides a backend for Spectra objects that supports storage of mass spectrometry (MS) data in an SQL database. The package provides the functionality to create such databases from original (raw) MS data files (in mzML, mzXML or netCDF format) and allows to extract the data in an efficient way.
For more information see the package homepage.
By providing the connection to an SQL database, the
createMsBackendSqlDatabase() imports raw MS data from provided file names and
stores it into the dedicated database tables created during
import. MsBackendSql supports any type of SQL database, with some
optimizations for MySQL/MariaDB databases.
MS data in a MsBackendSql database can be accessed through the
Spectra package by using
the MsBackendSql MS backend. Assuming the variable dbcon represents a
(RDBI) database connection to a MsBackendSql, the data can be represented/used
with a Spectra object by:
library(Spectra)
library(MsBackendSql)
sps <- Spectra(dbcon, source = MsBackendSql())For more information see the package homepage.
Finally, it is also possible to use the setBackend() method on a Spectra
object to change to a MsBackendSql backend. This will take all the MS data of
the Spectra object and store that into a new SQL database.
The package can be installed with
install.packages("BiocManager")
BiocManager::install("MsBackendSql")Contributions are highly welcome and should follow the contribution guidelines. Also, please check the coding style guidelines in the RforMassSpectrometry vignette.