shaman_plot_map_score_with_annotations

shaman_plot_map_score_with_annotations(
  genome,
  points_score,
  interval_range,
  point_size = 0.1,
  misha_tracks = list(),
  mt_colors = getOption("shaman.track_colors"),
  mt_ylims = NULL,
  annotations = list(),
  a_colors = getOption("shaman.annotation_colors"),
  add_genes = TRUE,
  add_ideogram = TRUE,
  add_axis = TRUE,
  gene_stacking = "squish",
  gene_size = 0.7,
  track_size = 0.8,
  annotation_size = 0.7,
  fig_fn = "",
  fig_width = 900,
  fig_height = 5/6 * 900
)

Arguments

genome

Name of reference genome (e.g. "hg19", "mm10")

points_score

A dataframe containing the points (start1, start2) and their normalized score.

interval_range

1D interval (chrom, start, end) specifying the region to plot

point_size

Cex size of the points in the plot.

misha_tracks

List of 1D track expressions (virtual tracks also supported) which can be extracted from.

mt_colors

Array of colors, one for each misha_track, which will be used to plot each 1d track.

mt_ylims

Y-axis limits for each misha track. If not provided, generated automatically based on the data to be displayed in the region.

annotations

List of gintervals highlighting annotated regions.

a_colors

Array of colors, one for each annotation set.

add_genes

Boolean flag indicating whether to show gene annotations.

add_ideogram

Boolean flag indicating whether to add a chromosome ideogram.

add_axis

Boolean flag indicating whether to show the chromosomal axis.

gene_stacking

Describes the viewing option of the genes track. Can be either "squish", or "dense".

gene_size

Size of gene annotation view.

track_size

Size of track view.

annotation_size

Size of annotation view.

fig_fn

Name of png file to output to. Empty string will cause the figure to be plotted to the current device.

fig_width

Width in pixels of output png figure.

fig_height

Height in pixels of output png figure.

Value

No return value, called for the plot. Needs the Bioconductor package Gviz.

Details

Plots observed hic contact matrix color-coded by normalized scores, aligned with linear data such as gene annotations, rna, chromatin, transcription factor binding, etc.).

Examples


library(misha)
gsetroot(shaman_get_test_track_db())
points <- gextract("hic_score", gintervals.2d(2, 176.5e06, 177e06, 2, 176.5e06, 177e06),
    colnames = "score"
)
# \donttest{
# loading Gviz takes a few seconds
if (requireNamespace("Gviz", quietly = TRUE)) {
    shaman_plot_map_score_with_annotations("hg19", points, gintervals(2, 176.5e06, 177e06),
        add_genes = FALSE, add_ideogram = FALSE
    )
}

# }
# gene annotations and the ideogram are downloaded from UCSC
if (interactive() && requireNamespace("Gviz", quietly = TRUE)) {
    shaman_plot_map_score_with_annotations("hg19", points, gintervals(2, 176.5e06, 177e06))
}