render an interactive graphics visualization of entire chromosomes or chromosomal regions of any living organism. Chromosomal elements such as genes can be annotated easily using this tool.
required for creating widgets
chromoMap(
ch.files,
data.files,
title = c(),
ch_gap = 5,
ploidy = 1,
top_margin = 25,
left_margin = 50,
chr_width = 15,
chr_length = 4,
chr_color = c("black"),
data_based_color_map = FALSE,
segment_annotation = FALSE,
lg_x = 0,
lg_y = 0,
data_type = c("numeric", "categorical"),
labels = FALSE,
canvas_width = NULL,
canvas_height = NULL,
data_colors = list(),
anno_col = c("#10B85F"),
chr_text = c(TRUE),
discrete.domain = NULL,
legend = c(FALSE),
hlinks = FALSE,
aggregate_func = c("avg"),
plots = c("none"),
tag_filter = list(c("none", 0)),
plot_height = c(30),
plot_ticks = c(4),
plot_color = c("blue"),
plot_y_domain = list(c(0, 0)),
ch2D.colors = NULL,
ch2D.cat.order = NULL,
ch2D.lg_x = 0,
ch2D.lg_y = 0,
ref_line = c(FALSE),
refl_pos = c(0),
refl_color = c("grey"),
refl_stroke_w = c(2),
tagColor = c("red"),
heat_map = c(TRUE),
text_font_size = c(10),
chr_curve = 5,
title_font_size = 12,
label_font = 9,
label_angle = -90,
vertical_grid = FALSE,
grid_array = c(0, 5000, 10000),
grid_color = "grey",
grid_text = NULL,
grid_text_size = 12,
grid_text_y = 20,
plot_filter = list(c("none", 0)),
id = c("chromap"),
region = NULL,
show.links = FALSE,
loci_links = "none",
directed.edges = F,
y_chr_scale = 0,
links.colors = NULL,
links.lg_x = 0,
links.lg_y = 0,
n_win.factor = 1,
chr.scale.ticks = 5,
export.options = F,
fixed.window = F,
window.size = NULL,
win.summary.display = F,
remove.last.window = T,
guides = F,
guides_color = "lightgrey",
ann.h = 1,
chr.2D.plot = F,
display.chr = T,
plot.shift = c(1),
plot.legend.labels = c(""),
cat.legend.label = "",
plot.y.labels = c(""),
plot.y.lab.x = 10,
plot.y.lab.y = 0,
plot.y.lab.size = 15,
scale.suffix = "bp",
numeric.domain = NULL,
interactivity = T
)
filename(s) as character vector OR list of data.frames containing co-ordinates of the chromosomes to render
filename(s) as character vector OR list of data.frames containing data to annotate on the chromosomes.
a character string to be used as a title in plot
provide spacing between chromosomes.
specify the number of sets of chromsomes being passed.
specify the margin from top of the plot
specify the margin from the left of the plot
specify the width of each chromsome
specify the length of each chromsome.
a vector specifying the color of each chromsome in a set. A color can be assigned to each set by passing a different color values as vector
a boolean to tell the plot to use the data provided in file for visualizing annotation
a boolean to use segment-annotation algorithm
specify the x or horizontal distance of the legend from origin(bottom right corner)
specify the y or vertical distnce of the legend from the origin
specifying the data type of the data used. takes value either 'categorical' or 'numeric'
a boolean to include labels in plot
width of the plot
height of the plot
specify annotation colors for the data
a vector to specify annotation color for each set.
a boolean vector to enable or disable chromsome texts for each ploidy.set
manually specify the order of categories.
a boolean vector to enable or disable legend for each set/ploidy
a boolean to use hyperlinks supplied in data
takes either 'sum' or 'avg' to specift aggregate function for each loci
specify the type of plot to visualize. takes either 'scatter' , 'bar' or 'tags'.(default: 'none')
a list to specify the filter operation and operands for each ploidy.
specify plot height for each ploidy. default: c(30)
specify number of ticks for plot axis. default: c(4)
specify the plot color for each ploidy. default: c("blue")
specify plot y-axis domain. default: list(c(0,0))
specify the group colors for visualizing categories on 2D chromosome plots
manually setting the order of categories for 2D-Chromsome plot
specify the x or horizontal distance of 2D plot legend from the origin(bottom right corner)
specify the y or vertical distance of 2D plot legend
a boolean to use horizontal reference line in plot. default: c(FALSE)
specify the position of reference line. default: c(0)
specify the color of the reference line. default: c("grey")
specify the stroke width of the reference line. default: c(2)
specify the color of tags. default: c("red")
a boolean to use if chromosome heatmaps are shown. default: c(TRUE),
specify chromosome text font-size. default: c(10)
specify the chromosome curves at the telomeres or centromere loci. default:5
specify the font-size of the title. default:12
specify the font-size of the labels. default:9
specify the angle of rotation of labels. default: -90
a boolean to use vertical grid lines. default: FALSE
specify the position(s) of grid line(s) in bp to highlight locations across genome. default: c(0,5000,10000)
specify the color of the grid lines. default: "grey"
specify the text to be attached at the top end of gridlines
specify the font-size of the text
specify the y-distance (from top) for the text
a list specify the plot filter operation, operands, and filter-color for each ploidy.
specify a unique id doe chromoMap plot. default: c("chromap")
specify the region of interest for chromosome(s) for zoom-in. Format: "chrName:Ploidy:Start:Stop"
a boolean to specify whether links are visualized. default: FALSE
a character vector specifying file name or a data.frame for links input data
a boolean to visualize directed edges
adjust the chromosome scale along y-axis
specify the links colors
specify x or horizontal distance of links legend from the origin
specify y or vertical distance of links
specify the factor by which the chr will be scaled;increases number of windows (default:1)
specify the number of ticks for chr scale (default:5)
boolean to include export buttons in the plot
Boolean to specify wether to use fixed window visualization
specify the window size, if fixed.window is TRUE
boolean to display window summary to console
For fixed window analysis, boolean to specify whether to include last window of chromosomes
boolean to display guides
set guides color.
set annotation bar height in 2D-Chromosome plot
boolean to specify visualize 2d Chromosome plot
boolean to show.hide chromosome
shifting the plots in y direction in case hiding chromosomes
specify plot legend labels
specify categorical-data legends label
specify plots y-axis labels
adjust plot y labels in x-direction
adjust plot y labels in y-direction
set size of plot y labels
set the suffix for chromosome scale(default:'bp')
manually set data domain(min,max) for heat colors for numeric data
boolean to enable/disable interactivity on chromosomes
# NOT RUN {
library(chromoMap)
#simple annotations
chromoMap("chromosome_file.txt","annotation_file.txt")
#polyploidy example
chromoMap(c("chromosome_set1.txt","chromosome_set2.txt"),
c("annotation_set1.txt","annotation_set2.txt"), ploidy=2)
#plotting group annotation
chromoMap("chromosome_file.txt","annotation_file.txt",
data_base_color_map=T, data_type="categorical")
#plotting chromsome heatmaps
chromoMap("chromosome_file.txt","annotation_file.txt",
data_based_color_map=T, data_type="numeric")
#enabling hyperlinks
chromoMap("chromosome_file.txt","annotation_file.txt", hlinks=T)
#enabling labels
chromoMap("chromosome_file.txt","annotation_file.txt", labels=T)
#change chromosome color
chromoMap("chromosome_file.txt","annotation_file.txt", chr_color="red")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab