Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

asGFF

Coerce to GFF structure


Description

Coerce the structure of an object to one following GFF-like conventions, i.e., using the Parent GFF3 attribute to encode the hierarchical structure. This object is then suitable for export as GFF3.

Usage

asGFF(x, ...)
## S4 method for signature 'GRangesList'
asGFF(x, parentType = "mRNA", childType = "exon")

Arguments

x

Generally, a tabular object to structure as GFF(3)

parentType

The value to store in the type column for the top-level (e.g., transcript) ranges.

childType

The value to store in the type column for the child (e.g., exon) ranges.

...

Arguments to pass to methods

Value

For the GRangesList method: A GRanges, with the columns: ID (unique identifier), Name (from names(x), and the names on each element of x, if any), type (as given by parentType and childType), and Parent (to relate each child range to its parent at the top-level).

Author(s)

Michael Lawrence

Examples

## Not run: 
library(TxDb.Hsapiens.UCSC.hg19.knownGene)
exons <- exonsBy(TxDb_Hsapiens_UCSC_hg19_knownGene)
mcols(asGFF(exons))

## End(Not run)

rtracklayer

R interface to genome annotation files and the UCSC genome browser

v1.50.0
Artistic-2.0 + file LICENSE
Authors
Michael Lawrence, Vince Carey, Robert Gentleman
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.