extract_subranges: Extract subranges

Description Usage Arguments Value Examples

View source: R/06_find_spacers.R

Description

Extract subranges from a GRanges-class object

Usage

1

Arguments

gr

GRanges-class

ir

IRanges-class: subranges to be extracted

plot

TRUE or FALSE (default)

Value

GRanges-class.

Examples

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())

multicrispr documentation built on Nov. 8, 2020, 5:10 p.m.