Opens a .pgen or PLINK 1 .bed file.
NewPgen(filename, pvar = NULL, raw_sample_ct = NULL, sample_subset = NULL)
A pgen object, which can be queried for genotype/dosage data.
.pgen/.bed file path.
Object (see NewPvar()) corresponding to the .pgen's companion .pvar; technically optional, but necessary for some functionality. In particular, at multiallelic variants, all ALT alleles may be collapsed together when .pvar information is not available.
Number of samples in file; required if it's a PLINK 1 .bed file, otherwise optional.
List of 1-based positions of samples to load; optional, all samples are loaded if this is not specified.