tGene: Connect a transcript to its gene

Description Usage Arguments Examples

View source: R/tGene.R

Description

find the gene to which a transcript belongs

Usage

1
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

1
2
3
4
  data(bg)
  tGene(bg, 10)
  tGene(bg, 'TCONS_00000010', tid=FALSE)
  tGene(bg, 10, gid=FALSE) #empty: no gene names included in bg.

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