plotChimericReads: Plots chimeric reads

Description Usage Arguments Details Note Author(s) See Also Examples

Description

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.

Usage

1
2
plotChimericReads(brpData, geneSymbols=FALSE, plotMut=TRUE, plotBasePairs=FALSE, maxBasePairs=50, legend=FALSE, title="", 
    col=c("red", "green", "black", "orange"))

Arguments

brpData

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).

Author(s)

Christoph Bartenhagen

See Also

Breakpoints-class, detectBreakpoints, mergeBreakpoints

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# 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)

R453Plus1Toolbox documentation built on Nov. 8, 2020, 5:59 p.m.