chromoMap {chromoMap}R Documentation

render interactive chromosome plots of any living organism and annotate elements

Description

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

Usage

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
)

Arguments

ch.files

filename(s) as character vector OR list of data.frames containing co-ordinates of the chromosomes to render

data.files

filename(s) as character vector OR list of data.frames containing data to annotate on the chromosomes.

title

a character string to be used as a title in plot

ch_gap

provide spacing between chromosomes.

ploidy

specify the number of sets of chromsomes being passed.

top_margin

specify the margin from top of the plot

left_margin

specify the margin from the left of the plot

chr_width

specify the width of each chromsome

chr_length

specify the length of each chromsome.

chr_color

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

data_based_color_map

a boolean to tell the plot to use the data provided in file for visualizing annotation

segment_annotation

a boolean to use segment-annotation algorithm

lg_x

specify the x or horizontal distance of the legend from origin(bottom right corner)

lg_y

specify the y or vertical distnce of the legend from the origin

data_type

specifying the data type of the data used. takes value either 'categorical' or 'numeric'

labels

a boolean to include labels in plot

canvas_width

width of the plot

canvas_height

height of the plot

data_colors

specify annotation colors for the data

anno_col

a vector to specify annotation color for each set.

chr_text

a boolean vector to enable or disable chromsome texts for each ploidy.set

discrete.domain

manually specify the order of categories.

legend

a boolean vector to enable or disable legend for each set/ploidy

hlinks

a boolean to use hyperlinks supplied in data

aggregate_func

takes either 'sum' or 'avg' to specift aggregate function for each loci

plots

specify the type of plot to visualize. takes either 'scatter' , 'bar' or 'tags'.(default: 'none')

tag_filter

a list to specify the filter operation and operands for each ploidy.

plot_height

specify plot height for each ploidy. default: c(30)

plot_ticks

specify number of ticks for plot axis. default: c(4)

plot_color

specify the plot color for each ploidy. default: c("blue")

plot_y_domain

specify plot y-axis domain. default: list(c(0,0))

ch2D.colors

specify the group colors for visualizing categories on 2D chromosome plots

ch2D.cat.order

manually setting the order of categories for 2D-Chromsome plot

ch2D.lg_x

specify the x or horizontal distance of 2D plot legend from the origin(bottom right corner)

ch2D.lg_y

specify the y or vertical distance of 2D plot legend

ref_line

a boolean to use horizontal reference line in plot. default: c(FALSE)

refl_pos

specify the position of reference line. default: c(0)

refl_color

specify the color of the reference line. default: c("grey")

refl_stroke_w

specify the stroke width of the reference line. default: c(2)

tagColor

specify the color of tags. default: c("red")

heat_map

a boolean to use if chromosome heatmaps are shown. default: c(TRUE),

text_font_size

specify chromosome text font-size. default: c(10)

chr_curve

specify the chromosome curves at the telomeres or centromere loci. default:5

title_font_size

specify the font-size of the title. default:12

label_font

specify the font-size of the labels. default:9

label_angle

specify the angle of rotation of labels. default: -90

vertical_grid

a boolean to use vertical grid lines. default: FALSE

grid_array

specify the position(s) of grid line(s) in bp to highlight locations across genome. default: c(0,5000,10000)

grid_color

specify the color of the grid lines. default: "grey"

grid_text

specify the text to be attached at the top end of gridlines

grid_text_size

specify the font-size of the text

grid_text_y

specify the y-distance (from top) for the text

plot_filter

a list specify the plot filter operation, operands, and filter-color for each ploidy.

id

specify a unique id doe chromoMap plot. default: c("chromap")

region

specify the region of interest for chromosome(s) for zoom-in. Format: "chrName:Ploidy:Start:Stop"

show.links

a boolean to specify whether links are visualized. default: FALSE

loci_links

a character vector specifying file name or a data.frame for links input data

directed.edges

a boolean to visualize directed edges

y_chr_scale

adjust the chromosome scale along y-axis

links.colors

specify the links colors

links.lg_x

specify x or horizontal distance of links legend from the origin

links.lg_y

specify y or vertical distance of links

n_win.factor

specify the factor by which the chr will be scaled;increases number of windows (default:1)

chr.scale.ticks

specify the number of ticks for chr scale (default:5)

export.options

boolean to include export buttons in the plot

fixed.window

Boolean to specify wether to use fixed window visualization

window.size

specify the window size, if fixed.window is TRUE

win.summary.display

boolean to display window summary to console

remove.last.window

For fixed window analysis, boolean to specify whether to include last window of chromosomes

guides

boolean to display guides

guides_color

set guides color.

ann.h

set annotation bar height in 2D-Chromosome plot

chr.2D.plot

boolean to specify visualize 2d Chromosome plot

display.chr

boolean to show.hide chromosome

plot.shift

shifting the plots in y direction in case hiding chromosomes

plot.legend.labels

specify plot legend labels

cat.legend.label

specify categorical-data legends label

plot.y.labels

specify plots y-axis labels

plot.y.lab.x

adjust plot y labels in x-direction

plot.y.lab.y

adjust plot y labels in y-direction

plot.y.lab.size

set size of plot y labels

scale.suffix

set the suffix for chromosome scale(default:'bp')

numeric.domain

manually set data domain(min,max) for heat colors for numeric data

interactivity

boolean to enable/disable interactivity on chromosomes

Examples

## 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")


## End(Not run)






[Package chromoMap version 4.1.1 Index]