This function plots a given set of aligned chimeric reads along a reference sequence. It plots the breakpoints of translations or
inversions and marks deletions, insertions and mismatches. Optionally, it displays all base pairs in a given region around the breakpoint.
A Breakpoints object containing the consensus breakpoint of all reads and the consensus reference sequence as returned by the methods
detectBreakpoints and mergeBreakpoints. Since only one plot is made, the
function will only work for objects of class Breakpoints having length one.
geneSymbols
Boolean value whether to automatically load and plot the gene symbols from the Ensembl database. Additionally,
geneSymbols can be a vector of two strings for an own annotation.
plotMut
Boolean value whether to mark deletions, insertions and mismatches.
plotBasePairs
Optionally, plotChimericReads displays all base pairs in a given region around the breakpoint (see maxBasePairs).
maxBasePairs
The maximum number of base pairs to be plotted. Only used in conjunction with plotBasePairs=TRUE.
legend
A logical value (TRUE/FALSE) whether to plot a legend that explains the colouration of the insertions, deletions, mismatches and
breakpoints.
title
A title for the plot.
col
A vector of four colours to draw insertions, deletions, mismatches and breakpoints. In this order, the default colours are "red",
"green", "black" and "orange" (use colours() to see a list of possible values).
Details
This method is intended to be run after the pipeline for structural
variant detection. Therefore, see the methods
filterChimericReads, detectBreakpoints and
mergeBreakpoints to correctly preprocess your alignment
before running plotChimericReads.
Note
It is recommended to first create and resize the output device (e.g. the plotting window or a pdf file) before plotting. For example, on Unix
systems you may try X11(width=w, height=h) or pdf(file="plotChimericReads.pdf", width=w, height=h) for some window width w (e.g.
w=12) and window height h (e.g. h=6).
# load breakpoint data containing twelve chimeric reads describing an inversion in chromosome 16
data("breakpoints")
breakpoints
# standard plot
# (only arrangement of reads plotted; breakpoints in orange, deletions
# in red, insertions in green and mismatches in black by default)
plotChimericReads(breakpoints)
# plot base pairs in the breakpoint region (+/- 32bp)
## Not run: plotChimericReads(breakpoints, plotBasePairs=TRUE, maxBasePairs=32)
# use custom colours and display a legend:
# deletions="brown", insertions="blue", mismatches="yellow", breakpoints="gray"
plotChimericReads(breakpoints, col=c("brown", "blue", "yellow", "gray"), legend=TRUE)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(R453Plus1Toolbox)
Loading required package: VariantAnnotation
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
rbind, rownames, sapply, setdiff, sort, table, tapply, union,
unique, unsplit
Loading required package: GenomeInfoDb
Loading required package: stats4
Loading required package: S4Vectors
Attaching package: 'S4Vectors'
The following objects are masked from 'package:base':
colMeans, colSums, expand.grid, rowMeans, rowSums
Loading required package: IRanges
Loading required package: GenomicRanges
Loading required package: SummarizedExperiment
Loading required package: Biobase
Welcome to Bioconductor
Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.
Loading required package: Rsamtools
Loading required package: Biostrings
Loading required package: XVector
Attaching package: 'VariantAnnotation'
The following object is masked from 'package:base':
tabulate
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/R453Plus1Toolbox/plotChimericReads.Rd_%03d_medium.png", width=480, height=480)
> ### Name: plotChimericReads
> ### Title: Plots chimeric reads
> ### Aliases: plotChimericReads
> ### Keywords: plotChimericReads, detectBreakpoints, mergeBreakpoints,
> ### Breakpoints
>
> ### ** Examples
>
> # load breakpoint data containing twelve chimeric reads describing an inversion in chromosome 16
> data("breakpoints")
> breakpoints
Collection of 1 breakpoint:
Size ChrA ChrB
BP1_BP2 12 16 16
>
> # standard plot
> # (only arrangement of reads plotted; breakpoints in orange, deletions
> # in red, insertions in green and mismatches in black by default)
> plotChimericReads(breakpoints)
>
> # plot base pairs in the breakpoint region (+/- 32bp)
> ## Not run: plotChimericReads(breakpoints, plotBasePairs=TRUE, maxBasePairs=32)
>
> # use custom colours and display a legend:
> # deletions="brown", insertions="blue", mismatches="yellow", breakpoints="gray"
> plotChimericReads(breakpoints, col=c("brown", "blue", "yellow", "gray"), legend=TRUE)
>
>
>
>
>
>
> dev.off()
null device
1
>