getGenes: label assembled transcripts with gene names

Description Usage Arguments Details Value Author(s) Examples

View source: R/getGenes.R

Description

label assembled transcripts with gene names

Usage

1
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

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

alyssafrazee/ballgown documentation built on Sept. 3, 2021, 7:15 p.m.