Plot isoforms, either from a gene or a list of transcript ids.
Arguments
- sce
The
SingleCellExperiment
object containing transcript counts,rowRanges
androwData
withgene_id
andtranscript_id
columns.- gene_id
The gene symbol of interest, ignored if
transcript_ids
is provided.- transcript_ids
The transcript ids to plot.
- n
The number of top isoforms to plot from the gene. Ignored if
transcript_ids
is provided.- format
The format of the output, either "plot_grid" or "list".
- colors
A character vector of colors to use for the isoforms. If not provided, gray will be used. for all isoforms.
Value
When format = "list"
, a list of ggplot
objects is returned.
Otherwise, a grid of the plots is returned.
Details
This function takes a SingleCellExperiment
object and plots the top isoforms of a gene,
or a list of specified transcript ids. Either as a list of plots or together in a grid.
This function wraps the ggbio::geom_alignment
function to plot the isoforms, and orders
the isoforms by expression levels (when specifying a gene) or by the order of the transcript_ids.