Learn R Programming

spliceR (version 1.14.0)

generateGTF: Generate GTF files for transcript visualization in genome browsers

Description

Generate GTF files for transcript visualization in genome browsers.

Usage

generateGTF(transcriptData, filters=NULL, expressionCutoff=0,scoreMethod="local", filePrefix="spliceR_transcripts", shortDescription="SpliceR Transcripts", longDescription="Transcripts generated by SpliceR", useProgressBar=T)

Arguments

transcriptData
A SpliceRList object, created manually from transcript and exon information, or procuced by prepareCuff from CuffLinks data, and optionally processed by spliceR and/or annotatePTC.
filters
Vector, giving the filters that should be applied - any combinations of 'geneOK', 'expressedGenes', 'sigGenes', 'isoOK', 'expressedIso', 'isoClass' and/or 'sigIso'. Works only for data from cufflinks.
expressionCutoff
Numeric, giving the expression threshold (often in FPKM) used for the 'expressedGenes' and 'expressedIso' filter. Default value is 0.
scoreMethod
Character, either of 'local" of 'global', indicating whether to score isoform expression values for GTF color coding based on expression of the isoform in relation to the sample (global) or the gene (local).
filePrefix
Output file name prefix, including path.
shortDescription
A short description for the GTF track.
longDescription
A long description for the GTF track.
useProgressBar
Boolean, indicating whether to use progressbars. For compatibility. Default = TRUE.

Details

generateGTF generates GTF files, one for each sample/condition type, and writes these to disk in the current working directory. If the data was generated using cufflinks and the "source_id" slot of the transcriptData is set to "cufflinks", a number of filters can be applied (see spliceR for a full description of filters). Transcripts will be colored on a grayscale according to the scoreMethod parameter; for "local", the isoform most expressed for a given gene symbol will be darkest; for "global", the color coding will be relative to each transcripts expression across the sample.

References

Vitting-Seerup K, Porse BT, Sandelin A, Waage JE. (2013) spliceR: An R package for classification of alternative splicing and prediction of coding potential from RNA-seq data. PeerJ PrePrints 1:e80v1

Examples

Run this code
#Load cufflinks example data
cuffDB <- prepareCuffExample()

#Generate SpliceRList from cufflinks data
cuffDB_spliceR <- prepareCuff(cuffDB)

#Reduce dataset size for fast example runtime
cuffDB_spliceR[[1]] <- cuffDB_spliceR[[1]][1:500]

#Run spliceR
mySpliceRList <- spliceR(cuffDB_spliceR, compareTo='preTranscript', filters=c('expressedGenes','geneOK', 'isoOK', 'expressedIso', 'isoClass'))

#Export to GTF
generateGTF(mySpliceRList, filters=c("geneOK", "isoOK", "expressedGenes", "expressedIso"), scoreMethod="local")

Run the code above in your browser using DataLab