plot_connections | R Documentation |
Plotting function for Cicero connections. Uses plotTracks
as its basis
plot_connections( connection_df, chr, minbp, maxbp, coaccess_cutoff = 0, peak_color = "#B4656F", connection_color = "#7F7CAF", connection_color_legend = TRUE, alpha_by_coaccess = FALSE, connection_width = 2, connection_ymax = NULL, gene_model = NULL, gene_model_color = "#81D2C7", gene_model_shape = c("smallArrow", "box"), comparison_track = NULL, comparison_coaccess_cutoff = 0, comparison_peak_color = "#B4656F", comparison_connection_color = "#7F7CAF", comparison_connection_color_legend = TRUE, comparison_connection_width = 2, comparison_ymax = NULL, collapseTranscripts = FALSE, include_axis_track = TRUE, return_as_list = FALSE, viewpoint = NULL, comparison_viewpoint = TRUE, viewpoint_color = "#F0544F", viewpoint_fill = "#EFD8D7", viewpoint_alpha = 0.5 )
connection_df |
Data frame of connections, which must include the columns 'Peak1', 'Peak2', and 'coaccess'. Generally, the output of run_cicero or assemble_connections. |
chr |
The chromosome of the region you would like to plot in the form 'chr10'. |
minbp |
The base pair coordinate of the start of the region to be plotted. |
maxbp |
The base pair coordinate of the end of the region to be plotted. |
coaccess_cutoff |
The minimum cicero co-accessibility score you would like to be plotted. Default is 0. |
peak_color |
Color for peak annotations - a single color, the name of a column containing color values that correspond to Peak1, or the name of column containing a character or factor to base peak colors on. |
connection_color |
Color for connection lines. A single color, the name of a column containing color values, or the name of a column containing a character or factor to base connection colors on. |
connection_color_legend |
Logical, should connection color legend be shown? |
alpha_by_coaccess |
Logical, should the transparency of connection lines be scaled based on co-accessibility score? |
connection_width |
Width of connection lines. |
connection_ymax |
Connection y-axis height. If |
gene_model |
Either |
gene_model_color |
Color for gene annotations. |
gene_model_shape |
Shape for gene models, passed to
|
comparison_track |
Either |
comparison_coaccess_cutoff |
The minimum cicero co-accessibility score you would like to be plotted for the comparison dataset. Default = 0. |
comparison_peak_color |
Color for comparison peak annotations - a single color, the name of a column containing color values that correspond to Peak1, or the name of a column containing a character or factor to base peak colors on. |
comparison_connection_color |
Color for comparison connection lines. A single color, the name of a column containing color values, or the name of a column containing a character or factor to base connection colors on. |
comparison_connection_color_legend |
Logical, should comparison connection color legend be shown? |
comparison_connection_width |
Width of comparison connection lines. |
comparison_ymax |
Connection y-axis height for comparison track. If
|
collapseTranscripts |
Logical or character scalar. Can be one in
|
include_axis_track |
Logical, should a genomic axis be plotted? |
return_as_list |
Logical, if TRUE, the function will not plot, but will
return the plot components as a list. Allows user to add/customize Gviz
components and plot them separately using |
viewpoint |
|
comparison_viewpoint |
Logical, should viewpoint apply to comparison track as well? |
viewpoint_color |
Color for the highlight border. |
viewpoint_fill |
Color for the highlight fill. |
viewpoint_alpha |
Alpha value for the highlight fill. |
A gene region plot, or list of components if return_as_list is
TRUE
.
cicero_cons <- data.frame( Peak1 = c("chr18_10034652_10034983", "chr18_10034652_10034983", "chr18_10034652_10034983", "chr18_10034652_10034983", "chr18_10087586_10087901", "chr18_10120685_10127115", "chr18_10097718_10097934", "chr18_10087586_10087901", "chr18_10154818_10155215", "chr18_10238762_10238983", "chr18_10198959_10199183", "chr18_10250985_10251585"), Peak2 = c("chr18_10097718_10097934", "chr18_10087586_10087901", "chr18_10154818_10155215", "chr18_10238762_10238983", "chr18_10198959_10199183", "chr18_10250985_10251585", "chr18_10034652_10034983", "chr18_10034652_10034983", "chr18_10034652_10034983", "chr18_10034652_10034983", "chr18_10087586_10087901", "chr18_10120685_10127115"), coaccess = c(0.0051121787, 0.0016698617, 0.0006570246, 0.0013466927, 0.0737935011, 0.3264019452, 0.0051121787, 0.0016698617, 0.0006570246, 0.0013466927, 0.0737935011, 0.3264019452)) plot_connections(cicero_cons, chr = "chr18", minbp = 10034652, maxbp = 10251585, peak_color = "purple")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.