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

View source: R/plot_breakpoints.R

plot_breakpointsR Documentation

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

Description

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

Usage

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

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 Feb. 21, 2023, 1:06 a.m.