THIS FUNCTION WILL BE MODIFIED IN THE FUTURE.
snp_assocBGEN(
bgenfiles,
list_snp_id,
y_row,
ind_row,
bgi_dir = dirname(bgenfiles),
ncores = 1
)
Character vector of paths to files with extension ".bgen". The corresponding ".bgen.bgi" index files must exist.
List (same length as the number of BGEN files) of
character vector of SNP IDs to read. These should be in the form
"<chr>_<pos>_<a1>_<a2>"
(e.g. "1_88169_C_T"
or "01_88169_C_T"
).
This function assumes that these IDs are uniquely identifying variants.
A vector corresponding to ind_row
and representing the trait
with which to compute correlations.
Missing values in either ind_row
or y_row
are removed.
A vector of the row indices (individuals) that are used.
Missing values in either ind_row
or y_row
are removed.
Make sure to use indices corresponding to your training set only.
Directory of index files. Default is the same as bgenfiles
.
Number of cores used. Default doesn't use parallelism.
You may use nb_cores()
.
A list of vectors of log10(p-values) corresponding to the statistic
\(n \times r^2\), where r is the correlation of each variant with y_row
.