ReadList {pgenlibr}R Documentation

Load dosages for multiple variants as a numeric matrix.

Description

This function treats the data as diploid; divide by 2 to obtain haploid dosages.

Usage

ReadList(pgen, variant_subset, meanimpute = FALSE)

Arguments

pgen

Object returned by NewPgen().

variant_subset

Integer vector containing 1-based indexes of variants to load.

meanimpute

Optional; if true, missing values are mean-imputed instead of being represented by NA.

Value

Numeric matrix, where rows correspond to samples, and columns correspond to variant_subset. Values are in [0, 2] indicating ALT allele dosages, or NA for missing dosages. For multiallelic variants, all ALT alelles are combined.


[Package pgenlibr version 0.3.5 Index]