Learn R Programming

pgenlibr (version 0.4.0)

ReadList: 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)

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.

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.