Object ccPlot calls one of the following functions based on the value of initMode: circlize::circos.initialize, circlize::circos.genomicInitialize, circlize::circos.initializeWithIdeogram, circlize::circos.heatmap.initialize.
The correct way to call it is as follows:
ccPlot(initMode = 'initialize',clear = TRUE,sectors = NULL,x = NULL,xlim = NULL,sector.width = NULL,factors = sectors,ring = FALSE)
ccPlot(initMode = 'genomicInitialize',clear = TRUE,data=NULL,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,...)
ccPlot(initMode = 'initializeWithIdeogram',clear = TRUE,cytoband = system.file(package = "circlize", "extdata", "cytoBand.txt"),species = NULL,sort.chr = TRUE,chromosome.index = usable_chromosomes(species),major.by = NULL,plotType = c("ideogram", "axis", "labels"),track.height = NULL,ideogram.height = convert_height(2, "mm"),...)
ccPlot(initMode = 'heatmap.initialize',clear = TRUE,mat=NULL, split = NULL, cluster = TRUE,clustering.method = "complete", distance.method = "euclidean",dend.callback = function(dend, m, si) reorder(dend, rowMeans(m)),cell_width = rep(1, nrow(mat)))
ccPlot(initMode = "initialize", clear = TRUE, ...)Object ccPlot
It can only be the following values: "initialize", "genomicInitialize", "initializeWithIdeogram", "heatmap.initialize".
Whether to call circlize::circos.clear before drawing.
Arguments passed on to circlize::circos.initialize, circlize::circos.genomicInitialize, circlize::circos.initializeWithIdeogram, circlize::circos.heatmap.initialize
sectorsA factor variable or a character vector which represent data categories
factorsThe same as sectors. It will be removed in future versions.
xData on x-axes, a vector
xlimRanges for values on x-axes, see "details" section for explanation of the format
sector.widthWidth for each sector. The length of the vector should be either 1 which means
all sectors have same width or as same as the number of sectors. Values for
the vector are relative, and they will be scaled by dividing their summation.
By default, it is NULL which means the width of sectors correspond to the data
range in sectors.
ringWhether the sector represented as a ring. If yes, there should only be one sector in the circle.
dataA data frame in bed format.
sector.namesLabels for each sectors which will be drawn along each sector. It will not modify values of sector index.
major.byIncrement of major ticks. It is calculated automatically if the value is not set (about every 10 degrees there is a major tick).
plotTypeIf 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
tickLabelsStartFromZeroWhether axis tick labels start from 0? This will only affect the axis labels while not affect x-values in cells.
axis.labels.cexThe font size for the axis tick labels.
labels.cexThe font size for the labels.
track.heightIf PlotType is not NULL, height of the annotation track.
cytobandA 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.
speciesAbbreviations 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.
chromosome.indexsubset of chromosomes, also used to reorder chromosomes.
sort.chrWhether chromosome names should be sorted (first sort by numbers then by letters).
If chromosome.index is set, this argumetn is enforced to FALSE
ideogram.heightHeight of the ideogram track
matA matrix or a vector. The vector is transformed as a one-column matrix.
splitA categorical variable. It splits the matrix into a list of matrices.
clusterwhether to apply clustering on rows. The value can also be a dendrogram/hclust object or other objects that can be converted to with as.dendrogram.
clustering.methodClustering method, pass to hclust.
distance.methodDistance method, pass to dist.
dend.callbackA callback function that is applied to the dendrogram in every sector.
cell_widthRelative widths of heatmap cells.
n = 1000
df = data.frame(sectors = sample(letters[1:8], n, replace = TRUE),
x = rnorm(n), y = runif(n))
library(circlizePlus)
cc=ccPlot(initMode = 'initialize', sectors = df$sectors, x = df$x)
Run the code above in your browser using DataLab