gr.trim | R Documentation |
GRanges
relative to the specified <local> coordinates of each rangeExample: GRanges
with genomic coordinates 1:1,000,000-1,001,000 can get the first 20 and last 50 bases trimmed off with
start = 20, end = 950
.
if end is larger than the width of the corresponding gr, then the corresponding output will only have end(gr)
as its coordinate.
This is a role not currently provided by the standard GenomicRanges
functions
(e.g. shift
, reduce
, restrict
, shift
, resize
, flank
)
gr.trim(gr, starts = 1, ends = 1)
gr |
|
starts |
integer Beginning of interval trimmed; Number of bases to trim off of the front |
ends |
integer End of interval trimmed |
GRanges with trimmed intervals relative to the specified <local> coordinates of each range
## trim the first 20 and last 50 bases
gr.trim(GRanges(1, IRanges(1e6, width=1000)), starts=20, ends=950)
## return value: GRanges on 1:1,000,019-1,000,949
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.