Mirror EIC comparison grid for feature groups
plot_xcms_feature_group_EIC_comparasion.RdPairwise chromatogram comparison for features in one or more xcms feature
groups on an XcmsExperiment (or compatible) object. Panel \((i,j)\)
shows the column feature EIC above \(y = 0\) and the row feature EIC below
(each cropped to its peak RT window via
XChromatograms_subset_feature, exactly as the EIC grouping
does, then normalized to its own max). Cell labels are EIC similarities from
MsExperiment::otherData(xcms)$EIC_Similarity when available (e.g.
after xcms_group_feature_EIC). Strip backgrounds are colored
by feature group when ggh4x is installed.
Usage
plot_xcms_feature_group_EIC_comparasion(
xcms,
feature_group,
chroms = NULL,
expandRt = 2,
min_width = 20,
max_features = NULL,
sample_index = 1L,
title = NULL
)Arguments
- xcms
An
XcmsExperiment/MsExperiment(orXCMSnExp) with feature definitions andfeatureGroups.- feature_group
Character vector of feature group id(s) to compare.
- chroms
Optional
XChromatogramsfor the features (rownames = feature ids) with afeatureDefinitionsslot carryingpeakRtMin/peakRtMax. IfNULL, extracted viaget_xcms_feature_chromatogram.- expandRt
numeric(1). Seconds added on each side of each feature's
[peakRtMin, peakRtMax]window when cropping viaXChromatograms_subset_feature(default2).- min_width
numeric(1). Minimum RT window width (seconds) after
expandRt; shorter windows are padded equally on both sides (default20).- max_features
Maximum features kept per group (ordered by
rtmed).NULLkeeps all members (default).- sample_index
Sample index into
otherData(xcms)$EIC_Similaritywhen several samples are stored (default1L).- title
Optional plot title. Default is
"Feature group: <id> (<rt center>), ...", where the RT center is the medianrtmedof each group's member features.