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 = 500,
  canvas_height = 520,
  data_colors = list(),
  anno_col = c("#10B85F"),
  chr_text = c(TRUE),
  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)),
  scatter.colors = NULL,
  scatter.lg_x = 0,
  scatter.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
)

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

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

scatter.colors

specify the group colors for visualizing categories on scatter plot

scatter.lg_x

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

scatter.lg_y

specify the y or vertical distance of scatter 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

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 0.3.1 Index]