Convert genomic regions in a data frame to GRanges format

RegionsToRanges(regionName_char)

Arguments

regionName_char

a character vector of regions in the format "chrxx:xxxxxx-xxxxxx"

Value

genomic regions in GRanges format

Examples

 regions <- c("chr22:19709548-19709755", "chr2:241721922-241722113")
 RegionsToRanges(regions)
#> GRanges object with 2 ranges and 0 metadata columns:
#>       seqnames              ranges strand
#>          <Rle>           <IRanges>  <Rle>
#>   [1]    chr22   19709548-19709755      *
#>   [2]     chr2 241721922-241722113      *
#>   -------
#>   seqinfo: 2 sequences from an unspecified genome; no seqlengths