plot_breakpoints: Function to plot breakpoints of a gene in a sample/cohort

Description Usage Arguments Value Examples

View source: R/plot_breakpoints.R

Description

Function to plot breakpoints of a gene in a sample/cohort

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
plot_breakpoints(
  domainDataFrame = NULL,
  exons,
  geneposition = c("Left", "Right"),
  sampleid = NULL,
  fusionname = NULL,
  leftBreakpoint = NULL,
  rightBreakpoint = NULL,
  base_size = 12
)

Arguments

domainDataFrame

A dataframe from star fusion or arriba standardized to run through the filtering steps and get_Pfam_domain() function to get pfam domain annotation per gene

exons

exon level information from gtf availbale in the package exonsToPlot.RDS

geneposition

Position of gene in the fusion allowed values are Left (Gene1A) or Right (Gene1B)

sampleid

id (if multiple provide a character vector) from Sample column of standardized fusion file format

fusionname

value from FusionName column of standardized fusion file format (Gene1A–Gene1B)

leftBreakpoint

If a specific breakpoint needs to be plotted then provide genomic coordinate as LeftBreakpoint

rightBreakpoint

If a specific breakpoint needs to be plotted then provide genomic coordinate as RightBreakpoint

base_size

base size for text in plot ; default is 12

Value

ggplot of gene and breakpoints

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
27
out_annofuse <- system.file("extdata", "PutativeDriverAnnoFuse.tsv", package = "annoFuseData")
sfc <- read.delim(out_annofuse)
exons <- readRDS(system.file("extdata", "exonsToPlot.RDS", package = "annoFuseData"))
bioMartDataPfam <-
  readRDS(system.file("extdata", "pfamDataBioMart.RDS", package = "annoFuseData"))
domainDataFrame <- get_Pfam_domain(
  standardFusioncalls = sfc,
  bioMartDataPfam = bioMartDataPfam,
  keepPartialAnno = TRUE
)
left <- plot_breakpoints(
  sampleid = "BS_044XZ8ST",
  domainDataFrame = domainDataFrame,
  exons = exons,
  geneposition = "Left",
  fusionname = "ANTXR1--BRAF",
  leftBreakpoint = "2:69193415"
)
right <- plot_breakpoints(
  sampleid = "BS_044XZ8ST",
  domainDataFrame = domainDataFrame,
  exons = exons,
  geneposition = "Right",
  fusionname = "ANTXR1--BRAF",
  rightBreakpoint = "7:140787584"
)
ggpubr::ggarrange(left, right, align = "h")

d3b-center/annoFuse documentation built on March 11, 2021, 9:05 p.m.