## Loading required package: stats4
## Loading required package: BiocGenerics
## 
## Attaching package: 'BiocGenerics'
## The following objects are masked from 'package:stats':
## 
##     IQR, mad, sd, var, xtabs
## The following objects are masked from 'package:base':
## 
##     anyDuplicated, append, as.data.frame, basename, cbind, colnames,
##     dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
##     grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
##     order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
##     rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
##     union, unique, unsplit, which.max, which.min
## Loading required package: S4Vectors
## 
## Attaching package: 'S4Vectors'
## The following objects are masked from 'package:base':
## 
##     expand.grid, I, unname
## Loading required package: IRanges
## Loading required package: GenomeInfoDb

Human

A human genome is depicted below. The grey and black bands in each chromosome represent heterochromatin. The pink region is the area around the centromere, and the blue represents variable regions.

ideogRam(organism = "human", chrHeight = 500)

Mouse

ideogRam(
    organism = "mouse",
    orientation = "horizontal",
    showBandLabels = TRUE,
    chrHeight = 300
)

Annotations, basic

The location of BRCA1 is depicted here in red.

brca1 <- GRanges('17', IRanges(43044294, 43125482), name = "BRCA1")
# This seems a bug, as it shows chromosomes 1, 7 and 17.
ideogRam(organism = "human") %>%
    set_option(chromosomes = '17', chrHeight = 600, orientation = "horizontal") %>%
    set_option(showAnnotTooltip = TRUE) %>%
    add_track(brca1)

Annotations, overlaid

Large-scale structural variations (SVs) can be depicted using colored overlays, as seen below.

ten_virtual_cnvs <- ideogRam:::sample_10_virtual_cnvs()
ten_virtual_cnvs
## GRanges object with 10 ranges and 2 metadata columns:
##        seqnames              ranges strand |             name
##           <Rle>           <IRanges>  <Rle> |      <character>
##    [1]        1   30000000-35999999      * |         virtual1
##    [2]        1   40000000-44999999      * |         virtual2
##    [3]        2   40738282-57863820      * |        nsv531656
##    [4]        2   30000000-38999999      * |                2
##    [5]       20   30954171-30959986      * |    observation 1
##    [6]        3   30000000-38999999      * |                 
##    [7]        3   33000000-35999999      * |         virtual3
##    [8]        9 120000000-128999999      * | a duplicate name
##    [9]        9   12000000-23999999      * | a duplicate name
##   [10]        X   47422351-47429070      * |    observation 2
##                        color
##                  <character>
##    [1] rgba(255, 0, 0, 0.65)
##    [2] rgba(0, 255, 0, 0.65)
##    [3] rgba(255, 0, 0, 0.65)
##    [4] rgba(255, 0, 0, 0.65)
##    [5] rgba(255, 0, 0, 0.65)
##    [6] rgba(0, 255, 0, 0.65)
##    [7] rgba(255, 0, 0, 0.65)
##    [8] rgba(0, 255, 0, 0.65)
##    [9] rgba(255, 0, 0, 0.65)
##   [10] rgba(0, 0, 255, 0.65)
##   -------
##   seqinfo: 6 sequences from an unspecified genome; no seqlengths
ideogRam(organism = "human") %>%
    set_option(chrHeight = 300, chrMargin = 2, annotationsLayout = "overlay",
               orientation = "horizontal") %>%
    add_track(ten_virtual_cnvs)

Annotations, tracks

Layout, small

ideogRam(organism = "human", orientation = "vertical", rows = 2) %>%
    set_option(resolution = 550, chrHeight = 150, rotatable = FALSE)

Brush

ideogRam(
    organism = "human",
    chromosome = "1",
    resolution = 550,
    chrHeight = 600,
    orientation = "horizontal",
    brush = TRUE  ## In the new version, we need to give a string
)

Ploidy, basic

ideogRam(
    organism = "human",
    sex = "female",
    chrHeight = 300,
    chrWidth = 8,
    ploidy = 2
)