% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{ReadSparse}
\alias{ReadSparse}
\title{If HasSparse() is true, returns a sparse representation for the
(variant, allele) pair.  If HasSparse() is false, the function fails.}
\usage{
ReadSparse(pgen, variant_num, allele_num = 2L)
}
\arguments{
\item{pgen}{Object returned by NewPgen().}

\item{variant_num}{Variant index (1-based).}

\item{allele_num}{Allele index; 1 corresponds to REF, 2 to the first ALT
allele, 3 to the second ALT allele if it exists, etc.  Optional, defaults
to 2.}
}
\value{
An object where "sample_nums" is an increasing sequence of positive
integers listing which samples have the allele, and "dosages" is a vector
listing the dosages (on a 0-2 scale) for those samples.
}
\description{
If HasSparse() is true, returns a sparse representation for the
(variant, allele) pair.  If HasSparse() is false, the function fails.
}
