getGenes {ballgown} | R Documentation

## label assembled transcripts with gene names

### Description

label assembled transcripts with gene names

### Usage

    getGenes(gtf, assembled, UCSC = TRUE, attribute = "gene_id")

### Arguments

`gtf` | path to a GTF file containing locations of annotated transcripts
`assembled` | GRangesList object, with each set of ranges representing exons of an assembled transcript.
`UCSC` | set to `TRUE` if you're using a UCSC gtf file. (Requires some extra text processing).
`attribute` | set to attribute name in `gtf` that gives desired gene identifiers. Default `"gene_id"`; another commone one is `"gene_name"` (for the gene symbol).

### Details

chromosome labels in `gtf` and `assembled` should match. (i.e., you should provide the path to a gtf corrsponding to the same annotation you used when constructing `assembled`)

### Value

an `IRanges CharacterList` of the same length as `assembled`, providing the name(s) of the gene(s) that overlaps each transcript in `assembled`.

### Author(s)

Alyssa Frazee, Andrew Jaffe

### Examples

    data(bg)
    gtfPath = system.file('extdata', 'annot.gtf.gz', package='ballgown')
    geneoverlaps = getGenes(gtfPath, structure(bg)$trans, UCSC=FALSE)

[Package ballgown version 2.20.0 Index]