Description Usage Arguments Value Note See Also Examples
View source: R/parseGffAttributes.R
GFF files contain a string, with key/value pairs separated by “;”, and the key and value separated by “=”. This function parses such strings into a list of vectors with named elements.
1 |
gi |
A |
A list, with one element per row of gi
. Each element is a
character vector with named components. Names correspond to keys, and
components correspond to values.
Key/value pairs which are missing the “=” symbol, or which have
nothing between it and the “;” delimiter or end of line, will
generate a NA
value, with a warning. Any key/value
“pairs” with more than one “=” cause an error.
In many cases, getGffAttribute
, in this package, is
easier and faster. See the function readGff3
for loading a GFF file.
1 2 3 4 5 6 7 8 9 10 11 12 13 | # Get file path
libPath <- installed.packages()["genomeIntervals", "LibPath"]
filePath <- file.path(
libPath,
"genomeIntervals",
"example_files"
)
# Load gff and parse attributes
gff <- readGff3( file.path( filePath, "sgd_simple.gff"), isRightOpen = FALSE )
gfatt <- parseGffAttributes(gff)
head( gfatt )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.