Description Usage Arguments Details Value Author(s) Examples
Merge genomic regions
1 |
gr |
a |
max_gap |
maximum gap to merge, measured in base pairs. Only work if |
gap |
a numeric value means to extend each region by |
add_n_column |
whether to add a column which represents number of regions merged, used internally. |
reduce
only merges regions with fixed gap width, but sometimes it is not reasonable to set gap
to a same width for all regions. Assuming we have a list of differentially methylated regions (DMRs) and we want to reduce
the number of DMRs by merging neighouring DMRs. DMRs distribute differently in different places in the genome, e.g. DMRs are dense
and short in CpG-rich regions (e.g. CpG islands) while long in CpG-sparse regions (e.g. gene bodies and intergenic regions),
thus the merging should be applied based to the width of every DMR itself. reduce2
can merge regions by the width of every region itself.
This type of merging is dynamic because after each iteration of merging, width and number of regions change which results in changing of extension
of some regions. The whole merging will proceed iteratively unless there is no new merging or the gap between regions reaches max_gap
.
If there are numeric meta columns, corresponding values will be summed up for the merged regions. There will
be a new column .__n__.
added which represents number of regions that are merged.
a GRanges
object.
Zuguang Gu <z.gu@dkfz.de>
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.