calcChromBins: Calculates the distribution of a query set over the genome

View source: R/chrom-plots.R

calcChromBinsR Documentation

Calculates the distribution of a query set over the genome

Description

Returns a data.table showing counts of regions from the query that overlap with each bin. In other words, where on which chromosomes are the ranges distributed? You must provide binned regions. Only the midpoint of each query region is used to test for overlap with the bin regions.

Usage

calcChromBins(query, bins)

Arguments

query

A GenomicRanges or GenomicRangesList object with query regions

bins

Pre-computed bins (as a GRangesList object) to aggregate over; for example, these could be genome bins

Value

A data.table showing where on which chromosomes ranges are distributed.

Examples


chromSizes = getChromSizes("hg19")
genomeBins  = getGenomeBins(chromSizes)
chromDistribution = calcChromBins(vistaEnhancers, genomeBins)

vistaSftd = GenomicRanges::shift(vistaEnhancers, 100000)
vistaSftd2 = GenomicRanges::shift(vistaEnhancers, 200000)
calcChromBins(vistaEnhancers, GRangesList(vistaSftd, vistaSftd2))

databio/GenomicDistributions documentation built on April 30, 2024, 4:34 a.m.