% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/heatmap.R
\name{build_heatmap_annotation}
\alias{build_heatmap_annotation}
\title{Build HeatmapAnnotation with safe parameter merge}
\usage{
build_heatmap_annotation(
  annotations,
  which,
  show_annotation_name = TRUE,
  annotation_name_side = NULL,
  border = NULL,
  params = NULL
)
}
\arguments{
\item{annotations}{Named list of annotation components (for example, \code{anno_simple}, \code{anno_block}, \code{anno_customize}).}

\item{which}{Annotation direction (\code{"row"} or \code{"column"}).}

\item{show_annotation_name}{Whether to show annotation names.}

\item{annotation_name_side}{Side for annotation names.}

\item{border}{Whether to draw a rectangle border around the block.}

\item{params}{Additional user parameters; duplicated keys are ignored if already set explicitly.}
}
\value{
A \link[ComplexHeatmap:HeatmapAnnotation]{ComplexHeatmap::HeatmapAnnotation} object.
}
\description{
Build HeatmapAnnotation with safe parameter merge
}
\examples{
anno <- list(
  group = ComplexHeatmap::anno_simple(
    x = c("A", "B", "A"),
    col = c(A = "#1b9e77", B = "#d95f02"),
    which = "column"
  )
)
ha <- build_heatmap_annotation(
  annotations = anno,
  which = "column",
  show_annotation_name = TRUE,
  annotation_name_side = "left",
  params = list(gap = grid::unit(1, "mm"))
)
ha
}
