Learn R Programming

pgenlibr (version 0.4.0)

VariantScores: Compute variant scores.

Description

This function treats the data as diploid; divide by 2 to obtain scores based on a haploid dosage matrix.

Usage

VariantScores(pgen, weights, variant_subset = NULL)

Value

Numeric vector, containing product of sample-weight vector and the specified subset of the dosage matrix.

Arguments

pgen

Object returned by NewPgen().

weights

Sample weights.

variant_subset

Integer vector containing 1-based indexes of variants to include in the dosage matrix. Optional; by default, all variants are included.