% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sequence-consensus-groups.R
\name{format_consensus_sequence}
\alias{format_consensus_sequence}
\title{Format consensus sequences as paths}
\usage{
format_consensus_sequence(
  consensus,
  separator = " -> ",
  include_order = FALSE,
  include_agreement = FALSE,
  digits = 3L
)
}
\arguments{
\item{consensus}{A consensus result.}

\item{separator}{State separator.}

\item{include_order}{Include position labels.}

\item{include_agreement}{Include rounded agreement values.}

\item{digits}{Number of decimal places for agreement values.}
}
\value{
One row per consensus group with a formatted path and position count.
}
\description{
Format consensus sequences as paths
}
\examples{
sequences <- data.frame(
  sequence_id = rep(c("s1", "s2", "s3", "s4"), each = 4L),
  sequence_order = rep(1:4, times = 4L),
  state = c("A", "B", "C", "D", "A", "B", "C", "C",
            "D", "C", "B", "A", "D", "C", "A", "A"),
  group = rep(c("g1", "g2"), each = 8L),
  stringsAsFactors = FALSE
)
consensus <- create_consensus_sequence(sequences)
format_consensus_sequence(consensus)

}
