% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/kyn_trp_ratio.R
\name{kyn_trp_ratio}
\alias{kyn_trp_ratio}
\title{Kynurenine/Tryptophan Ratio (KTR)}
\usage{
kyn_trp_ratio(
  data,
  col_map = NULL,
  na_action = c("keep", "omit", "error", "ignore", "warn"),
  verbose = TRUE
)
}
\arguments{
\item{data}{A data.frame or tibble with kynurenine and tryptophan concentrations.}

\item{col_map}{Named list with:
\itemize{
\item kynurenine: column for kynurenine (nmol/L)
\item tryptophan: column for tryptophan (mumol/L)
}}

\item{na_action}{One of c("keep","omit","error","ignore","warn").}

\item{verbose}{Logical; if \code{TRUE} (default), prints column mapping and a
per-column results summary.}
}
\value{
A tibble with one column: kyn_trp_ratio (numeric). If an ID column
is detected, it is prepended.
}
\description{
Computes the ratio of kynurenine to tryptophan, a marker of IDO activity and immune activation.
}
\details{
KTR is calculated as Kyn (nmol/L) divided by Trp (mumol/L). Elevated KTR indicates
increased tryptophan catabolism via the kynurenine pathway, often reflecting
inflammation and cell-mediated immune activation.

Inputs should already be in Kyn (nmol/L) and Trp (mumol/L).
}
\examples{
# columns named exactly as the required keys (auto-detected)
df <- data.frame(kynurenine = c(2500, 3100, 2700), tryptophan = c(55, 48, 62))
kyn_trp_ratio(df, verbose = FALSE)

# non-standard column names require explicit col_map
df2 <- data.frame(Kyn_nM = c(2500, 3100, 2700), Trp_uM = c(55, 48, 62))
kyn_trp_ratio(df2, col_map = list(kynurenine = "Kyn_nM", tryptophan = "Trp_uM"),
             verbose = FALSE)

}
\references{
\insertRef{fuchs1998ktr}{HealthMarkers};
\insertRef{damerell2025kyn}{HealthMarkers} (clinical application in colorectal cancer)
}
