Description Usage Arguments Value Examples
View source: R/06_find_spacers.R
Extract subranges from a GRanges-class
object
1 | extract_subranges(gr, ir, plot = FALSE)
|
gr |
|
ir |
|
plot |
TRUE or FALSE (default) |
GRanges-class
.
1 2 3 4 5 6 7 8 | # Extract a subrange
gr <- GenomicRanges::GRanges(c(A = 'chr1:1-100:+', B = 'chr1:1-100:-'))
gr$targetname <- 'AB'
ir <- IRanges::IRanges(c(A = '1-10', A = '11-20', B = '1-10', B = '11-20'))
extract_subranges(gr, ir, plot = TRUE)
# Return empty GRanges for empty IRanges
extract_subranges(GenomicRanges::GRanges('chr1:345-456'), IRanges::IRanges())
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.