Import annotation from XGR, filter to only those within the range of
dat
, and then plot the peaks.
If the annotation has already been downloaded previously, it will be reused.
XGR_plot(
dat,
lib_name = "ENCODE_TFBS_ClusteredV3_CellTypes",
locus_dir = tempdir(),
palette = get_palettes(n_pals = 1, names_only = TRUE),
fill_var = "Assay",
facet_var = "Source",
geom = "density",
n_top = 5,
adjust = 0.2,
force_new = FALSE,
show_plot = FALSE,
nThread = 1,
verbose = TRUE
)
data.table with at least the following columns:
SNP RSID
chromosome
position
Which XGR annotations to check overlap with.
For full list of libraries see
here.
Passed to the RData.customised
argument in xRDataLoader.
Locus-specific directory.
Any palette available in pals. See get_palettes for a list of all palettes.
Fill variable.
Row facet variable.
Plot type ("density", or "histogram").
Number of top annotations to be plotted (passed to XGR_filter_sources and then XGR_filter_assays).
The granularity of the peaks.
Download and prepare a new query
even if the file already exists locally (Default: FALSE
).
Print the plot.
Number of threads to parallelise downloading annotations over.
Print messages.
List with the "data" and the "plot".
xgr_out <- echoplot::XGR_plot(dat = echodata::BST1[seq_len(1000),])
#> echoannot:: Plotting XGR annotations.
#> Start at 2022-12-23 02:21:55.261217
#>
#> 'ENCODE_TFBS_ClusteredV3_CellTypes' (from http://galahad.well.ox.ac.uk/bigdata/ENCODE_TFBS_ClusteredV3_CellTypes.RData) has been loaded into the working environment (at 2022-12-23 02:22:02.846536)
#>
#> End at 2022-12-23 02:22:02.84689
#> Runtime in total is: 7 secs
#> Converting dat to GRanges object.
#> 398 query SNP(s) detected with reference overlap.
#> Warning: Ignoring unknown parameters: `facets`
#> Warning: no non-missing arguments to max; returning -Inf