Skip to contents

Convert SpliceWiz's EventRegion column to GRanges object.

Usage

event_region_to_granges(event_region, prefix = "")

Arguments

event_region

a character vector denoting eventregion from spliceWiz out. Typically looks like this: "14:65968689-65971731/+"

prefix

a character string denoting a prefix to be added to chromosome names. Default none. Typically the string can be "chr" or "Chr"

Value

an object of class GenomicRanges::GRanges()

Examples

se <- SpliceWiz::SpliceWiz_example_NxtSE(novelSplicing = TRUE)
event_region <- se@elementMetadata$Event1a %>% sample(10)
event_region_to_granges(event_region = event_region)
#> GRanges object with 10 ranges and 1 metadata column:
#>        seqnames      ranges strand |       event_region
#>           <Rle>   <IRanges>  <Rle> |        <character>
#>    [1]     chrZ 64023-66318      - | chrZ:64023-66318/-
#>    [2]     chrZ 95647-96018      - | chrZ:95647-96018/-
#>    [3]     chrZ   8180-9658      - |   chrZ:8180-9658/-
#>    [4]     chrZ 96206-96405      - | chrZ:96206-96405/-
#>    [5]     chrZ   8204-9658      - |   chrZ:8204-9658/-
#>    [6]     chrZ 82618-82734      - | chrZ:82618-82734/-
#>    [7]     chrZ 27163-27999      + | chrZ:27163-27999/+
#>    [8]     chrZ 51041-51331      - | chrZ:51041-51331/-
#>    [9]     chrZ 99196-99654      - | chrZ:99196-99654/-
#>   [10]     chrZ 99196-99654      - | chrZ:99196-99654/-
#>   -------
#>   seqinfo: 1 sequence from an unspecified genome; no seqlengths