Learn R Programming

circlizePlus (version 0.9.0)

ccGenomicPoints: Add points for genomic data visualization

Description

Object ccGenomicCellGeom will call the function circlize::circos.genomicPoints while drawing.

Usage

ccGenomicPoints(
  region = NULL,
  value = NULL,
  numeric.column = NULL,
  posTransform = NULL,
  pch = par("pch"),
  col = par("col"),
  cex = par("cex"),
  bg = par("bg"),
  ...
)

Value

Object ccGenomicCellGeom

Arguments

region

A data frame contains 2 columns which correspond to start positions and end positions.

value

A data frame contains values and other information.

numeric.column

Which column in value data frame should be taken as y-value. If it is not defined, the whole numeric columns in value will be taken.

posTransform

Self-defined function to transform genomic positions, see posTransform.default for explanation

pch

Type of points. Settings are similar as col. Pass to circos.points.

col

Color of points. If there is only one numeric column, the length of col can be either one or number of rows of region. If there are more than one numeric column, the length of col can be either one or number of numeric columns. Pass to circos.points.

cex

Size of points. Settings are similar as col. Pass to circos.points.

bg

Background colors for points.

...

Mysterious parameters.

Examples

Run this code
library(circlizePlus)
data <- generateRandomBed(nr = 30, nc = 2)
all_chr <- c("chr1", "chr2", "chr3", "chr4", "chr5", "chr6", "chr7", "chr8",
"chr9", "chr10", "chr11", "chr12", "chr13", "chr14", "chr15", "chr16",
"chr17", "chr18", "chr19", "chr20", "chr21", "chr22", "chrX", "chrY")
cc <- ccPlot(initMode = "initializeWithIdeogram", plotType = NULL)
t1 <- ccGenomicTrack(data = data, numeric.column = 4)
cells1 <- ccCells(sector.indexes = all_chr) +
ccGenomicPoints(region = \(region, value){
  region
}, value = \(region, value){
  value
}, numeric.column = 2)
t1 <- t1 + cells1
show(cc + t1)

Run the code above in your browser using DataLab