This function takes a string of UCSC genome browser coordinates and returns them as a GRanges object.

ucsc_to_granges(coords)

Arguments

coords

A character vector of UCSC genome browser coordinates.

Value

A GRanges object.

See also

Author

Leonardo Collado-Torres, Andrew E Jaffe

Examples

ucsc_coords <- c("chr1:1000-2000")
ucsc_to_granges(ucsc_coords)
#> GRanges object with 1 range and 0 metadata columns:
#>       seqnames    ranges strand
#>          <Rle> <IRanges>  <Rle>
#>   [1]     chr1 1000-2000      *
#>   -------
#>   seqinfo: 1 sequence from an unspecified genome; no seqlengths