exportGTF {txcutr} | R Documentation |
Exports a TxDb annotation to a GTF file
exportGTF(txdb, file, source = "txcutr")
txdb |
transcriptome to be output |
file |
a string or |
source |
a string to go in the |
The txdb
argument is invisibly returned.
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)