gffToGRanges {genomation} | R Documentation

## Converts a gff formated data.frame into a GenomicRanges object. The GenomicRanges object needs to be properly formated for the function to work.

### Description

Converts a gff formated data.frame into a GenomicRanges object. The GenomicRanges object needs to be properly formated for the function to work.

### Usage

    gffToGRanges(gff.file, filter = NULL, zero.based = FALSE, ensembl = FALSE)

### Arguments

`gff.file` | path to a gff formatted file. The file can end in `.gz`, `.bz2`, `.xz`, or `.zip` and/or start with `http://` or `ftp://`. If the file is not compressed it can also start with `https://` or `ftps://`.
`filter` | a character designating which elements to retain from the gff file (e.g. exon, CDS, ...)
`zero.based` | `boolean` whether the coordinates are 0 or 1 based. 0 is the default
`ensembl` | `boolean` if TRUE, add the chr prefix to seqlevels. FALSE by default

### Value

returns a `GenomicRanges` object

### Examples

    gff.file = system.file('extdata/chr21.refseq.hg19.gtf', package='genomation')
    gff = gffToGRanges(gff.file)

[Package genomation version 1.16.0 Index]