tGene {ballgown} | R Documentation

## 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

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

[Package ballgown version 2.12.0 Index]