Description Usage Arguments Value Author(s)
Plots the exon-intron structure of a set of transcripts. See 'vignette("plPlotTranscripts)'
1 2 3 4 5 6 7 | plPlotTranscripts(gr, title = "", sortBy = c("transcript_type",
"structure"), txData = c("transcript_id", "transcript_type",
"gene_name", "coordinates"), label.field = "transcript_id",
annotations = NULL, maxIntronSize = 50,
plotExonsSeparately = FALSE, space = 10, cdsW = 15, utrW = 10,
intronW = 2, intronColor = "darkgrey", colorBy = NULL,
exonColor = "darkgrey", cdsColor = "black", ...)
|
gr |
a GRanges object imported from a gff file (as done by 'rtracklayer::import.gff'). |
title |
the plot title (default none). |
sortBy |
fields to sort the transcripts (default ‘c(’transcript_type','structure')'). If ‘NULL', the transcripts are not sorted and the order is taken as is. In addition to the columns of 'gr'’s metadata, the following elements can be used: 'start', 'end', 'strand', and 'structure' (structure similarity). |
txData |
the columns of ‘gr'’s metadata that should be displayed as hoverinfo. In addition to the columns of 'gr', coordinates is also available (start-stop and strand). Default transcript id, type, gene name and coordinates. |
label.field |
the column of 'gr' to use as transcript label (default 'transcript_id') |
annotations |
an optional data.frame of annotations to add to the plot. The data.frame should contain the columns 'x' (coordinate, numeric), 'y' (either an integer specifying the transcript, or a character vector specifying transcript ids), and 'text' |
maxIntronSize |
the maximum size (in nt) of introns. Stretches of intron not overlapping any exon will be scaled down to this size if needed. Default 50. If set to NULL, actual genomic coordinates are used. |
plotExonsSeparately |
logical; whether to plot each exon separately (allowing different coloring and hoverinfo) rather than whole transcripts. Default FALSE. the space between transcripts (default 10) |
space |
the space between transcripts (default 10) |
cdsW |
the line width of coding regions (default 15) |
utrW |
the line width of untranslated regions (default 10) |
intronW |
the line width of introns (default 2) |
intronColor |
the color of introns (default darkgrey). Ignored if 'colorBy' is given. |
colorBy |
either the name of a metadata column in 'gr' according to which the transcript colors should be determined, or a named vector of values with transcript ids as names. Default (NULL) uses fixed colors. |
exonColor |
the color of untranslated exonic regions (default darkgrey). Ignored if 'colorBy' is given. |
cdsColor |
the color of coding regions (default black). Ignored if 'colorBy' is given. |
... |
further arguments passed directly to 'add_annotations()' (ignored if 'annotations=NULL') |
a plotly widget.
Pierre-Luc Germain
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.