The crisprViz
package enables the graphical interpretation of GuideSet
objects from the crisprDesign package by plotting guide RNA (gRNA)
cutting locations against their target gene or other genomic region.
This vignette walks through several use cases that demonstrate the range of
and how to use plotting functions in the crisprViz
package. This vignette
also uses our core gRNA design package crisprDesignto manipulate GuideSet
objects in
conjunction with plotting in the process of gRNA design.
Visit our crisprVerse tutorial page to learn more about how to design gRNAs for different applications.
This package is supported for macOS, Linux and Windows machines. Packages were developed and tested on R version 4.2.
crisprViz
can be installed from Bioconductor using the following
commands in a fresh R session:
install.packages("BiocManager")
BiocManager::install("crisprViz")
All examples in this vignette will use human genome assembly hg38
from
the BSgenome.Hsapiens.UCSC.hg38
package and gene model coordinates from
Ensembl release 104. We begin by loading the necessary packages.
library(BSgenome.Hsapiens.UCSC.hg38)
library(crisprDesign)
library(crisprViz)
Suppose we want to design the four best gRNAs using the SpCas9 CRISPR nuclease to knockout the human KRAS gene. To have the greatest impact on gene function we want to prioritize gRNAs that have greater isoform coverage, and target closer to the 5’ end of the CDS.
Let’s load a precomputed GuideSet
object containing all possible gRNAs
targeting the the CDS of KRAS, and a GRangesList
object describing the
gene model for KRAS.
data("krasGuideSet", package="crisprViz")
data("krasGeneModel", package="crisprViz")
length(krasGuideSet) # number of candidate gRNAs
## [1] 52
For how to design such gRNAs, see the crisprDesign
package. Before
we plot all of our candidate gRNAs, let’s first generate a simple plot
with a few gRNAs to familiarize ourselves with some plot components and options.
plotGuideSet(krasGuideSet[1:4],
geneModel=krasGeneModel,
targetGene="KRAS")
There are a few things to note here.
targetGene
KRAS is plotted next, using coordinates from
the provided gene model krasGeneModel
, followed by our spacer subset.
The name of each track is given on the left.<-
for reverse strand and ->
for forward strand.This last point is important: the default plot window is set by the
spacers’ ranges in the input GuideSet
object. We can manually adjust
this window by using the from
, to
, extend.left
, and extend.right
arguments. Here is the same plot adjusted to show the whole KRAS gene,
which also reveals an additional isoform that is not targeted by any
spacer in this example subset.
from <- min(start(krasGeneModel$transcripts))
to <- max(end(krasGeneModel$transcripts))
plotGuideSet(krasGuideSet[1:4],
geneModel=krasGeneModel,
targetGene="KRAS",
from=from,
to=to,
extend.left=1000,
extend.right=1000)
As calculated above, there are a total of 52
candidate gRNAs targeting the CDS of KRAS. Including all of them could
crowd the plot space, making it difficult to interpret. To alleviate
this we can hide the gRNA labels by setting the showGuideLabels
argument to FALSE
.
plotGuideSet(krasGuideSet,
geneModel=krasGeneModel,
targetGene="KRAS",
showGuideLabels=FALSE,
from=from,
to=to,
extend.left=1000,
extend.right=1000)