Compute a matrix product between BGEN files and a matrix. This removes the
need to read an intermediate FBM object with
snp_readBGEN() to compute the
product. Moreover, when using dosages, they are not rounded to two decimal
Character vector of paths to files with extension ".bgen". The corresponding ".bgen.bgi" index files must exist.
A matrix (or a vector), with rows corresponding to
List (same length as the number of BGEN files) of
character vector of SNP IDs to read. These should be in the form
If you have one BGEN file only, just wrap your vector of IDs with
This function assumes that these IDs are uniquely identifying variants.
An optional vector of the row indices (individuals) that
are used. If not specified, all rows are used.
Don't use negative indices.
Directory of index files. Default is the same as
How to read BGEN probabilities? Currently implemented:
as dosages (rounded to two decimal places), the default,
as hard calls, randomly sampled based on those probabilities
(similar to PLINK option '
Maximum size of temporary blocks (in number of variants).
Number of cores used. Default doesn't use parallelism.
You may use
bgen_data[ind_row, 'list_snp_id'] %*% beta.