common_regions: Find common genomic regions across samples

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/genomic_region_subgroup_specificity.R

Description

Find common genomic regions across samples

Usage

1
2
common_regions(gr_list, min_recurrency = floor(length(gr_list)/4),
    gap = bp(1000), max_gap = Inf, min_width = 0)

Arguments

gr_list

a list of GRanges

min_recurrency

minimal cross-sample recurrency at each base for the common regions

gap

gap to merge common regions, pass to reduce2

max_gap

maximum gap for merging common regions, pass to reduce2

min_width

minimal width for the common regions. It can be used to remove a lot of very short regions.

Details

A common region is defined as a region which is recurrent in at least k samples. The process of finding common regions are as follows:

Please note in each sample, regions should not be overlapped.

Value

A GRanges object contains coordinates of common regions. The columns in meta data are percent of the common region which is covered by regions in every sample.

Author(s)

Zuguang Gu <z.gu@dkfz.de>

See Also

The returned variable can be sent to subgroup_specific_genomic_regions to find subgroup specific regions.

Examples

1
2
3
4
5
6
7
8
9
gr_list = list(
    gr1 = GRanges(seqnames = "chr1", ranges = IRanges(1, 8)),
    gr2 = GRanges(seqnames = "chr1", ranges = IRanges(3, 9)),
    gr3 = GRanges(seqnames = "chr1", ranges = IRanges(2, 7)),
    gr4 = GRanges(seqnames = "chr1", ranges = IRanges(c(1, 6), c(4, 10))),
    gr5 = GRanges(seqnames = "chr1", ranges = IRanges(c(1, 9), c(3, 10)))
)
common_regions(gr_list, min_recurrency = 4, gap = bp(1))
common_regions(gr_list, min_recurrency = 4, gap = 0.5)

jokergoo/epik documentation built on Sept. 28, 2019, 9:20 a.m.