CoordToGR: Converts genomic coordinates into a GRanges object

View source: R/utils.R

CoordToGRR Documentation

Converts genomic coordinates into a GRanges object

Description

This function takes a string vector of genomic coordinates and converts it into a GRanges object.

Usage

CoordToGR(coordinates)

Arguments

coordinates

A string vector of one or more genomic coordinates to be converted

Details

Genomic coordinates can take one of the following syntax:

  • seqnames:start

  • seqnames:start-end

  • seqnames:start-end/strand

The following examples are considered valid genomic coordinates:

  • "chr1:21535"

  • "chr3:10550-10730"

  • "X:51231-51330/-"

  • "chrM:2134-5232/+"

Value

A GRanges object that corresponds to the given coordinates

Examples

se <- NxtIRF_example_NxtSE()

coordinates <- rowData(se)$EventRegion

gr <- CoordToGR(coordinates)

alexchwong/NxtIRFcore documentation built on Oct. 31, 2022, 9:14 a.m.