% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils_provenance.R
\name{add_note}
\alias{add_note}
\title{Add user note to metabom8 provenance
Appends a user annotation to the \code{"m8_prep"} attribute.
The step title is formatted as \code{"note {username}"}.
The timestamp is stored in \code{params}, and the user message
is stored in \code{notes}.}
\usage{
add_note(x, note, params = NULL)
}
\arguments{
\item{x}{A metabom8 object or matrix with \code{"m8_prep"} metadata.}

\item{note}{Character string describing the annotation.}

\item{params}{Named list providing paramter key-value pairs.}
}
\value{
The input object with updated provenance metadata.
}
\description{
Add user note to metabom8 provenance
Appends a user annotation to the \code{"m8_prep"} attribute.
The step title is formatted as \code{"note {username}"}.
The timestamp is stored in \code{params}, and the user message
is stored in \code{notes}.
}
\examples{
params <- list(
  runtime  = "docker",
  image    = Sys.getenv("IMAGE", "docker-image-dummy"),
  workflow = Sys.getenv("M8_WORKFLOW", "std_prof-urine"),
  agent    = paste0("snakemake/", Sys.getenv("SNAKEMAKE_VERSION", "v?")),
  run_id   = Sys.getenv("M8_RUN_ID", "m8-2605-001")
)

data(hiit_raw)
print_provenance(hiit_raw)

hiit_proc <- hiit_raw |>
  calibrate(type = "tsp") |>
  excise() |>
  add_note('dilution-adaptive acquisition mode -> verify snr after normalisation',
    params)

print_provenance(hiit_proc)

}
\seealso{
Other provenance: 
\code{\link{get_provenance}()},
\code{\link{print_provenance}()}
}
\concept{provenance}
