- Refactor
compareSpectra()to support spectra similarity functions returning the similarity score and the number of peak pairs on which the score was calculated. This allows to correctly report the number of peak pairs used by e.g. the modified cosine (GNPS) similarity score. See also issue #350.
- Use
data.table::rbindfill()for merging ofMsBackendMemoryinstances and forbackendInitialize()forMsBackendMzR. This adds data.table as a dependency but improves performance for the above mentioned functionality. - Fix bug in
fragmentGroupIndex()that would return the indices in a wrong order.
- Replace msdata with MsDataHub package.
- Fix
precursorPurity()for empty spectra.
- Fix in
longForm()method forMsBackendMemoryif only peaks variables are extracted.
- Add default implementation of methods for the
MsBackendclass (issue #338). This reduced code redundancy in Spectra and simplifies implementation of newMsBackendclasses considerably.
- Add implementations of
spectraVariableMapping()andspectraVariableMapping<-forMsBackendandSpectraobjects.
- Add default implementations for
MsBackendfor replacement methodscentroided<-,collisionEnergy<-,dataOrigin<-,isolationWindowLowerMz<-,isolationWindowTargetMz<-,isolationWindowUpperMz<-,msLevel<-,polarity<-,precursorMz<-,rtime<-andsmoothed<-. This reduces the amount of methods required to be implemented for newMsBackendclasses.
- Add
longForm,MsBackendandlongForm,Spectramethods (issue #360).
- Add a
precursorPurity()function.
- Addition of
fragmentGroupIndex()function. This function generates aintegerindex grouping MSn (MS level > 1) spectra with their corresponding (unique) MS1 spectra based on acquisition order. - Fix on
cbind2()so that the output is aSpectraobject and not the backend.
- Fix passing of
BPPARAMparameter inpeaksData()method forSpectra. Now is being passed down to.peaksapply().
- Fix in
estimatePrecursorMz()that would ignore parameterBPPARAM.
- Fix export of data using
MsBackendMzR: save also the precursor scan number for MSn data (spectra variable"precScanNum").
- Add
precScanNum()method forMsBackendCached.
- Accept
labelsargument as alistinstead of acharacterin the plotting functions.
- Allow parameter
msLevel. = integer()forfilterRt()to filter spectra of all MS levels. This wasmsLevel. = uniqueMsLevels(), which, depending on the backend, can be computationally intense. Add related unit tests to the unit test suite.
- Add parameter
return.typetopeaksData().
- Add the
spectraVariableMapping<-generic method.
- Add new
fillCoreSpectraVariables()function that allows to add eventually missing core spectra variables (with the correct data type) to a data frame.
- Move generics
processingChunkSize(),processingChunkFactor()andapplyproceesing()to ProtGenerics. Required ProtGenerics version 1.39.2 or higher. These were moved to be able to implement them in the Chromatograms package.
- Import
extractByIndex()from ProtGenerics.
- Fix
cbind2()unit test for backends that fails if the number of spectra in the tested backend is (by chance) equal to 4.
- Add
cbind2()method to easily add multiplespectraVariablesand their content to thespectraDataof aSpectraobject. See also issue #342
- Refactor
containsMz()to support chunk-wise processing.
- Add
precursorMz<-method issue #336.
- Add generic
backendRequiredSpectraVariables()to allow definition of mandatory spectra variables for a backend.
- Add reference to
MsBackendMetaboLights.
- Add new
extractSpectra()generic and implementation forMsBackend. Fixes issue #5.
- Restructure and reorganize documentation for
Spectra.
- Refactor the
Spectra()constructor method: better support for initialization of backends that define their own specific parameters.
- Change
estimatePrecursorIntensity()to a method to avoid overrides/clashes with the same-named implementation in xcms.
- Fix in
selectSpectraVariables()forMsBackendMzR: ensure peaks variables"mz"and"intensity"are not by default removed.
- Add new
filterPeaksRanges()function to filter mass peaks by ranges on numeric spectra or peak variables.
- For evaluation of the
Spectra's processing queue: call functions from the MetaboCoreUtils directly through their namespace (MsCoreUtils::) to avoid errors if performed in parallel on Windows machines or if called on a re-loaded object. - New
asDataFrame()function to convert a (small)Spectraobject into a longDataFrame.
- Add
dataStorageDataPath()anddataStorageDataPath<-methods to allow updating/adapting the path of the data storage files of backends supporting that issue #321.
- Improve documentation for
combineSpectra()andcombinePeaks()issue #320.
- Add
estimatePrecursorMz()function to estimate the precursor m/z for DDA fragment spectra from previous MS1 spectra issue #315.
- Move generics
backendBpparam(),backendParallelFactor()andsupportsSetBackend()to ProtGenerics. Required ProtGenerics version 1.35.4 or higher.
- Add
filterRanges()andfilterValues()functions to allow filtering of a Spectra object based on ranges or similarities of any existingspectraDatavariables.
- Move generics to
ProtGenerics. RequiresProtGenericsversion 1.35.3.
- Add
entropyandnentropyfunctions to allow to calculate the (normalized) entropy for each spectrum.
- Fix issue in
setBackendthat might cause chunk-wise processing to be not run.
- Add possibility to enable and perform chunk-wise (parallel) processing to
Spectra: add functionsprocessingChunkSize,backendParallelFactorandprocessingChunkFactorto set or get definition of chunks for parallel processing. All functions working on peaks data use this mechanism which is implemented in the internal.peaksapplyfunction. TheSpectraobject gains a new slot"processingChunkSize"that is used to define the size of the processing chunks for theSpectra. See also issue #304. This ensures processing also of very large data sets.
- Fix issue with
binfunction (see issue #302). Addition ofzero.rmparameter to prevent creation of empty bins.
- Fix issue with
filterFourierTransformArtefactsfunction (see issue #302). Thanks Adriano Rutz for reporting.
peaksData,MsBackendMemoryreturns adata.frameif additional peak variables (in addition to"mz"and"intensity") are requested. Forcolumns = c("mz", "intensity")(the default) alistofmatrixis returned.peaksData,Spectrareturns either amatrixordata.frameand ensures the peak data is correctly subset based on the lazy evaluation processing queue.$,Spectrato access peak variables ensures the lazy evaluation queue is applied prior to extracting the values.applyProcessingcorrectly subsets and processes all peak variables depending on the processing queue.spectraData<-,Spectrathrows an error if processing queue is not empty and values for peaks variables should be replaced.$<-,Spectrathrows an error if processing queue is not empty and a peaks variable is going to be replaced.- Add full support for additional peaks variables to
MsBackendDataFrame.
- Add
filterPrecursorPeaksto allow filtering peaks within each spectrum with m/z values relative to the precursor m/z of the spectrum.
- Add an example to the vignette describing how spectral similarity scores from
the msentropy package can be used with
compareSpectra.
- Fix in
compareSpectrato also pass parametersppmandtoleranceto the peak similarity calculation functionsFUN: this allows to use custom similarity function with integrated mapping of peaks. - Add
joinPeaksNoneto skip the peak matching incompareSpectraif the similarity scoring function performs its own peak matching. - Only use parallel processing in
setBackend,Spectraif both backends support it.
- Add
filterPrecursorMaxIntensityfunction. - Add
filterPrecursorIsotopesfunction.
- Add
scalePeaksfunction (see issue #291).
- Import
uniqueMsLevelsfromProtGenerics.
- Rename
combinePeaksfor lists of peak matrices intocombinePeaksData. - Add
combinePeaksgenerics. - Add
combinePeaks,Spectrato combine peaks within each spectrum in aSpectra.
- Add
deisotopeSpectraandreduceSpectrafunctions.
- Add example for filtering precursor m/z peaks from fragment spectra to the vignette.
- Fix issue in
MsBackendMemoryfailed to return intensity or m/z values when peaks data is empty. - Fix bug in
filterPrecursorScan()(see #194 and PR #277).
- Fix issue with
filterMzValuesthat would only keep (or remove) the first matching peak instead of all matching peaks (givenppmandtolerance). Issue #274. - Add parameter
keeptofilterMzRangeto support keeping or removing matching peaks.
- Add the
backendBpparammethod that allows to evaluate whether aMsBackendsupports the provided (or the default)BiocParallel-based parallel processing setup. - Minor tweaks in the internal
.peaksapplyfunction to avoid splitting/merging of data if not needed (e.g. if no parallel processing is performed). - Minor tweaks in spectra comparison functions to avoid repeated calling of functions in loops.
- Extend the list of available
MsBackendbackends provided by other packages (in the README and in the package vignette).
- Fix headers in
MsBackendvignette.
- Add
supportsSetBackendmethod forMsBackendto specify whether a backend supportssetBackend,Spectra. setBackendchecks usingsupportsSetBackendwhether a backend supportssetBackend.
- Refactor
setBackendto only split and merge backends if necessary and to not changedataOriginof the original backend. - Support
setBackendwithMsBackendMemoryfor an emptySpectraobject (issue #268). - Disable automatic detection of peak variables for
MsBackendMemory(issue #269). - Fix issue in
Spectrawith emptycharacter(issue #267).
- Address comments from Michele Stravs regarding the
MsBackendvignette. - Add additional tests checking for
MsBackendcompliance.
- Add a vignette describing how to build a
MsBackendfrom scratch (issue #262). - Extend unit test suite to evaluate validity of
MsBackendimplementations.
- Replace
<=withbetweencalls.
- Fix bug in
containsMz()whenmzisn't ordered (see #258).
- Fix error when extracting spectra variables from a
MsBackendMzRof length 0.
- Add
chunkapplyfunction to split aSpectrainto chunks and stepwise apply a functionFUNto each.
combineSpectraonSpectrawith read-only backends change backend to anMsBackendMemoryinstead of anMsBackendDataFrame.
- Expand documentation on
compareSpectrafor GNPS-like similarity scoring.
- Bioconductor 3.17 developmental version.
- Force serial processing in some unit tests to avoid potential failures on some Bioconductor build and check servers (under some circumstances).
- Add
MsBackendMemorybackend class providing a more efficient in-memory data representation thanMsBackendDataFrame.
- Import
spectrapplyfromProtGenerics.
- Fix
setBackendif providedSpectrais empty. backendInitialize,Spectra,MsBackendDataFramereturns aSpectraobject with the full provided spectra data.
- Add
uniqueMsLevelsfunction to allow more efficient, backend-specific, implementations for retrieving unique MS levels from a data set.
- Add parameters
ppmandtolerancetoPrecursorMzParam(for neutral loss calculation) and add optionfilterPeaks = "removePrecursor".
- Improved the
binmethod.
- Set default for parameter
columnsinpeaksData,SpectraandpeaksData,MsBackendtoc("mz", "intensity").
- Add
peaksVariablesmethod and add parametercolumns(or...) topeaksData. - Add
columnsparameter to thepeaksDatamethod ofMsBackendDataFrame,MsBackendMzRandMsBackendHdf5peaks.
- Fix issue in
neutralLossthat would prevent calculation of neutral loss spectra if
- Fix typo in MZ delta plot title.
- Add
coreSpectraVariablesfunction to export the core spectra variables and their expected data types.
- Fix figure sizes in vignette.
- Add
neutralLossmethod and first algorithm to calculate neutral loss spectra.
- Fix neutral loss example in the vignette.
- Add citation.
- Add examples for
combineSpectrato the vignette.
- Add
spectraVariableMappinggeneric.
- Add missing export of the
filterPrecursorMzmethod.
- Add
filterPrecursorMzValuemethod which allows to filter using multiple precursor m/z values (issue #230). - Fix unit test suite.
- Add a testing framework allowing to run standardized unit tests for
new
MsBackendimplementations (issue #186).
- Add the
MsBackendCachedbackend.
- Only calculate number of peaks per spectra if the processing queue
of the
Spectrais not empty. Otherwise call the backend's implementation (issue MsBackendSql #31).
- Small documentation update (related to
MsCoreUtilsissue #87). - New
countIdentifications()function. - Add
filterFourierTransformArtefactsfunction to remove fast fourier artefact peaks seen on e.g. Orbitrap instruments (issue #223).
- Don't read header information when importing peaks matrix on macOS.
- Fix error message in
setBackend(issue #217).
- Fix bug in
plotSpectraandplotSpectraMirrorthat would cause an error if the number of peaks in a spectrum was 1 and labels were provided.
- New features:
joinSpectraData()now check for duplicated keys inx(throws an error) andy(thows a warning).
- New features:
plotMzDelta()function to M/Z delta QC (ported from MSnbase).
- Add fix from
MSnbase(issue #170) toSpectra: on macOS require reading also the spectrum header before reading the peaks data.
- Documentation updates for
combineSpectraandcombinePeaks.
filterMzValuessupports also removing peaks matching specified m/z values (issue #209).
- Add list of additional R packages and repositories providing
MsBackendbackends to the vignette.
- Move generics for
binandcompareSpectratoProtGenerics.
- Add parameter
ftofilterPrecursorScanto fix issue #194.
- Add
estimatePrecursorIntensityfunction (issue #202).
- Fix concatenating empty spectra (issue #200).
- New
filterPrecursorCharge()method.
- Define
plotSpectraMirroras a method.
- Fix issue #187.
- Add function
concatenateSpectrato allow concatenatingSpectraobjects and list ofSpectraobjects.
- Support arbitrary spectra variables to be passed to the functions
provided/added with
addProcessing; issue #182.
- Pass spectras' precursor m/z to the
MAPFUNincompareSpectra; issue #171. - Add
joinPeaksGnpsto perform a peak matching between spectra similar to the one performed in GNPS (issue #171).
- Support plotting of empty spectra (issue 175).
- Move
ProcessingSteptoProtGenerics.
- Fix
showmethod forSpectrato list only the 3 most recent processing steps (issue 173). - Add
processingLogfunction to display the log messages of all processing steps of aSpectraobject.
- Add support for
...topickPeaksandsmooth(issue 168).
- Import
filterIntensityfromProtGenerics.
- Fix label in
plotSpectra.
filterIntensitysupports passing of additional parameters to the used filter function (issue 164).
- Fix bug in
show,ProcessingStep(issue 162).
- New
joinSpectraData()function.
- Add
[[,Msbackendand[[<-,MsBackendmethods (issue 149). - Add
[[,Spectraand[[<-,Spectramethods.
- Fix issue with
labelColinplotSpectra(issue #157).
- Implement a generic
Spectra,ANYconstructor replacingSpectra,DataFrameandSpectra,character.
- Fix problem in export to mzML files that failed for empty spectra (issue #145)
- Round retention time in figure titles.
- Document differences between
spectrumId(spectrumID),acquisitionNumandscanIndex.
- New Bioc devel version
- Re-add
mzandintensityas core spectra variables.
- Fix in
spectraData<-,Spectrato avoid removing m/z and intensity values (issue #146). - Add default implementations of filter functions for
MsBackend.
- Fix in
Spectra,characterconstructor to ensure the backend is changed even ifsourceinherits frombackend(issue #143).
combineSpectraapplies data processing steps in the processing queue prior to combination (issue #140).
- Fix problem in
dropNaSpectraVariablesthat would also drop m/z and intensity values for most backends (issue #138.
- Support
intensityinfilterIntensitymethod to be a function to enable peak intensity-based filtering of spectra (issue #126).
- Add
filterMzRangeandfilterMzValuesto filter spectra based on an m/z range or a list of target m/z values, respectively.
- Add
export,MsBackendMzRto export spectra data to mzML or mzXML file(s). - Add an
export,MsBackendmethod to allow backends to take care of data export. - Refactor
export,Spectrato use theMsBackendclass to export the data. - Change parameter
sourceinSpectra,charactertoMsBackendMzRand set parameterbackend = source. Thus by default, the import backend will also be used to store the data.
- Replace
lapply,Spectrawithspectrapply,Spectra.
- Replace
asDataFrame,MsBackendwithspectraData,MsBackend. - Replace
asDataFrame<-,MsBackendwithspectraData<-,MsBackend. - Replace
as.list,MsBackendwithpeaksData,MsBackend. - Replace
replaceList<-,MsBackendwithpeaksData<-,MsBackend. - Replace
as.list,SpectrawithpeaksData,Spectraand add methods to coerce aSpectrato alistorSimpleList.
- Add
resetmethod. - Add processing by chunk to
compareSpectra.