Resize GenomicRanges upstream and or downstream. From https://support.bioconductor.org/p/78652/

Extend(x, upstream = 0, downstream = 0, from.midpoint = FALSE)

Arguments

x

A range

upstream

Length to extend upstream

downstream

Length to extend downstream

from.midpoint

Count bases from region midpoint, rather than the 5' or 3' end for upstream and downstream respectively.

Value

Returns a GRanges object

Examples

Extend(x = blacklist_hg19, upstream = 100, downstream = 100)
#> Warning: '*' ranges were treated as '+'
#> GRanges object with 834 ranges and 1 metadata column:
#>         seqnames              ranges strand |             reason
#>            <Rle>           <IRanges>  <Rle> |        <character>
#>     [1]    chr10   38726100-42489200      * | High Signal Region
#>     [2]    chr10   42524800-42819300      * | High Signal Region
#>     [3]    chr10   98560300-98562600      * | High Signal Region
#>     [4]    chr10 135437500-135534800      * | High Signal Region
#>     [5]    chr11         -100-196400      * | High Signal Region
#>     ...      ...                 ...    ... .                ...
#>   [830]     chrX 154528800-154616400      * | High Signal Region
#>   [831]     chrX 155038400-155270600      * | High Signal Region
#>   [832]     chrY    7432600-13491100      * | High Signal Region
#>   [833]     chrY   13633300-14289100      * | High Signal Region
#>   [834]     chrY   28783300-59373600      * | High Signal Region
#>   -------
#>   seqinfo: 24 sequences from an unspecified genome; no seqlengths