% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/parse_count_tables.R
\name{clean_sample_names}
\alias{clean_sample_names}
\title{Clean sample names from TSV column headers}
\usage{
clean_sample_names(
  x,
  remove_prefix = TRUE,
  dot_to_dash = TRUE,
  suffix_patterns = c("\\\\.QUALITY_PASSED_R1\\\\.fastq\\\\.Read\\\\.Count$",
    "\\\\.QUALITY_PASSED_R1\\\\.fastq\\\\.Covered\\\\.Fraction$",
    "\\\\.QUALITY_PASSED_R1\\\\.fastq\\\\.Relative\\\\.Abundance.*$")
)
}
\arguments{
\item{x}{A character vector of sample names (typically \code{colnames(df)}).}

\item{remove_prefix}{Logical; remove leading \code{X} added by R? Default
\code{TRUE}.}

\item{dot_to_dash}{Logical; replace \code{.} with \code{-}? Default \code{TRUE}.}

\item{suffix_patterns}{Character vector of regex patterns to strip from
the end of each name.}
}
\value{
A character vector of cleaned names.
}
\description{
Removes the \code{X} prefix that \code{\link[utils:read.table]{utils::read.csv()}} adds to column names
starting with a digit, replaces \code{.} with \code{-} to restore the original
sample IDs, and strips format-specific suffixes such as
\verb{.QUALITY_PASSED_R1.fastq.*}.
}
\examples{
clean_sample_names(c("X12.34.AB.QUALITY_PASSED_R1.fastq.Read.Count"))
}
