plotTranscripts: visualize structure of assembled transcripts

Description Usage Arguments Value Author(s) See Also Examples

View source: R/plotTranscripts.R

Description

visualize structure of assembled transcripts

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
plotTranscripts(
  gene,
  gown,
  samples = NULL,
  colorby = "transcript",
  meas = "FPKM",
  legend = TRUE,
  labelTranscripts = FALSE,
  main = NULL,
  blackBorders = TRUE,
  log = FALSE,
  logbase = 2,
  customCol = NULL,
  customOrder = NULL
)

Arguments

gene

name of gene whose transcripts will be plotted. When using Cufflinks output, usually of the form "XLOC_######"

gown

ballgown object containing experimental and phenotype data

samples

vector of sample(s) to plot. Can be 'none' if only one plot (showing transcript structure in gray) is desired. Use sampleNames(gown) to see sample names for gown. Defaults to sampleNames(gown)[1].

colorby

one of "transcript", "exon", or "none", indicating which feature's abundances should dictate plot coloring. If "none", all transcripts are drawn in gray.

meas

which expression measurement to color features by, if any. Must match an available measurement for whatever feature you're plotting.

legend

if TRUE (as it is by default), a color legend is drawn on top of the plot indicating scales for feature abundances.

labelTranscripts

if TRUE, transcript ids are labeled on the left side of the plot. Default FALSE.

main

optional string giving the desired plot title.

blackBorders

if TRUE, exon borders are drawn in black. Otherwise, they are drawn in the same color as their transcript or exon. Switching blackBorders to FALSE can be useful for visualizing abundances for skinny exons and/or smaller plots, which can be the case when length(samples) is large.

log

if TRUE, color transcripts on the log scale. Default FALSE. To account for expression values of 0, we add 1 to all expression values before taking the log.

logbase

log base to use if log = TRUE. Default 2.

customCol

an optional vector of custom colors to color transcripts by. There must be the same number of colors as transcripts in the gene being plotted.

customOrder

an optional vector of transcript ids (matching ids in texpr(gown, 'all')$t_id), indicating which order transcripts will appear in the plot. All transcripts in gene must appear in the vector exactly once.

Value

produces a plot of the transcript structure for the specified gene in the current graphics device.

Author(s)

Alyssa Frazee

See Also

plotMeans, plotLatentTranscripts

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(bg)

# plot one gene for one sample:
plotTranscripts(gene='XLOC_000454', gown=bg, samples='sample12', meas='FPKM',
    colorby='transcript', 
    main='transcripts from gene XLOC_000454: sample 12, FPKM')

# plot one gene for many samples:
plotTranscripts('XLOC_000454', bg, 
    samples=c('sample01', 'sample06', 'sample12', 'sample19'), 
    meas='FPKM', colorby='transcript')

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