exportGTF {txcutr}R Documentation

Export GTF

Description

Exports a TxDb annotation to a GTF file

Usage

exportGTF(txdb, file, source = "txcutr")

Arguments

txdb

transcriptome to be output

file

a string or connection to output GTF file. Automatically recognizes strings ending with ".gz" for zipped output.

source

a string to go in the source column

Value

The txdb argument is invisibly returned.

Examples

library(TxDb.Scerevisiae.UCSC.sacCer3.sgdGene)

## load annotation
txdb <- TxDb.Scerevisiae.UCSC.sacCer3.sgdGene

## restrict to 'chrI' transcripts
seqlevels(txdb) <- c("chrI")

## last 500 nts per tx
txdb_w500 <- truncateTxome(txdb)

## export uncompressed
outfile <- tempfile("sacCer3.sgdGene.w500", fileext=".gtf")
exportGTF(txdb_w500, outfile)

## export compressed
outfile <- tempfile("sacCer3.sgdGene.w500", fileext=".gtf.gz")
exportGTF(txdb_w500, outfile)


[Package txcutr version 1.0.0 Index]