exportFASTA {txcutr} | R Documentation |
Export Transcriptome as FASTA
exportFASTA(txdb, genome, file, ...)
txdb |
a |
genome |
a |
file |
a string for output FASTA file. File names ending in ".gz" will automatically use gzip compression. |
... |
additional arguments to pass through to
|
The txdb
argument is invisibly returned.
library(TxDb.Scerevisiae.UCSC.sacCer3.sgdGene) library(BSgenome.Scerevisiae.UCSC.sacCer3) ## load annotation and genome txdb <- TxDb.Scerevisiae.UCSC.sacCer3.sgdGene sacCer3 <- BSgenome.Scerevisiae.UCSC.sacCer3 ## restrict to 'chrI' transcripts (makes for briefer example runtime) seqlevels(txdb) <- c("chrI") ## last 500 nts per tx txdb_w500 <- truncateTxome(txdb) ## export uncompressed outfile <- tempfile("sacCer3.sgdGene.w500", fileext=".fa") exportFASTA(txdb_w500, sacCer3, outfile) ## export compressed outfile <- tempfile("sacCer3.sgdGene.w500", fileext=".fa.gz") exportFASTA(txdb_w500, sacCer3, outfile)