map_bed | R Documentation |
Map overlapping features in data
onto intervals in scaffold
and apply
statistics and/or summary operations on those features.
map_bed( x, y, operation, max_gap = -1L, min_overlap = 0L, min_overlap_type = c("bp", "frac1", "frac2") )
x |
A |
y |
A |
operation |
List of functions for the statistics and summary operations.
This is similar to |
max_gap |
The largest gap for two intervals to be considered as overlapping. Default is -1 (no gap allowed, adjacent intervals not allowd). |
min_overlap |
See |
min_overlap_type |
|
A mapped GRanges
object.
Manual page of bedtools map
:
https://bedtools.readthedocs.io/en/latest/content/tools/map.html
merge_bed()
, intersect_bed()
GenomicRanges::findOverlaps()
# Load BED tables tbl_x <- read_bed(system.file("extdata", "example_merge.bed", package = "bedtorch")) tbl_y <- read_bed(system.file("extdata", "example_intersect_y.bed", package = "bedtorch")) # Basic usage result <- map_bed(tbl_x, tbl_y, operation = list(score_mean = list(on = "score", func = mean))) head(result) # Perform the mapping, requiring the minimum overlapping of 5bp result <- map_bed(tbl_x, tbl_y, operation = list(score_mean = list(on = "score", func = mean)), min_overlap = 5, min_overlap_type = "bp") head(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.