plotVariants: Plot alignments, frequencies and location of target sequence

Description Usage Arguments Value See Also Examples

Description

Combines a plot of transcript structure, alleles aligned with respect to a reference genome and a heatmap of counts or proportions of each allele in a set of data.

Usage

1
2
3
4
5
plotVariants(obj, ...)

## S4 method for signature 'CrisprSet'
plotVariants(obj, ..., txdb = NULL, add.chr = TRUE,
  plotAlignments.args = list(), plotFreqHeatmap.args = list())

Arguments

obj

The object to be plotted

...

extra arguments for plot layout

txdb

GenomicFeatures:TxDb object (default: NULL)

add.chr

If target chromosome does not start with "chr", e.g. "chr5", add the "chr" prefix. (Default:TRUE)

plotAlignments.args

Extra arguments for plotAlignments

plotFreqHeatmap.args

Extra arguments for plotFreqHeatmap

Value

A ggplot2 plot of the variants

See Also

arrangePlots for general layout options and annotateGenePlot for options relating to the transcript plot.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
#Load a CrisprSet object for plotting
data("gol_clutch1")

#Load the transcript db.  This is a subset of the Ensembl Danio Rerio v73 gtf
# for the region 18:4640000-4650000 which includes the targeted gol gene

library(GenomicFeatures)
fn <- system.file("extdata", "Danio_rerio.Zv9.73.gol.sqlite",
                 package = "CrispRVariants")
txdb <- loadDb(fn)

# Plot the variants
p <- plotVariants(gol, txdb = txdb)

#In the above plot, the bottom margin is too large, the legend is
#cut off, and the text within the plots should be larger.
#These issues can be fixed with some adjustments:
p <- plotVariants(gol, txdb = txdb,
                 plotAlignments.args = list(plot.text.size = 4, legend.cols = 2),
                 plotFreqHeatmap.args = list(plot.text.size = 4),
                 left.plot.margin = grid::unit(c(0.1,0,0.5,1), "lines"))

HLindsay/CrispRVariants documentation built on May 28, 2019, 12:40 p.m.