char_to_granges {multicrispr} | R Documentation

## Convert character vector into GRanges

### Description

Convert character vector into GRanges

### Usage

    char_to_granges(x, bsgenome)

### Arguments

`x` | character vector
`bsgenome` | `BSgenome-class`

### Value

`GRanges-class`

### See Also

`bed_to_granges`, `genes_to_granges`

### Examples

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

[Package multicrispr version 1.2.0 Index]