Initialize the circular layout with an ideogram

    cytoband = system.file(package = "circlize", "extdata", "cytoBand.txt"),
    species = NULL,
    sort.chr = TRUE,
    chromosome.index = usable_chromosomes(species), = NULL,
    plotType = c("ideogram", "axis", "labels"),
    track.height = NULL,
    ideogram.height = convert_height(2, "mm"),



A path of the cytoband file or a data frame that already contains cytoband data. By default it is cytoband for hg19. Pass to read.cytoband.


Abbreviations of species. e.g. hg19 for human, mm10 for mouse. If this value is specified, the function will download cytoBand.txt.gz from UCSC website automatically. If there is no cytoband for user's species, it will keep on trying to download chromInfo file. Pass to read.cytoband or read.chromInfo.


subset of chromosomes, also used to reorder chromosomes.


Whether chromosome names should be sorted (first sort by numbers then by letters). If chromosome.index is set, this argumetn is enforced to FALSE

Increment of major ticks. Pass to circos.genomicInitialize.


Which tracks should be drawn. ideogram for ideogram rectangle, axis for genomic axis and labels for chromosome names. If there is no ideogram for specified species, ideogram will be enforced to be excluded. If it is set to NULL, the function just initialize the plot but draw nothing.


Height of the track which contains "axis" and "labels".


Height of the ideogram track


Pass to circos.genomicInitialize.


The function will initialize the circular plot in which each sector corresponds to a chromosome. You can control the order of chromosomes by chromosome.index or by sort.chr, or by setting a special format of cytoband (please refer to read.cytoband to find out how to control a proper cytoband).

The function finally pass data to circos.genomicInitialize to initialize the circular plot.

The style of ideogram is almost fixed, but you can customize it with your self-sefined code. Refer to vignette for demonstration.

See also


# \donttest{ circos.initializeWithIdeogram()
cytoband.file = system.file(package = "circlize", "extdata", "cytoBand.txt") circos.initializeWithIdeogram(cytoband.file)
cytoband.df = read.table(cytoband.file, colClasses = c("character", "numeric", "numeric", "character", "character"), sep = "\t") circos.initializeWithIdeogram(cytoband.df) circos.initializeWithIdeogram(species = "hg18")
circos.initializeWithIdeogram(species = "mm10")
circos.initializeWithIdeogram(chromosome.index = c("chr1", "chr2"))
cytoband = read.table(cytoband.file, colClasses = c("character", "numeric", "numeric", "character", "character"), sep = "\t") circos.initializeWithIdeogram(cytoband, sort.chr = FALSE)
cytoband[[1]] = factor(cytoband[[1]], levels = paste0("chr", c(22:1, "X", "Y"))) circos.initializeWithIdeogram(cytoband, sort.chr = FALSE)
cytoband = read.table(cytoband.file, colClasses = c("character", "numeric", "numeric", "character", "character"), sep = "\t") circos.initializeWithIdeogram(cytoband, sort.chr = TRUE)
circos.initializeWithIdeogram(plotType = c("axis", "labels"))
circos.initializeWithIdeogram(plotType = NULL)
circos.par("" = 90)
#> Warning: '' can only be modified before `circos.initialize`, or #> maybe you forgot to call `circos.clear` in your last plot.
circos.clear() circos.par("" = rep(c(2, 4), 12)) circos.initializeWithIdeogram()