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

Description Usage Arguments Value Note See Also Examples

View source: R/parseGffAttributes.R

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

1

Arguments

gi

A Genome_intervals object.

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.

Note

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.

See Also

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

Examples

 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 )

genomeIntervals documentation built on Nov. 8, 2020, 4:56 p.m.