example1.Rmd
library(ideogRam)
library(GenomicRanges)
## 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
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)
ideogRam(
organism = "mouse",
orientation = "horizontal",
showBandLabels = TRUE,
chrHeight = 300
)
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",
chromosome = "1",
resolution = 550,
chrHeight = 600,
orientation = "horizontal",
brush = TRUE ## In the new version, we need to give a string
)
ideogRam(
organism = "human",
sex = "female",
chrHeight = 300,
chrWidth = 8,
ploidy = 2
)