% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils_ont_annot.R
\name{.run_categorize_ontology}
\alias{.run_categorize_ontology}
\title{Internal - categorizes to ontology roots / depth}
\usage{
.run_categorize_ontology(
  data,
  id_col,
  ontologyDF,
  root_level = 0,
  assign_label = TRUE
)
}
\arguments{
\item{data}{Data frame with an ID column.}

\item{id_col}{Column name containing ontology term IDs.}

\item{ontologyDF}{Processed ontology data.frame (with list columns for relationships and \code{depth}).}

\item{root_level}{Either a character vector of explicit root IDs, a numeric depth, or (default) top-level roots.}

\item{assign_label}{If TRUE, return input with new columns; otherwise return assigned IDs.}
}
\value{
Data frame with \code{root_id}, \code{root_label}, \code{category}, \code{category_source} (if \code{assign_label}).
}
\description{
Internal - categorizes to ontology roots / depth
}
\keyword{internal}
