View source: R/visualization.R
BigwigTrack | R Documentation |
Create coverage tracks, heatmaps, or line plots from bigwig files.
BigwigTrack(
region,
bigwig,
smooth = 200,
extend.upstream = 0,
extend.downstream = 0,
type = "coverage",
y_label = "bigWig",
bigwig.scale = "common",
ymax = NULL,
max.downsample = 3000,
downsample.rate = 0.1
)
region |
GRanges object specifying region to plot |
bigwig |
List of bigwig file paths. List should be named, and the name of each element in the list of files will be displayed alongside the track in the final plot. |
smooth |
Number of bases to smooth data over (rolling mean). If NULL, do not apply smoothing. |
extend.upstream |
Number of bases to extend the region upstream. |
extend.downstream |
Number of bases to extend the region downstream. |
type |
Plot type. Can be one of "line", "heatmap", or "coverage" |
y_label |
Y-axis label |
bigwig.scale |
Scaling to apply to data from different bigwig files. Can be:
|
ymax |
Maximum value for Y axis. Can be one of:
|
max.downsample |
Minimum number of positions kept when downsampling. Downsampling rate is adaptive to the window size, but this parameter will set the minimum possible number of positions to include so that plots do not become too sparse when the window size is small. |
downsample.rate |
Fraction of positions to retain when downsampling. Retaining more positions can give a higher-resolution plot but can make the number of points large, resulting in larger file sizes when saving the plot and a longer period of time needed to draw the plot. |
Note that this function does not work on windows.
Returns a ggplot object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.