Convert GTF files to SAM files



cuffgtf2sam(input,output) converts the assembled transcripts in the GTF file input to the SAM-format file output [1].

cuffgtf2sam requires the Cufflinks Support Package for Bioinformatics Toolbox™. If the support package is not installed, then the function provides a download link.


cuffgtf2sam is supported on the Mac and UNIX® platforms only.

cuffgtf2sam(input,output,Name,Value) uses additional options specified by one or more name-value pair arguments. For example, gtf2sam('hum37_2_1M.gtf','hum37_2_1M.sam','UseFPKM',true) inserts the FPKM value into the SAM records.


collapse all

Convert a GTF file to a SAM file.


Input Arguments

collapse all

Names of input files, specified as a string, character vector, string vector, or cell array of character vectors.

Example: 'gyrAB.gtf'

Data Types: cell | char | string

Output SAM file name, specified as a string or character vector.

Example: 'gyrAB.sam'

Data Types: char | string

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: gtf2sam('hum37_2_1M.gtf','hum37_2_1M.sam','UseFPKM',true)

Name of a reference FASTA file, specified as a string or character vector. If you specify a FASTA file, the function recreates the sequences of transcripts by comparing to the reference sequences in the provided FASTA file. If you do not specify 'ReferenceFASTA', the function omits the sequence information from the output SAM file.

Example: 'ReferenceFASTA',"ref.fasta"

Data Types: char | string

Flag to insert the FPKM value into the SAM records instead of the isoform fraction, specified as true or false.

Example: 'UseFPKM',true

Data Types: logical


[1] Trapnell, C., B. Williams, G. Pertea, A. Mortazavi, G. Kwan, J. van Baren, S. Salzberg, B. Wold, and L. Pachter. 2010. Transcript assembly and quantification by RNA-Seq reveals unannotated transcripts and isoform switching during cell differentiation. Nature Biotechnology. 28:511–515.

[2] Li, H., B. Handsaker, A. Wysoker, T. Fennell, J. Ruan, N. Homer, G. Marth, A. Goncalo, and R. Durbin. 2009. The Sequence Alignment/Map format and SAMtools. Bioinformatics 25(16): 2078–2079.

Introduced in R2019a