exportToGtf: Export GRangesList to GTF

Description Usage Arguments Value Author(s) Examples

View source: R/exportToGtf.R

Description

Export the features in a GRangesList generated by getFeatureRanges to a GTF file. The function will represent each row of each of the entries as an "exon", each individual entry as a "transcript", and aggregate all features belonging to the same gene as a "gene" entry in the GTF file.

Usage

1
exportToGtf(grl, filepath)

Arguments

grl

GRangesList object, typically generated by getFeatureRanges

filepath

Path to output GTF file

Value

Does not return anything, generates a GTF file

Author(s)

Charlotte Soneson

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
  ## 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
  )
  
  ## Export GTF
  exportToGtf(grl = grl, filepath = file.path(tempdir(), "exported.gtf"))

eisaR documentation built on Nov. 8, 2020, 8:26 p.m.