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.
Usage
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
)Arguments
- dat
data.table with at least the following columns:
- SNP
SNP RSID
- CHR
chromosome
- POS
position
- lib_name
Which XGR annotations to check overlap with. For full list of libraries see here (XGR on CRAN). Passed to the
RData.customisedargument inXGR::xRDataLoader.- locus_dir
Locus-specific directory.
- palette
Any palette available in pals. See get_palettes for a list of all palettes.
- fill_var
Fill variable.
- facet_var
Row facet variable.
- geom
Plot type ("density", or "histogram").
- n_top
Number of top annotations to be plotted (passed to XGR_filter_sources and then XGR_filter_assays).
- adjust
The granularity of the peaks.
- force_new
Download and prepare a new query even if the file already exists locally (Default:
FALSE).- show_plot
Print the plot.
- nThread
Number of threads to parallelise downloading annotations over.
- verbose
Print messages.