Automatically handles different file formats provided by XGR (e.g. varying kinds of nested/unnested GRanges). Then returns a Granges object with only the XGR annotation ranges that overlap with the SNPs in dat. The GRanges merges hits from dat.

XGR_iterate_overlap(
  lib.selections = c("ENCODE_TFBS_ClusteredV3_CellTypes", "TFBS_Conserved",
    "ReMap_PublicAndEncode_TFBS", "Uniform_TFBS"),
  dat,
  save_path = FALSE,
  nThread = 1
)

Arguments

lib.selections

Which XGR annotations to check overlap with. For full list of libraries see here. Passed to the RData.customised argument in xRDataLoader.

dat

Data.frame with at least the following columns:

SNP

SNP RSID

CHR

chromosome

POS

position

save_path

Save the results as a data.frame.

nThread

Number of threads to parallelise across libraries.

Examples

if (FALSE) {
gr.hits <- XGR_iterate_overlap(
    lib.selections = c("ENCODE_TFBS_ClusteredV3_CellTypes"),
    dat = echodata::BST1
)
}