char_to_granges: Convert character vector into GRanges

Description Usage Arguments Value See Also Examples

View source: R/04_bed_to_granges.R

Description

Convert character vector into GRanges

Usage

1
char_to_granges(x, bsgenome)

Arguments

x

character vector

bsgenome

BSgenome-class

Value

GRanges-class

See Also

bed_to_granges, genes_to_granges

Examples

1
2
3
4
5
6
7
8
require(magrittr)
bsgenome <- BSgenome.Hsapiens.UCSC.hg38::BSgenome.Hsapiens.UCSC.hg38  
x <- c(PRNP  = 'chr20:4699600:+',            # snp
       HBB  = 'chr11:5227002:-',            # snp
       HEXA = 'chr15:72346580-72346583:-',  # del
       CFTR = 'chr7:117559593-117559595:+') # ins
gr <- char_to_granges(x, bsgenome)
plot_intervals(gr, facet_var = c('targetname', 'seqnames'))

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