| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/RcppExports.R |
| 3 |
\name{ReadAlleles} |
| 4 |
\alias{ReadAlleles} |
| 5 |
\title{Loads the variant_numth variant, and then fills acbuf with integer allele |
| 6 |
codes, where each column of the buffer corresponds to a sample. An allele |
| 7 |
code of 0 corresponds to the REF allele, 1 to the first ALT, 2 to the |
| 8 |
second ALT, etc. Missing hardcalls are represented by a pair of NA codes.} |
| 9 |
\usage{ |
| 10 |
ReadAlleles(pgen, acbuf, variant_num, phasepresent_buf = NULL) |
| 11 |
} |
| 12 |
\arguments{ |
| 13 |
\item{pgen}{Object returned by NewPgen().} |
| 14 |
|
| 15 |
\item{acbuf}{Buffer returned by AlleleCodeBuf() or IntAlleleCodeBuf().} |
| 16 |
|
| 17 |
\item{variant_num}{Variant index (1-based).} |
| 18 |
|
| 19 |
\item{phasepresent_buf}{Buffer returned by BoolBuf(). Optional; if |
| 20 |
provided, elements are set to true when the sample has known phase. Most |
| 21 |
of these values will be TRUE even when the raw data is unphased, because |
| 22 |
homozygous genotypes always have known phase. (Missing genotypes are |
| 23 |
considered to have unknown phase.)} |
| 24 |
} |
| 25 |
\value{ |
| 26 |
No return value, called for acbuf-filling side-effect. |
| 27 |
} |
| 28 |
\description{ |
| 29 |
This function treats the data as diploid. If it's really haploid, you may |
| 30 |
want to compare the two rows, and then treat samples where the allele codes |
| 31 |
differ as missing values. |
| 32 |
} |