gff_get_attribute: Parse gff field

Description Usage Arguments Value Details Examples

Description

This function allows you to parse the complex 'attributes' column of a gff file and get only feature names or IDs, for example. Adapted from function in the davidTiling experimental package. Also posted on the Bioconductor support system here.

Usage

1
gff_get_attribute(gffColumn, field, attrSep = ";")

Arguments

gffColumn

The column of the Gff file to parse, typically 'attributes'. No default.

field

A string representing the field with the value you want (formatted as field = value;). No default.

attrSep

A string representing the field separator (; in the standard gff format). Defaults to ;.

Value

A vector containing the specified field values of the same size as the number of features in the gff file.

Details

Typical use of this function will include first using gff_read, also in this package, to load gff file and then parsing the attributes field. See examples below.

Examples

1
2
3
4
5
6
7
8
## Not run: 
gff_read(s288C_annotation_R64_modified.gff)

gff_get_attribute(gff$attributes, 'Name')

gff_get_attribute(gff$attributes, 'ID')

## End(Not run)

luisvalesilva/hwglabr documentation built on May 21, 2019, 8:56 a.m.