crisprViz
Workflows
Standard Workflow
library(crisprViz)
library(BSgenome.Hsapiens.UCSC.hg38)
data("krasGuideSet", package="crisprViz")
data("krasGeneModel", package="crisprViz")
plotGuideSet(krasGuideSet[1:4], geneModel=krasGeneModel, targetGene="KRAS")
Inputs: A GuideSet object (krasGuideSet) and a gene model GRangesList (krasGeneModel). Outputs: A genomic track plot visualizing the gRNAs against the gene model.
Compare Multiple Guidesets
library(crisprViz)
library(BSgenome.Hsapiens.UCSC.hg38)
data("cas9GuideSet", package="crisprViz")
data("cas12aGuideSet", package="crisprViz")
data("ltn1GeneModel", package="crisprViz")
plotMultipleGuideSets(list(SpCas9=cas9GuideSet, AsCas12a=cas12aGuideSet),
geneModel=ltn1GeneModel,
targetGene="LTN1",
bsgenome=BSgenome.Hsapiens.UCSC.hg38,
margin=0.2,
gcWindow=10)
Inputs: A list of GuideSet objects for different nucleases, a gene model, and a reference BSgenome object. Outputs: A multi-track genomic plot comparing target distributions and GC content.
When to Use
- gRNA Track Visualization: Visualizing gRNA cutting locations against target genes or genomic regions using
plotGuideSet.
- Nuclease Comparison: Comparing multiple
GuideSet objects targeting the same region side-by-side using plotMultipleGuideSets.
- Genomic Annotations: Adding genomic annotations (e.g., repeat elements, CAGE peaks, DNase I hypersensitivity sites) to gRNA plots using the
annotations argument.
- Score-Based Color Coding: Coloring gRNAs based on on-target efficiency scores (e.g., DeepHF) using the
onTargetScore argument.
When NOT to Use
- Unsupported R/Bioconductor Versions: Do not use if R version is less than 4.2.0 or Bioconductor version is less than 3.16.
- gRNA Design or Scoring: Do not use for designing gRNAs or calculating scores directly (use
crisprDesign and crisprScore instead).
Data Requirements
- GuideSet: A
GuideSet object containing candidate gRNAs (e.g., krasGuideSet).
- Gene Model: A gene model represented as a
GRangesList object (e.g., krasGeneModel).
- Reference Genome: A
BSgenome object for genomic sequence visualization (e.g., BSgenome.Hsapiens.UCSC.hg38).
Key Parameters
- geneModel (no default): A
GRangesList object describing the gene structure.
- targetGene (no default): Character string specifying the name of the target gene.
- from (NULL): Numeric coordinate specifying the start of the plot window.
- to (NULL): Numeric coordinate specifying the end of the plot window.
- extend.left (0): Numeric value to extend the plot window to the left.
- extend.right (0): Numeric value to extend the plot window to the right.
- showGuideLabels (TRUE): Logical indicating whether to display gRNA labels.
- pamSiteOnly (FALSE): Logical indicating whether to plot only the PAM site instead of the full protospacer.
- onTargetScore (NULL): Character string specifying the metadata column name containing on-target scores.
- annotations (NULL): Named list of
GRanges objects representing genomic annotations.
- gcWindow (NULL): Integer specifying the window size for calculating percent GC content.
Best Practices
- Window Adjustment: Adjust the plot window manually using
from, to, extend.left, and extend.right to show the entire gene or focus on a specific exon.
- Crowding Prevention: Set
showGuideLabels = FALSE when plotting a large number of candidate gRNAs to avoid crowding the plot space.
- PAM Site Only: Set
pamSiteOnly = TRUE when visualizing many overlapping gRNAs in a small window to simplify the plot.
- Pre-filtering: Filter out gRNAs overlapping repeat elements or SNPs using
crisprDesign::removeRepeats before plotting to ensure high-quality selections.
Common Pitfalls
- Rendering Errors: Plotting too many gene isoforms or gRNAs in a small graphical device, resulting in rendering errors. Fix: Increase the height/width of the plot space using
grDevices::quartz or similar device settings.
Alternatives
- Gviz: For general genomic track visualization (which
crisprViz is built upon).
- biovizBase: For nucleotide color schemes and basic genomic plotting utilities.
Citations
- No specific primary publication is cited in the vignette text, but the package is part of the
crisprVerse ecosystem.
References
- Homepage: bioconductor.org/packages/crisprViz
- Vignette: bioconductor.org/packages/release/bioc/vignettes/crisprViz/inst/doc/introduction.html
1---2name: crisprviz3description: crisprViz4---56# crisprViz78## Workflows910### Standard Workflow1112```r13library(crisprViz)14library(BSgenome.Hsapiens.UCSC.hg38)15data("krasGuideSet", package="crisprViz")16data("krasGeneModel", package="crisprViz")1718plotGuideSet(krasGuideSet[1:4], geneModel=krasGeneModel, targetGene="KRAS")19```20*Inputs: A `GuideSet` object (`krasGuideSet`) and a gene model `GRangesList` (`krasGeneModel`). Outputs: A genomic track plot visualizing the gRNAs against the gene model.*2122### Compare Multiple Guidesets2324```r25library(crisprViz)26library(BSgenome.Hsapiens.UCSC.hg38)27data("cas9GuideSet", package="crisprViz")28data("cas12aGuideSet", package="crisprViz")29data("ltn1GeneModel", package="crisprViz")3031plotMultipleGuideSets(list(SpCas9=cas9GuideSet, AsCas12a=cas12aGuideSet),32 geneModel=ltn1GeneModel,33 targetGene="LTN1",34 bsgenome=BSgenome.Hsapiens.UCSC.hg38,35 margin=0.2,36 gcWindow=10)37```38*Inputs: A list of `GuideSet` objects for different nucleases, a gene model, and a reference `BSgenome` object. Outputs: A multi-track genomic plot comparing target distributions and GC content.*3940## When to Use41- **gRNA Track Visualization**: Visualizing gRNA cutting locations against target genes or genomic regions using `plotGuideSet`.42- **Nuclease Comparison**: Comparing multiple `GuideSet` objects targeting the same region side-by-side using `plotMultipleGuideSets`.43- **Genomic Annotations**: Adding genomic annotations (e.g., repeat elements, CAGE peaks, DNase I hypersensitivity sites) to gRNA plots using the `annotations` argument.44- **Score-Based Color Coding**: Coloring gRNAs based on on-target efficiency scores (e.g., DeepHF) using the `onTargetScore` argument.4546## When NOT to Use47- **Unsupported R/Bioconductor Versions**: Do not use if R version is less than 4.2.0 or Bioconductor version is less than 3.16.48- **gRNA Design or Scoring**: Do not use for designing gRNAs or calculating scores directly (use `crisprDesign` and `crisprScore` instead).4950## Data Requirements51- **GuideSet**: A `GuideSet` object containing candidate gRNAs (e.g., `krasGuideSet`).52- **Gene Model**: A gene model represented as a `GRangesList` object (e.g., `krasGeneModel`).53- **Reference Genome**: A `BSgenome` object for genomic sequence visualization (e.g., `BSgenome.Hsapiens.UCSC.hg38`).5455## Key Parameters56- **geneModel** (no default): A `GRangesList` object describing the gene structure.57- **targetGene** (no default): Character string specifying the name of the target gene.58- **from** (NULL): Numeric coordinate specifying the start of the plot window.59- **to** (NULL): Numeric coordinate specifying the end of the plot window.60- **extend.left** (0): Numeric value to extend the plot window to the left.61- **extend.right** (0): Numeric value to extend the plot window to the right.62- **showGuideLabels** (TRUE): Logical indicating whether to display gRNA labels.63- **pamSiteOnly** (FALSE): Logical indicating whether to plot only the PAM site instead of the full protospacer.64- **onTargetScore** (NULL): Character string specifying the metadata column name containing on-target scores.65- **annotations** (NULL): Named list of `GRanges` objects representing genomic annotations.66- **gcWindow** (NULL): Integer specifying the window size for calculating percent GC content.6768## Best Practices69- **Window Adjustment**: Adjust the plot window manually using `from`, `to`, `extend.left`, and `extend.right` to show the entire gene or focus on a specific exon.70- **Crowding Prevention**: Set `showGuideLabels = FALSE` when plotting a large number of candidate gRNAs to avoid crowding the plot space.71- **PAM Site Only**: Set `pamSiteOnly = TRUE` when visualizing many overlapping gRNAs in a small window to simplify the plot.72- **Pre-filtering**: Filter out gRNAs overlapping repeat elements or SNPs using `crisprDesign::removeRepeats` before plotting to ensure high-quality selections.7374## Common Pitfalls75- **Rendering Errors**: Plotting too many gene isoforms or gRNAs in a small graphical device, resulting in rendering errors. Fix: Increase the height/width of the plot space using `grDevices::quartz` or similar device settings.7677## Alternatives78- **Gviz**: For general genomic track visualization (which `crisprViz` is built upon).79- **biovizBase**: For nucleotide color schemes and basic genomic plotting utilities.8081## Citations82- No specific primary publication is cited in the vignette text, but the package is part of the `crisprVerse` ecosystem.8384## References85- Homepage: bioconductor.org/packages/crisprViz86- Vignette: bioconductor.org/packages/release/bioc/vignettes/crisprViz/inst/doc/introduction.html