% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/consensus_annotation.R
\name{parse_text_predictions}
\alias{parse_text_predictions}
\title{Parse text-format model predictions into a named list}
\usage{
parse_text_predictions(model_preds, all_clusters = NULL)
}
\arguments{
\item{model_preds}{Character vector of prediction lines from a model}

\item{all_clusters}{Optional character vector of cluster IDs for positional fallback}
}
\value{
Named list mapping cluster IDs to cell type annotations
}
\description{
Reads a response as explicit cluster labels (keyed by resolved cluster ID,
so out-of-order labels land correctly) when at least one label resolves,
unless an unresolved cluster-reference key coexists with incomplete coverage
-- that signals list ordinals misaligned against the requested clusters and
falls through to positional mapping. Positional mapping preserves the
line->cluster slot correspondence so a mid-list "Unknown" does not shift
later clusters, and a stray "Summary:"/"Note:" line does not hijack the parse.
}
\keyword{internal}
