% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/raw-file-reader.R
\name{ms_chromatogram}
\alias{ms_chromatogram}
\alias{ms_chromatogram,MzrReader-method}
\alias{ms_chromatogram,RawrrReader-method}
\alias{ms_chromatogram,XcmsRawReader-method}
\title{Extract an extracted ion chromatogram (XIC) using the native backend}
\usage{
ms_chromatogram(reader, mz, ppm, rt_range)

\S4method{ms_chromatogram}{MzrReader}(reader, mz, ppm, rt_range)

\S4method{ms_chromatogram}{RawrrReader}(reader, mz, ppm, rt_range)

\S4method{ms_chromatogram}{XcmsRawReader}(reader, mz, ppm, rt_range)
}
\arguments{
\item{reader}{An instance of \code{MsRawReader}.}

\item{mz}{A \code{numeric} scalar — the target m/z.}

\item{ppm}{A \code{numeric} scalar — the mass tolerance in ppm.}

\item{rt_range}{A length-2 \code{numeric} vector — the RT window in seconds.}
}
\value{
A \code{list} with two \code{tibble}s: \code{chromatograms} (columns \code{rt} and
\code{intensity}) and \code{mass_traces} (empty for backends that do not expose
per-scan m/z data via this interface).
}
\description{
\code{ms_chromatogram()} uses the backend's own XIC extraction mechanism rather
than reconstructing chromatograms scan-by-scan from \code{ms_peaks()}.
Currently only implemented for \code{RawrrReader} (ThermoFisher \code{.raw} files),
which delegates to \code{rawrr::readChromatogram()}.
}
\keyword{internal}
