circos.trackPoints: Add points to the plotting regions in a same track

Description Usage Arguments Details References Examples

View source: R/plot.R

Description

Add points to the plotting regions in a same track

Usage

1
2
circos.trackPoints(factors = NULL, x, y, track.index = get.cell.meta.data("track.index"),
    pch = par("pch"), col = par("col"), cex = par("cex"), bg = par("bg"))

Arguments

factors

A factor or a character vector which represents the categories of data

x

Data points on x-axis

y

Data points on y-axis

track.index

Index for the track

pch

Point type

col

Point color

cex

Point size

bg

backgrond color

Details

The function adds points in multiple cells by first splitting data into several parts in which each part corresponds to one factor (sector index) and then adding points in each cell by calling circos.points.

Length of pch, col and cex can be one, length of levels of the factors or length of factors.

This function can be replaced by a for loop containing circos.points.

References

Gu, Z. (2014) circlize implements and enhances circular visualization in R. Bioinformatics.

Examples

1
2
3
4
5
6
circos.initialize(letters[1:8], xlim = c(0, 1))
df = data.frame(fa = sample(letters[1:8], 100, replace = TRUE),
                x = runif(100), y = runif(100))
circos.track(ylim = c(0, 1))
circos.trackPoints(df$fa, x = df$x, y = df$y, pch = 16, col = as.numeric(factor(df$fa)))
circos.clear()

jokergoo/circlize documentation built on Aug. 11, 2019, 11:01 a.m.