| read.gtf {Rgb} | R Documentation |
Parses a GTF2 file
Description
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.
Usage
read.gtf(file, attr = c("split", "intact", "skip"), features = NULL, quiet = FALSE)
Arguments
file |
Single character value, the path and name of the GTF2 file to parse (possibly gzipped). |
attr |
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). |
features |
Character vector, if not |
quiet |
Single logical value, whether to send diagnostic messages or not. |
Value
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).
Note
Currently not implemented :
FASTA section and sequences (error raising)
Special character escaping (error raising)
Attribute quotes (kept)
Sections (all data pooled)
Meta data (ignored)
Author(s)
Sylvain Mareschal
References
GTF2.2 specification : http://mblab.wustl.edu/GTF22.html
GFF3 Sequence Ontology specification : http://www.sequenceontology.org/gff3.shtml