getTx2Gene: Generate a transcript-to-gene mapping from a GRangesList

View source: R/getTx2Gene.R

getTx2GeneR 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
   

fmicompbio/eisaR documentation built on Dec. 11, 2024, 1:05 a.m.