From 6bcbc94241cb84fb5793075dbcdc3719311b5e53 Mon Sep 17 00:00:00 2001 From: Johannes Rainer Date: Wed, 18 Dec 2024 14:12:01 +0100 Subject: [PATCH] refactor: import extractByIndex from ProtGenerics --- DESCRIPTION | 4 ++-- NAMESPACE | 1 + NEWS.md | 4 ++++ R/AllGenerics.R | 2 -- R/MsBackend.R | 2 ++ 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index bda18ab1..b355aa2d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: Spectra Title: Spectra Infrastructure for Mass Spectrometry Data -Version: 1.17.3 +Version: 1.17.4 Description: The Spectra package defines an efficient infrastructure for storing and handling mass spectrometry spectra and functionality to subset, process, visualize and compare spectra data. It provides different @@ -42,7 +42,7 @@ Depends: S4Vectors, BiocParallel Imports: - ProtGenerics (>= 1.37.1), + ProtGenerics (>= 1.39.1), methods, IRanges, MsCoreUtils (>= 1.7.5), diff --git a/NAMESPACE b/NAMESPACE index d70ef776..c3dd72ab 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -257,6 +257,7 @@ importMethodsFrom(ProtGenerics,compareSpectra) importMethodsFrom(ProtGenerics,dataOrigin) importMethodsFrom(ProtGenerics,dataStorage) importMethodsFrom(ProtGenerics,estimatePrecursorIntensity) +importMethodsFrom(ProtGenerics,extractByIndex) importMethodsFrom(ProtGenerics,filterAcquisitionNum) importMethodsFrom(ProtGenerics,filterDataOrigin) importMethodsFrom(ProtGenerics,filterDataStorage) diff --git a/NEWS.md b/NEWS.md index 6fd58890..d9088114 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,9 @@ # Spectra 1.17 +## Change in 1.17.4 + +- Import `extractByIndex()` from *ProtGenerics*. + ## Change in 1.17.3 - Fix `cbind2()` unit test for backends that fails if the number of spectra in diff --git a/R/AllGenerics.R b/R/AllGenerics.R index 856cb69e..5ac35fc9 100644 --- a/R/AllGenerics.R +++ b/R/AllGenerics.R @@ -21,8 +21,6 @@ setGeneric("entropy", function(object, ...) standardGeneric("entropy")) setGeneric("export", function(object, ...) standardGeneric("export")) -setGeneric("extractByIndex", function(object, i) - standardGeneric("extractByIndex")) setGeneric("filterFourierTransformArtefacts", function(object, ...) standardGeneric("filterFourierTransformArtefacts")) setGeneric("neutralLoss", function(object, param, ...) diff --git a/R/MsBackend.R b/R/MsBackend.R index 6b66fef1..10dffd8a 100644 --- a/R/MsBackend.R +++ b/R/MsBackend.R @@ -1171,6 +1171,8 @@ setMethod("dropNaSpectraVariables", "MsBackend", function(object) { #' #' @importFrom methods existsMethod #' +#' @importMethodsFrom ProtGenerics extractByIndex +#' #' @export setMethod("extractByIndex", c("MsBackend", "ANY"), function(object, i) { if (existsMethod("[", class(object)[1L]))