plot_fusion_transcripts_graph: Graph plot of possible fusion transcripts.

Description Usage Arguments Value Examples

View source: R/plot_fusion_transcripts_graph.R

Description

This function takes a fusion object and a TranscriptDb object and plots a graph showing the possible fusion transcripts.

Usage

1
2
3
4
5
6
plot_fusion_transcripts_graph(
  fusion,
  edb = NULL,
  which_transcripts = "exonBoundary",
  rankdir = "TB"
)

Arguments

fusion

The Fusion object to plot.

edb

The edb object that will be used to fetch data.

which_transcripts

This character vector decides which transcripts are to be plotted. Can be "exonBoundary", "withinExon", "withinIntron", "intergenic", or a character vector with specific transcript ids. Default value is "exonBoundary".

rankdir

Choose whether the graph should be plotted from left to right ("LR"), or from top to bottom ("TB"). This parameter is given to Rgraphviz::plot().

Value

Creates a fusion transcripts graph plot.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Load data and example fusion event
defuse833ke <- system.file(
  "extdata",
  "defuse_833ke_results.filtered.tsv",
  package="chimeraviz")
fusions <- import_defuse(defuse833ke, "hg19", 1)
fusion <- get_fusion_by_id(fusions, 5267)
# Load edb
edbSqliteFile <- system.file(
  "extdata",
  "Homo_sapiens.GRCh37.74.sqlite",
  package="chimeraviz")
edb <- ensembldb::EnsDb(edbSqliteFile)
# Temporary file to store the plot
pngFilename <- tempfile(
  pattern = "fusionPlot",
  fileext = ".png",
  tmpdir = tempdir())
# Open device
png(pngFilename, width = 500, height = 500)
# Plot!
plot_fusion_transcripts_graph(
  fusion = fusion,
  edb = edb)
# Close device
dev.off()

chimeraviz documentation built on Jan. 19, 2021, 2 a.m.