density_plot | R Documentation |
Plots the density profile of NGS data (e.g. ChIP-seq, ATAC-seq, MeDIP-seq, etc.). Used by the function plot.density.profile
.
density_plot(
samples,
scores,
positions,
variance_scores,
xlab = "Distance from regions center [bp]",
ylab = "Average density signal",
line_type = "solid",
y_lim = NULL,
x_lim = NULL,
x_intercept = 0,
colors = c("blue", "red", "purple", "orange", "green"),
title = "Density profile",
text_size = 12,
variance = T,
print_plot = F,
line_width = 1,
variance_opacity = 0.25
)
samples |
A character vector containing the samples list. |
scores |
A numeric vector containing the scores for the Y-axis. |
positions |
A numeric vector containing the position for the X-axis. |
variance_scores |
A numeric vector containing the variance/error value at each position. |
xlab |
A string containing the label for the X-axis. By default "Distance from regions center [bp]". |
ylab |
A string containing the label for the Y-axis. By default "Average density signal". |
line_type |
Vector to define each line type. Both numeric and string codes are accepted. if only one element is given this will be applied to all the lines. By default "solid". |
y_lim |
List of numeric vectors with two elements each to define the range of the Y-axis. To set only one side use NA for the side to leave automatic. If only one range is given this one will be applied to all the plots. By default |
x_lim |
List of numeric vectors with two elements each to define the range of the X-axis. To set only one side use NA for the side to leave automatic. If only one range is given this one will be applied to all the plots. By default |
x_intercept |
A vector indicating the X intercepts for the vertical lines. By default 0. |
colors |
Vector to define the line and error area colors. If only one value is provided or the number of values is lower than the required ones only the first value will be used. All standard R.colors values are accepted. By default |
title |
A string containing the label for the X-axis. By default "Density profile". |
text_size |
Numeric value to define the size of the text for the labels of all the plots. By default 12. |
variance |
Logic value to define whether to plot the error/variance around the signal. By default |
print_plot |
Logic value to define whether to print the plot once generated or not. By default |
line_width |
Numeric value to define the line width for all the plots. By default 1., |
variance_opacity |
Numeric value to define the alpha/transparency of the error/variance. By default 0.25. Parameter considered only when |
Returns a plot in ggplot2 format.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.