Skip to contents

Shift the coordinates of an intervals set to the right.

Usage

gintervals.shift_right(intervals, shift)

Arguments

intervals

An intervals set.

shift

number of bp to shift to the right.

Value

A new intervals set where the coordinates are start + shift and end + shift. Note that the intervals remain bounded by the chromosome boundaries.

Examples

gdb.init_examples()
gintervals(1, 50, 150) %>% gintervals.shift_right(20)
#>   chrom start end
#> 1  chr1    70 170