genomic_corr_jaccard: Jaccard coefficient between two sets of genomic regions

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

View source: R/genomic_region_correlation.R

Description

Jaccard coefficient between two sets of genomic regions

Usage

1
genomic_corr_jaccard(gr1, gr2, background = NULL)

Arguments

gr1

genomic region 1, a GRanges object

gr2

genomic region 2, a GRanges object

background

background regions that should be only looked in, a GRanges object

Details

Jaccard coefficient is defined as the total length of intersection divided by total length of union of two sets of genomic regions.

You can set the background when calculating Jaccard coefficient. For example, if the interest is the Jaccard coefficient between CpG sites in gr1 and in gr2 background can be set with a GRanges object which contains positions of CpG sites.

Be careful with the strand in your GRanges object!

Value

A single correlation value.

Author(s)

Zuguang Gu <z.gu@dkfz.de>

See Also

genomic_regions_correlation

Examples

1
2
3
gr1 = GRanges(seqnames = "chr1", ranges = IRanges(c(1, 5), c(3, 8)))
gr2 = GRanges(seqnames = "chr1", ranges = IRanges(c(2, 6), c(4, 8)))
genomic_corr_jaccard(gr1, gr2)

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