Learn R Programming

genomeIntervals (version 1.28.0)

parseGffAttributes: Parse out the gffAttributes column of a Genome\_intervals object

Description

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.

Usage

parseGffAttributes(gi)

Arguments

gi

Value

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.

See Also

In many cases, getGffAttribute, in this package, is easier and faster. See the function readGff3 for loading a GFF file.

Examples

Run this code

# 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 )

Run the code above in your browser using DataLab