View source: R/viewTranscripts.R
viewTranscripts | R Documentation |
A wrapper around wiggleplotr's plotTranscripts function.
See the documentation for (plotTranscripts
)
for more information.
viewTranscripts(x, ..., rescale_introns = FALSE, ncol = 1)
x |
GRanges object containing transcript annotation in GTF format |
... |
Character value of features to plot. Multiple features can be plotted by entering comma-delimited values. Features will be extracted from metadata gene_name, gene_id and transcript_id of the GTF. Can also be a conditional statement to filter values from variables in the GTF (e.g. gene_name == "Ptbp1") |
rescale_introns |
Specifies if the introns should be scaled to fixed length or not. (default: FALSE) |
ncol |
Number of columns to patch the output plots (default: 1) |
ggplot2 object. If multiple genes are detected, plots will be combined using patchwork
Fursham Hamid
## ---------------------------------------------------------------------
## EXAMPLE USING SAMPLE DATASET
## ---------------------------------------------------------------------
# Load datasets
data(query_gtf, ref_gtf)
viewTranscripts(query_gtf)
viewTranscripts(query_gtf, "transcript1")
viewTranscripts(ref_gtf)
## ---------------------------------------------------------------------
## EXAMPLE USING TRANSCRIPT ANNOTATION
## ---------------------------------------------------------------------
library(AnnotationHub)
## Retrieve GRCm38 trancript annotation
ah <- AnnotationHub()
GRCm38_gtf <- ah[["AH60127"]]
## Plot transcripts from Ptbp1 gene
viewTranscripts(GRCm38_gtf, "Ptbp1")
# Plot transcripts from Ptbp1 and Ptbp2 genes
viewTranscripts(GRCm38_gtf, "Ptbp1", "Ptbp2")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.