View source: R/XGR_plot_peaks.R
XGR_plot_peaks | R Documentation |
Plots the distribution of annotations across a genomic region (x-axis).
XGR_plot_peaks(
gr.lib,
dat,
fill_var = "Assay",
facet_var = "Source",
geom = "density",
locus = NULL,
adjust = 0.2,
show_plot = TRUE,
legend = TRUE,
as_ggplot = TRUE,
trim_xlims = FALSE
)
gr.lib |
|
dat |
Data.frame with at least the following columns:
|
fill_var |
Fill variable. |
facet_var |
Row facet variable. |
geom |
Plot type ("density", or "histogram"). |
locus |
[Optional] Locus name. |
adjust |
The granularity of the peaks. |
show_plot |
Print the plot. |
legend |
A logical value indicates whether to show legend or not. Default is
|
as_ggplot |
Return plot as |
trim_xlims |
Trim the x-axis limits. |
ggbio
track plot.
#### Import example query ####
gr.lib <- echoannot::xgr_example
#### Filter query ####
gr.filt <- echoannot::XGR_filter_sources(gr.lib = gr.lib)
gr.filt <- echoannot::XGR_filter_assays(gr.lib = gr.filt)
#### Plot query #####
XGR_track <- echoplot::XGR_plot_peaks(
gr.lib = gr.filt,
dat = echodata::BST1,
fill_var = "Assay",
facet_var = "Source")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.