Learn R Programming

circlize (version 0.4.10)

circos.genomicInitialize: Initialize circular plot with any genomic data

Description

Initialize circular plot with any genomic data

Usage

circos.genomicInitialize(
    data,
    sector.names = NULL,
    major.by = NULL,
    plotType = c("axis", "labels"),
    tickLabelsStartFromZero = TRUE,
    axis.labels.cex = 0.4*par("cex"),
    labels.cex = 0.8*par("cex"),
    track.height = NULL,
    ...)

Arguments

data

A data frame containing genomic data.

sector.names

Labels for each sectors which will be drawn along each sector. It will not modify values of sector index.

major.by

Increment of major ticks. It is calculated automatically if the value is not set (about every 10 degrees there is a major tick).

plotType

If it is not NULL, there will create a new track containing axis and names for sectors. This argument controls which part should be drawn, axis for genomic axis and labels for chromosome names

tickLabelsStartFromZero

Whether axis tick labels start from 0? This will only affect the axis labels while not affect x-values in cells.

axis.labels.cex

the font size for the axis tick labels.

labels.cex

the font size for the labels.

track.height

If PlotType is not NULL, height of the annotation track.

Details

The function will initialize circular plot from genomic data. If plotType is set with value in axis or labels, there will create a new track.

The order of sectors related to data structure of data. If the first column in data is a factor, the order of sectors is levels(data[[1]]); If the first column is just a simple vector, the order of sectors is unique(data[[1]].

For more details on initializing genomic plot, please refer to the vignettes.

See Also

https://jokergoo.github.io/circlize_book/book/initialize-genomic-plot.html#initialize-with-general-genomic-category

Examples

Run this code
# NOT RUN {
df = read.cytoband()$df
circos.genomicInitialize(df)

df = data.frame(name = c("TP53", "TP63", "TP73"),
                start = c(7565097, 189349205, 3569084),
                end = c(7590856, 189615068, 3652765),
                stringsAsFactors = FALSE)
circos.genomicInitialize(df)
circos.clear()

circos.genomicInitialize(df, major.by = 10000)
circos.clear()

circos.genomicInitialize(df, plotType = "labels")
circos.clear()

circos.genomicInitialize(df, sector.names = c("tp53", "tp63", "tp73"))
circos.clear()

circos.genomicInitialize(df, sector.names = c("tp53x", "tp63x", "tp73"))
circos.clear()

df[[1]] = factor(df[[1]], levels = c("TP73", "TP63", "TP53"))
circos.genomicInitialize(df)
circos.clear()
# }

Run the code above in your browser using DataLab