Closed michaelwitting closed 3 years ago
That sounds like a bug. Could you please provide a minimal working example so that I can check and fix?
Here an example
library(Spectra)
library(MsCoreUtils)
spd <- DataFrame(msLevel = c(2L, 2L, 2L), rtime = c(1, 2, 3))
spd$mz <- list(c(12, 14, 45, 56), c(14.1, 34, 56.1), c(12.1, 14.15, 34.1))
spd$intensity <- list(c(10, 20, 30, 40), c(11, 21, 31), c(12, 22, 32))
sps <- Spectra(spd)
res <- combineSpectra(sps)
filter_fun <- function(x){
x > max(x, na.rm = TRUE) / 100
}
sps_filter <- filterIntensity(sps, intensity = filter_fun)
res <- combineSpectra(sps_filter)
The second combineSpectra
throws Fehler in .concatenate_spectra(res) : Can not concatenate 'Spectra' objects with non-empty processing queue
Thanks @michaelwitting . This bug should be fixed with PR #141
Fixed in version 0.99.8 (current master branch) - should be available through Bioconductor in the next couple of days.
Hi,
We would like to combine a intensity filter followed by combining spectra. My student @liesasalzer has seen that filtering is not applied when calling
combineSpectra
. Is there a specific reason for this? We are working around by usingapplyProcessing
, but I was just wondering...Best,
Michael