Merges a list of XGR annotations into a single GRangesList (or merged GRanges) object.

XGR_query(
  lib.selections = c("ENCODE_TFBS_ClusteredV3_CellTypes", "TFBS_Conserved",
    "Uniform_TFBS"),
  as_grangesList = FALSE,
  dat = NULL,
  n_top = NULL,
  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.

as_grangesList

Return as a GRangesList, instead of a single merged GRanges object.

dat

data.table of genomic coordinates to query with. Set as NULL to return genome-wide data.

n_top

Filter to only the top N annotations that have the greatest amount of overlap with the genomic coordinates of dat.

nThread

Number of cores to parallelise across.

Value

GRangesList

Examples

gr.lib <- echoannot::XGR_query(
    lib.selections = c("ENCODE_DNaseI_ClusteredV3_CellTypes"),
    dat = echodata::BST1, 
    n_top = 1)
#> Start at 2022-10-30 16:26:07
#> 
#> 'ENCODE_DNaseI_ClusteredV3_CellTypes' (from http://galahad.well.ox.ac.uk/bigdata/ENCODE_DNaseI_ClusteredV3_CellTypes.RData) has been loaded into the working environment (at 2022-10-30 16:26:16)
#> 
#> End at 2022-10-30 16:26:16
#> Runtime in total is: 9 secs
#> Converting dat to GRanges object.
#> 778 query SNP(s) detected with reference overlap.