Learn R Programming

ballgown (version 2.4.2)

tGene: Connect a transcript to its gene

Description

find the gene to which a transcript belongs

Usage

tGene(bg, transcript, tid = TRUE, gid = TRUE, warnme = TRUE)

Arguments

bg
ballgown object
transcript
transcript identifier
tid
set to TRUE if transcript is a numeric transcript identifier (i.e., t_id in expression tables), or FALSE if transcript is a named identifie (e.g., TCONS_000001 or similar.
gid
if FALSE, return the gene *name* associated with transcript in bg instead of the gene *id*, which is returned by default. Take care to remember that not all ballgown objects include gene *name* information. (They do all include gene IDs).
warnme
if TRUE, and if gid is FALSE, print a warning if no gene name is available for the transcript. This could either mean the transcript didn't overlap an annotated gene, or that no gene names were included when bg was created.

Examples

Run this code
  data(bg)
  tGene(bg, 10)
  tGene(bg, 'TCONS_00000010', tid=FALSE)
  tGene(bg, 10, gid=FALSE) #empty: no gene names included in bg.

Run the code above in your browser using DataLab