% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/module1_preqc.R
\name{read_hts_plate}
\alias{read_hts_plate}
\title{Import a plate readout file into a standard HTS object}
\usage{
read_hts_plate(
  file,
  plate_id = NULL,
  well_col = "well",
  signal_col = "signal",
  compound_col = "compound_id",
  conc_col = "concentration",
  type_col = "well_type",
  plate_col = "plate_id",
  nc_label = "NC",
  pc_label = "PC",
  blank_label = "Blank",
  sep = "\\t",
  sheet = 1
)
}
\arguments{
\item{file}{A path to a \code{.csv}, \code{.txt}/\code{.tsv} or \code{.xlsx}/\code{.xls} file, or an
existing data frame of well-level readings.}

\item{plate_id}{Optional plate identifier used when the data has no plate
column.}

\item{well_col, signal_col, compound_col, conc_col, type_col, plate_col}{Names of
the well, signal, compound, concentration, well-type and plate columns in
\code{file}. Missing optional columns are filled with \code{NA}.}

\item{nc_label, pc_label, blank_label}{Character vectors of the labels that
mark negative controls, positive controls and blanks (matched
case-insensitively in \code{type_col}, or in \code{compound_col} when \code{type_col} is
absent).}

\item{sep}{Field separator for \code{.txt}/\code{.tsv} files. Default tab.}

\item{sheet}{Worksheet passed to \pkg{readxl} for Excel files. Default \code{1}.}
}
\value{
An \code{hts_raw} object (a data frame subclass) with columns \code{plate_id},
\code{well}, \code{row}, \code{col}, \code{well_type}, \code{compound_id}, \code{concentration} and
\code{signal}.
}
\description{
Reads an instrument export (csv, txt/tsv or Excel) or an in-memory data frame
of well-level readouts and standardises it into an \code{hts_raw} object with a
fixed set of columns, ready for the rest of the pipeline. Well coordinates are
parsed from the well identifier and control wells are canonicalised to the
labels \code{"NC"}, \code{"PC"} and \code{"Blank"}.
}
\details{
Reading Excel files requires the suggested package \pkg{readxl}.
}
\examples{
raw <- read_hts_plate(hts_primary_raw)
table(raw$well_type)

}
\seealso{
\code{\link[=baseline_subtract]{baseline_subtract()}}, \code{\link[=calc_z_prime]{calc_z_prime()}}, \code{\link[=norm_by_control]{norm_by_control()}}
}
