Skip to contents

Split a region identifier (e.g. "chr1:100-200" or "chr1_100_200") into chromosome, start and end. Non-character or non-scalar input is returned unchanged.

Usage

parseRegion(region)

Arguments

region

A single region string.

Value

A vector/list with the chromosome, start and end, or the input unchanged when it is not a scalar string.

Examples

parseRegion("chr1:1000000-2000000")
#> # A tibble: 1 × 3
#>   chrom   start     end
#>   <chr>   <int>   <int>
#> 1 1     1000000 2000000