asGFF {rtracklayer} | R Documentation

## 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)

[Package rtracklayer version 1.42.2 Index]