Main Content


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 the Bioinformatics Toolbox™. If the support package is not installed, then the function provides a download link. For details, see Bioinformatics Toolbox Software Support Packages.


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, Cole, Brian A Williams, Geo Pertea, Ali Mortazavi, Gordon Kwan, Marijke J van Baren, Steven L Salzberg, Barbara J Wold, and Lior Pachter. “Transcript Assembly and Quantification by RNA-Seq Reveals Unannotated Transcripts and Isoform Switching during Cell Differentiation.” Nature Biotechnology 28, no. 5 (May 2010): 511–15.

[2] Li, H., B. Handsaker, A. Wysoker, T. Fennell, J. Ruan, N. Homer, G. Marth, G. Abecasis, R. Durbin, and 1000 Genome Project Data Processing Subgroup. “The Sequence Alignment/Map Format and SAMtools.” Bioinformatics 25, no. 16 (August 15, 2009): 2078–79.

Introduced in R2019a