getTx2Gene {eisaR} | R Documentation

## Generate a transcript-to-gene mapping from a GRangesList

### Description

Generate a `data.frame` mapping transcript IDs to gene IDs, based on a GRangesList object generated by `getFeatureRanges`.

### Usage

    getTx2Gene(grl, filepath = NULL)

### Arguments

`grl` | `GRangesList` object, typically generated by `getFeatureRanges`
`filepath` | Either `NULL` or the path to a file where the transcript-to-gene mapping will be written

### Value

Invisibly returns a `data.frame` with the transcript-to-gene mapping.

### Author(s)

Charlotte Soneson

### Examples

      ## Get feature ranges
      grl <- getFeatureRanges(
        gtf = system.file("extdata/small_example.gtf", package = "eisaR"),
        featureType = c("spliced", "intron"),
        intronType = "separate",
        flankLength = 5L,
        joinOverlappingIntrons = FALSE,
        verbose = TRUE
      )

      ## Get transcript-to-gene mapping
      t2g <- getTx2Gene(grl = grl)
      t2g

[Package eisaR version 0.99.11 Index]