ccPlot {circlizePlus} | R Documentation |
Object generator for S4 class ccPlot
Description
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)))
Usage
ccPlot(initMode = "initialize", clear = TRUE, ...)
Arguments
initMode |
It can only be the following values: "initialize", "genomicInitialize", "initializeWithIdeogram", "heatmap.initialize".
|
clear |
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
sectors A factor variable or a character vector which represent data categories
factors The same as sectors . It will be removed in future versions.
x Data on x-axes, a vector
xlim Ranges for values on x-axes, see "details" section for explanation of the format
sector.width Width 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.
ring Whether the sector represented as a ring. If yes, there should only be one sector in the circle.
data A data frame in bed format.
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.
cytoband 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 .
species 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 .
chromosome.index subset of chromosomes, also used to reorder chromosomes.
sort.chr Whether chromosome names should be sorted (first sort by numbers then by letters).
If chromosome.index is set, this argumetn is enforced to FALSE
ideogram.height Height of the ideogram track
mat A matrix or a vector. The vector is transformed as a one-column matrix.
split A categorical variable. It splits the matrix into a list of matrices.
cluster whether 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.method Clustering method, pass to hclust .
distance.method Distance method, pass to dist .
dend.callback A callback function that is applied to the dendrogram in every sector.
cell_width Relative widths of heatmap cells.
|
Value
Object ccPlot
Examples
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)
[Package
circlizePlus version 0.9.1
Index]