diff --git a/NEWS.md b/NEWS.md index 618aecf3..ecb3f7b3 100644 --- a/NEWS.md +++ b/NEWS.md @@ -5,6 +5,8 @@ - Support excluding samples or sample groups from defining features with *PeakDensity* correspondence analysis (issue #742). - Add `plotPrecursorIons()` function. +- Fix in `dropFeatureDefinitions()` that was not correctly removing additional + metadata from gap-filled chromatographic peaks. # xcms 4.1 diff --git a/R/XcmsExperiment.R b/R/XcmsExperiment.R index 17f4b834..356edbce 100644 --- a/R/XcmsExperiment.R +++ b/R/XcmsExperiment.R @@ -1556,9 +1556,8 @@ setMethod( object@processHistory, type = .PROCSTEP.PEAK.GROUPING, num = 1L) object@featureDefinitions <- .empty_feature_definitions() if (.hasFilledPeaks(object)) { - object@chromPeaks <- object@chromPeaks[ - !object@chromPeakData$is_filled, , - drop = FALSE] + object <- .filter_chrom_peaks( + object, which(!.chromPeakData(object)$is_filled)) object@processHistory <- dropProcessHistoriesList( object@processHistory, type = .PROCSTEP.PEAK.FILLING) }