Casts genomic regions into GRanges format

cast_granges(regions)

Arguments

regions

GRanges or data.frame; The input regions to cast to GRanges

Value

GRanges object with the input regions

Details

Casts the input as a GRanges object. Input can be GRanges or a data.frame-compatible class that can be cast through as.data.frame(). Input BED format must be chr-start-end for data.frame objects.

Examples

regions = data.table(chr = 'chr1', start = 1, end = 100) cast_granges(regions)
#> GRanges object with 1 range and 0 metadata columns: #> seqnames ranges strand #> <Rle> <IRanges> <Rle> #> [1] chr1 1-100 * #> ------- #> seqinfo: 1 sequence from an unspecified genome; no seqlengths