getAttributeField {ballgown} | R Documentation

## extract a specific field of the "attributes" column of a data frame created from a GTF/GFF file

### Description

extract a specific field of the "attributes" column of a data frame created from a GTF/GFF file

### Usage

    getAttributeField(x, field, attrsep = "; ")

### Arguments

`x` | vector representing the "attributes" column of GTF/GFF file
`field` | name of the field you want to extract from the "attributes" column
`attrsep` | separator for the fields in the attributes column. Defaults to '; ', the separator for GTF files outputted by Cufflinks.

### Value

vector of nucleotide positions included in the transcript

### Author(s)

Wolfgang Huber, in the `davidTiling` R package (LGPL license)

### See Also

`gffRead` for creating a data frame from a GTF/GFF file, and http://useast.ensembl.org/info/website/upload/gff.html for specifics of the GFF/GTF file format.

### Examples

    gtfPath = system.file('extdata', 'annot.gtf.gz', package='ballgown')
    gffdata = gffRead(gtfPath)
    gffdata$transcriptID = getAttributeField(gffdata$attributes,
      field = "transcript_id")

[Package ballgown version 2.12.0 Index]