Usage
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.