double_flank: Double flank

Description Usage Arguments Value Examples

View source: R/05_manipulate_ranges.R

Description

Double flank

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
double_flank(
  gr,
  upstart = -200,
  upend = -1,
  downstart = 1,
  downend = 200,
  strandaware = TRUE,
  plot = FALSE,
  linetype_var = "set",
  ...
)

Arguments

gr

GRanges-class

upstart

upstream flank start in relation to start(gr)

upend

upstream flank end in relation to start(gr)

downstart

downstream flank start in relation to end(gr)

downend

downstream flank end in relation to end(gr)

strandaware

TRUE (default) or FALSE

plot

TRUE or FALSE (default)

linetype_var

gr var mapped to linetype

...

passed to plot_intervals

Value

GRanges-class

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Prime Editing example
#----------------------
    require(magrittr)
    bsgenome <- BSgenome.Hsapiens.UCSC.hg38::BSgenome.Hsapiens.UCSC.hg38  
    gr <- char_to_granges(c(PRNP = 'chr20:4699600:+',             # snp
                            HBB  = 'chr11:5227002:-',             # snp
                            HEXA = 'chr15:72346580-72346583:-',   # del
                            CFTR = 'chr7:117559593-117559595:+'), # ins
                          bsgenome)
    double_flank(gr, -10,  -1, +1, +20, plot = TRUE)
      
# TFBS example
#-------------
    bedfile  <- system.file('extdata/SRF.bed', package='multicrispr')
    gr  <-  bed_to_granges(bedfile, genome = 'mm10', plot = FALSE)
    double_flank(gr, plot = TRUE)

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