% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/format5.R
\name{getbd5snp_con}
\alias{getbd5snp_con}
\title{Read a Format 5 SNP using a persistent open connection}
\usage{
getbd5snp_con(bd5info, snp, dosage, p0, p1, p2, bd5con)
}
\arguments{
\item{bd5info}{Object returned by \code{getbdinfo}.}

\item{snp}{1-based integer index or character SNP ID.}

\item{dosage}{Pre-allocated \code{numeric(n_samples)} vector.}

\item{p0}{Pre-allocated \code{numeric(n_samples)} vector.}

\item{p1}{Pre-allocated \code{numeric(n_samples)} vector.}

\item{p2}{Pre-allocated \code{numeric(n_samples)} vector.}

\item{bd5con}{Object returned by \code{openbd5con}.}
}
\value{
\code{NULL} invisibly.  \code{dosage}, \code{p0}, \code{p1}, and
\code{p2} are updated in place.
}
\description{
Like \code{getbd5snp_buf} but reuses an already-open file connection
instead of opening and closing it on every call.  Use \code{openbd5con}
before the loop and \code{closebd5con} (or let the finalizer handle it)
after.
}
