parse text like "chr13:99,443,451-99,848,821:-" into GRanges

parse2GRanges(text)

Arguments

text

character vector like "chr13:99,443,451-99,848,821:-" or "chr13:99,443,451-99,848,821"

Value

an object of GRanges

Examples

parse2GRanges("chr13:99,443,451-99,848,821:-")
#> GRanges object with 1 range and 0 metadata columns:
#>       seqnames            ranges strand
#>          <Rle>         <IRanges>  <Rle>
#>   [1]    chr13 99443451-99848821      -
#>   -------
#>   seqinfo: 1 sequence from an unspecified genome; no seqlengths