Calculate Jaccard distance between two BED-like data sets
jaccard_bed( x, y, min_overlap = 1, min_overlap_type = c("bp", "frac1", "frac2") )
x | A |
---|---|
y | A |
min_overlap | The smallest overlapping region for two intervals to be considered as overlapping. Default is 1. |
min_overlap_type | A character value indicating how |
The Jaccard statistics.
Manual page of bedtools jaccard
:
https://bedtools.readthedocs.io/en/latest/content/tools/jaccard.html
# Load BED tables x <- read_bed(system.file("extdata", "example_merge.bed", package = "bedtorch"), use_gr = FALSE) y <- read_bed(system.file("extdata", "example_intersect_y.bed", package = "bedtorch"), use_gr = FALSE) # Basic usages result <- jaccard_bed(x, y) head(result) #> intersection union jaccard n_intersections #> 1: 33 94 0.3510638 8