% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/format5.R
\name{getbd5snp}
\alias{getbd5snp}
\title{Read a SNP from a Format 5 binary dosage file}
\usage{
getbd5snp(bd5info, snp)
}
\arguments{
\item{bd5info}{Object returned by \code{getbdinfo}.}

\item{snp}{The SNP to retrieve: either a 1-based integer index or a
character SNP ID matching a value in \code{bd5info$snps$snpid}.}
}
\value{
A list with four numeric vectors, each of length n_samples:
\describe{
\item{dosage}{DS values in [0, 2]; NA = missing.}
\item{p0}{P(g=0) values in [0, 1]; NA = missing.}
\item{p1}{P(g=1) values in [0, 1]; NA = missing.}
\item{p2}{P(g=2) values in [0, 1]; NA = missing.}
}
}
\description{
Seeks to the SNP's compressed block in the .bdose file, decompresses it,
and returns the dosage and genotype probabilities for all samples.
}
