plotChromatograms() and plotChromatogramsOverlay() to methods.compareChromatograms() from ProtGenerics.Addition of logo and align to BioC 3.23 release.
Fix ChromBackendSpectra spectraSortIndex test to shuffle spectra first,
avoiding a spurious failure when input data is already sorted.
Improve performance of matchRtime().
Fix compareChromatograms(): ... arguments (e.g. tolerance) are now
routed to MAPFUN or FUN based on their formal parameters, preventing
errors when FUN = cor received unknown arguments.
.prepare_spectra_input(): spectra are now
pre-filtered to the non-overlapping union of EIC retention time ranges
using MsCoreUtils::reduce() and Spectra::filterRanges(), and peak
data is loaded in a single peaksData() call instead of separate
mz() and intensity() calls. This reduces I/O and memory usage,
especially for file-backed backends.compareChromatograms() and matchRtime() for pairwise similarity
of chromatographic intensity profiles.peakBoundary() method for Chromatograms objects. Determines the
retention time boundaries of the tallest peak in each chromatogram using
MsCoreUtils::valleys() to locate flanking valleys, with a threshold-based
fallback. Returns a matrix with left_boundary and right_boundary columns.setBackend() now clears the processing queue after switching backend,
preventing queued processing steps from being applied twice (once during
the data transfer and again on subsequent peaksData() calls).
Fix setBackend() parallel branch (used for ChromBackendMzR) to correctly
apply queued processing steps to each chunk before transferring data to
the new backend.
Major performance improvement in .process_peaks_data() for
ChromBackendSpectra. Key optimizations include: pre-extracting mz() and
intensity() as plain R lists (avoiding slow SimpleNumericList indexing),
global retention time pre-filtering, a fast path for TIC/BPC cases, and
using findInterval() with cumsum() for m/z range lookups. Combined,
setBackend() showed 9x speed up for 1000 chromatograms.
Add optimized intensity() and rtime() accessors for ChromBackendMemory
using direct [[ extraction instead of the slower [, col, drop] path
through peaksData().
Further accessor optimizations: intensity(), rtime(), and lengths() on
Chromatograms now bypass peaksData() dispatch when the processing queue
is empty. peaksData() on ChromBackendMemory uses a fast [[ path for
single-column requests. Direct lengths() methods added for all backends
using nrow() instead of going through intensity().
Replace do.call(rbind, ...) with data.table::rbindlist() in
chromExtract() for ChromBackendMemory, ChromBackendMzR, and
ChromBackendSpectra for faster row-binding of many data.frames.
Replace replicate(n, .EMPTY_PEAKS_DATA, simplify = FALSE) with
rep(list(.EMPTY_PEAKS_DATA), n) across backends to avoid repeated
expression evaluation overhead.
Add filterEmptyChromatograms() function to remove empty chromatograms
(i.e., chromatograms without peaks) from a Chromatograms or
ChromBackend object.
Add concatenateChromatograms() function and c() method to combine
multiple Chromatograms objects into a single object. Also add split()
method to split a Chromatograms object based on a grouping factor.
Add extrapolate parameter to imputePeaksData() (default FALSE).
When TRUE, leading/trailing NA values outside the range of observed
data are extrapolated. When FALSE (default), only interpolation is
performed and edge NA values remain as NA.
peaksData() for ChromBackendSpectra to return data in the correct
row order when multiple chromatograms share the same chromSpectraIndex.
This bug caused setBackend() to produce mismatched chromData and
peaksData when converting from ChromBackendSpectra to
ChromBackendMemory with objects containing multiple EICs.chromExtract(), and imputation workflows via
imputePeaksData().spectraSortIndex() for ChromBackendSpectra to compute the desired
retention-time order on demand, avoiding the need to keep on-disk Spectra
objects sorted in memory.chromExtract() method to generate a new Chromatograms object from an
existing one by extracting a subset of chromatograms based on retention
times (optionally m/z) boundaries.imputePeaksData() method to impute missing values in the
chromatographic peaks data.factorize() so that the parameter factorize.by can take a character
vector of length 1.Spectra dependency.IRanges dependencyChromBackendSpectra class and its respective methods.plotChromatograms() and plotChromatogramsOverlay() functions.extractByIndex implementation in the backends.ChromBackendMzR and its respective methods.peaksData() and implementation of chunkwise (and therefore
paralleled) processing of Chromatograms object.addProcessing(), applyProcessing(), processingChunkFactor(),
and processingChunkSize().filterChromData() method for ChromBackend.Chromatograms class and implementation of basic accessor
methods.ChomBackendMemory class and associated methodsChromBackend class and default methods