This function parses a simple "Gene Transfer Format" (GTF2.2) into a data.frame, as distributed by the UCSC Table Browser.
As this format is an extension of the "Gene Feature Format" (GFF3), some retro-compatibility can be expected but not guaranteed.
read.gtf(file, attr = c("split", "intact", "skip"), features = NULL, quiet = FALSE)
A data.frame
with the standard GTF2 columns. The "strand" column is converted to factor
, "?" are turned to NA
and "." are kept for features where stranding is not relevant (See the GFF3 specification).
Single character value, the path and name of the GTF2 file to parse (possibly gzipped).
Single character value, defining how to deal with attributes. "skip" discards the attributes data, "intact" does not process it and "split" adds a column for each attribute (identified by their names).
Character vector, if not NULL
only rows with a "feature" column value from this list will be kept.
Single logical value, whether to send diagnostic messages or not.
Sylvain Mareschal
GTF2.2 specification : http://mblab.wustl.edu/GTF22.html
GFF3 Sequence Ontology specification : http://www.sequenceontology.org/gff3.shtml
track.table.GTF