View source: R/genomic.tracks.R
genomic.tracks | R Documentation |
The functions allows to plot different types of genomic data (bigWig, bed, bedpe) at a specific genomic region. It is possible to highlight specific regions and the gene annotations are plotted automatically at the bottom of all the tracks.
genomic.tracks(
tracks,
genomic.region,
genome,
track.labels = NULL,
track.labels.fontzise = 5,
track.labels.position = c(-0.1, 0),
track.colors = "#000000",
grouping = NULL,
gene.annotation.color = "darkblue",
expand.bed = TRUE,
arcs.direction = "down",
fraction.arc.base = 0.025,
highlight.bed = NULL,
highlight.color = "yellow",
highlight.transparency = 0.15,
missing.data.as.zero.bw = FALSE,
smooth.bigWig.signal = TRUE,
smooth.bigWig.loess.span = 0.05,
plot.bigWig.area = TRUE,
bigWig.range.label.size = 2.5,
score.bed.shadow = FALSE,
height.ratios = NULL,
width.ratios = c(1, 5)
)
tracks |
A vector indicating the list of full paths of the files/tracks/signals to plot. Supported formats: bed/bd/narrowPeak/broadPeak, bw/bigWig/bigwig, bedpe. |
genomic.region |
An atomic string indicating the genomic region into which restrict the final plot in the format 'chr1:1234-5678'. |
genome |
An atomic string indicating the genome to use for the annotations. Allowed values are:
|
track.labels |
A vector indicating the labels to use for each track (genome annotation track excluded). By default |
track.labels.fontzise |
A numerical value to indicate the font size of the track labels. Default value |
track.labels.position |
A two-element numeric vector passed to |
track.colors |
A string vector indicating the color to use for each track (genome annotation track excluded). If only one value is provided it will be used for all the tracks. Default value |
grouping |
A single numerical vector or a list of numeric vectors. Each list's element indicates the indexes corresponding to the tracks (1 = first track, 2 = second track, etc) for which the y-axes should be normalized. Each element will be taken into account in the order. Default value |
gene.annotation.color |
A string indicating the color to use for the genome annotation track. |
expand.bed |
A logical value to define whether overlapping regions in a bed should be plotted on different levels. Default |
arcs.direction |
A string indicating the direction on which arcs should be plotted for bedpe files. Available options |
fraction.arc.base |
A numerical value indicating the fraction of total plot height to be used as arc base thickness. By default |
highlight.bed |
Either a string indicating the full path to a bed file or a data.frame in BED3 format (chr, start, end) containing regions that should be highlighted in the plot. Regions included in the genomic range will be automatically selected. By default |
highlight.color |
A string indicating the color to use for the regions to highlight in the plot. By default |
highlight.transparency |
A numerical value indicating the transparency (alpha) to use for the highlighted regions. Default value |
missing.data.as.zero.bw |
A logical value to define wthere missing data in the bigWigs should be converted to zeros. Default |
smooth.bigWig.signal |
Logical value to indicate whether the bigWig signals should be smoothed (by loess x ~ y function). By default |
smooth.bigWig.loess.span |
Numerical value to indicate the span value for the loess function used to smooth bigWig signals. By default |
plot.bigWig.area |
Logical value to indicate whether the bigWig profile should be filled or not. If |
bigWig.range.label.size |
A numerical value to indicate the font size of the bigWig signal range. Default value |
score.bed.shadow |
Logical value to define whether the filling intensity of the bed segments should reflect the score of each signal. By default |
height.ratios |
Numerical vector of relative track heights, passed to 'rel_heights' parameter of |
width.ratios |
Numerical vector of relative labels vs tracks widths, passed to 'rel_widths' parameter of |
The function returns a named list containing:
configuration
: data.frame with the parameters used to build the plot(s);
highlighted.region
: data.frame with the regions used for the highlighting;
single.track.list
: a named list containing each single track plot used for the creation of the multi.track.plot;
single.label.plot.list
: a named list containing each single track label plot used for the creation of the multi.track.plot;
multi.track.plot
: the assembled multi.track labelled plot.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.