genomicDensity: Calculate genomic region density

Description Usage Arguments Details Value References Examples

Description

Calculate genomic region density

Usage

1
genomicDensity(region, window.size = 1e7, n.window = NULL, overlap = TRUE)

Arguments

region

Genomic positions. It can be a data frame with two columns which are start positions and end positions on a single chromosome. It can also be a bed-format data frame which contains the chromosome column.

window.size

Window size to calculate genomic density

n.window

number of windows, if it is specified, window.size is ignored

overlap

Whether two neighbouring windows have half overlap

Details

It calculate the percent of each genomic windows that is covered by the input regions.

Value

If the input is a two-column data frame, the function returns a data frame with three columns: start position, end position and percent of overlapping. And if the input is a bed-format data frame, there will be an additionally chromosome name column.

References

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

Examples

1
2
3
bed = generateRandomBed()
bed = subset(bed, chr == "chr1")
head(genomicDensity(bed))

eilslabs/circlize documentation built on May 16, 2019, 1:23 a.m.