Spectra supports adding/changing spectra variables but there is only limited support for peaks variables. Some backends (SQL-based backends) support extracting additional peaks variables/annotations from the database and provide these as additional columns in peaksData. Also, the MsBackendMemory supports additional peaks variables that are stored internally in a data.frame.
Since peaksData returns a list of matrix, adding character peak annotations is not possible. Thus, one suggestion would be to have an (additional) peaksDataFrame function that returns the data for requested peaks variables as a data.frame and peaksDataFrame<- would support changing/updating/adding peaks variables. Alternatively, we could have a peaksAnnotation function that returns peak annotations (everything except the m/z and intensity values).
Note: support for peak annotations/variables will also need some way to ensure data does not get corrupted when peak matrices are filtered with functions such as filterMzValues or filterMzRange that reduce the number of peaks.
Spectra
supports adding/changing spectra variables but there is only limited support for peaks variables. Some backends (SQL-based backends) support extracting additional peaks variables/annotations from the database and provide these as additional columns inpeaksData
. Also, theMsBackendMemory
supports additional peaks variables that are stored internally in adata.frame
.Since
peaksData
returns alist
ofmatrix
, adding character peak annotations is not possible. Thus, one suggestion would be to have an (additional)peaksDataFrame
function that returns the data for requested peaks variables as adata.frame
andpeaksDataFrame<-
would support changing/updating/adding peaks variables. Alternatively, we could have apeaksAnnotation
function that returns peak annotations (everything except the m/z and intensity values).Note: support for peak annotations/variables will also need some way to ensure data does not get corrupted when peak matrices are filtered with functions such as
filterMzValues
orfilterMzRange
that reduce the number of peaks.