  We present a computational method to identify glitches in gravitational-wave
data that occur nearby gravitational-wave signals from compact binary
coalescences. The Q-transform, an established tool in LIGO-Virgo-KAGRA data
analysis, computes the probability of any excess in the data surrounding a
signal against the assumption of a Gaussian noise background, flagging any
significant glitches. Subsequently, we perform validation tests on this
computational method to ensure self-consistency in colored Gaussian noise, as
well as data that contains a gravitational-wave event after subtracting the
signal using the best-fit template. Finally, a comparison of our glitch
identification results from real events in LIGO-Virgo's third observing run
against the list of events which required glitch mitigation shows that this
tool will be useful in providing precise information about data quality to
improve astrophysical analyses of these events.
