Code Monkey home page Code Monkey logo

tutorials's Introduction

crisprVerse: ecosystem of R packages for CRISPR gRNA design

Authors: Jean-Philippe Fortin, Luke Hoberecht

Date: July 25, 2022

Installation and getting started

The crisprVerse is a collection of packages for CRISPR guide RNA (gRNA) design that can easily be installed with the crisprVerse package. This provides a convenient way of downloading and installing all crisprVerse packages with a single R command.

The package can be installed from the Bioconductor devel branch using the following commands in an R session:

if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")

BiocManager::install(version="devel")
BiocManager::install("crisprVerse")

The core crisprVerse includes the packages that are commonly used for gRNA design, and are attached when you attach the crisprVerse package:

library(crisprVerse)
## Warning: multiple methods tables found for 'aperm'

## Warning: replacing previous import 'BiocGenerics::aperm' by
## 'DelayedArray::aperm' when loading 'SummarizedExperiment'

You can check that all crisprVerse packages are up-to-date with crisprVerse_update():

crisprVerse_update()
## The following packages are out of date:
## 
## • crisprDesign (0.99.176 -> 0.99.177)
## • crisprScore  (1.1.15 -> 1.1.16)
## 
## Start a clean R session then run:
## BiocManager::install(c("crisprDesign", "crisprScore"))

The complete documentation for the package can be found here.

Components

The following packages are installed and loaded with the crisprVerse package:

  • crisprBase to specify and manipulate CRISPR nucleases.
  • crisprBowtie to perform gRNA spacer sequence alignment with Bowtie.
  • crisprScore to annotate gRNAs with on-target and off-target scores.
  • crisprDesign to design and manipulate gRNAs with GuideSet objects.
  • crisprViz to visualize gRNAs.

Reproducibility

sessionInfo()
## R version 4.2.1 (2022-06-23)
## Platform: x86_64-apple-darwin17.0 (64-bit)
## Running under: macOS Catalina 10.15.7
## 
## Matrix products: default
## BLAS:   /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRblas.0.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib
## 
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
##  [1] crisprViz_0.99.22     crisprDesign_0.99.176 crisprScore_1.1.15   
##  [4] crisprScoreData_1.1.3 ExperimentHub_2.5.0   AnnotationHub_3.5.1  
##  [7] BiocFileCache_2.5.0   dbplyr_2.2.1          BiocGenerics_0.43.4  
## [10] crisprBowtie_1.1.1    crisprBase_1.1.8      crisprVerse_0.99.9   
## [13] BiocStyle_2.25.0     
## 
## loaded via a namespace (and not attached):
##   [1] backports_1.4.1               Hmisc_4.7-1                  
##   [3] lazyeval_0.2.2                splines_4.2.1                
##   [5] BiocParallel_1.31.12          GenomeInfoDb_1.33.7          
##   [7] ggplot2_3.3.6                 digest_0.6.29                
##   [9] ensembldb_2.21.4              htmltools_0.5.3              
##  [11] fansi_1.0.3                   checkmate_2.1.0              
##  [13] magrittr_2.0.3                memoise_2.0.1                
##  [15] BSgenome_1.65.2               cluster_2.1.4                
##  [17] tzdb_0.3.0                    Biostrings_2.65.3            
##  [19] readr_2.1.2                   matrixStats_0.62.0           
##  [21] prettyunits_1.1.1             jpeg_0.1-9                   
##  [23] colorspace_2.0-3              blob_1.2.3                   
##  [25] rappdirs_0.3.3                xfun_0.32                    
##  [27] dplyr_1.0.10                  crayon_1.5.1                 
##  [29] RCurl_1.98-1.8                jsonlite_1.8.0               
##  [31] survival_3.4-0                VariantAnnotation_1.43.3     
##  [33] glue_1.6.2                    gtable_0.3.1                 
##  [35] zlibbioc_1.43.0               XVector_0.37.1               
##  [37] DelayedArray_0.23.1           scales_1.2.1                 
##  [39] DBI_1.1.3                     Rcpp_1.0.9                   
##  [41] htmlTable_2.4.1               xtable_1.8-4                 
##  [43] progress_1.2.2                reticulate_1.26              
##  [45] foreign_0.8-82                bit_4.0.4                    
##  [47] Formula_1.2-4                 stats4_4.2.1                 
##  [49] htmlwidgets_1.5.4             httr_1.4.4                   
##  [51] dir.expiry_1.5.1              RColorBrewer_1.1-3           
##  [53] ellipsis_0.3.2                pkgconfig_2.0.3              
##  [55] XML_3.99-0.10                 nnet_7.3-17                  
##  [57] Gviz_1.41.1                   deldir_1.0-6                 
##  [59] utf8_1.2.2                    tidyselect_1.1.2             
##  [61] rlang_1.0.5                   later_1.3.0                  
##  [63] AnnotationDbi_1.59.1          munsell_0.5.0                
##  [65] BiocVersion_3.16.0            tools_4.2.1                  
##  [67] cachem_1.0.6                  cli_3.4.0                    
##  [69] generics_0.1.3                RSQLite_2.2.16               
##  [71] evaluate_0.16                 stringr_1.4.1                
##  [73] fastmap_1.1.0                 yaml_2.3.5                   
##  [75] knitr_1.40                    bit64_4.0.5                  
##  [77] purrr_0.3.4                   randomForest_4.7-1.1         
##  [79] AnnotationFilter_1.21.0       KEGGREST_1.37.3              
##  [81] Rbowtie_1.37.0                mime_0.12                    
##  [83] xml2_1.3.3                    biomaRt_2.53.2               
##  [85] compiler_4.2.1                rstudioapi_0.14              
##  [87] filelock_1.0.2                curl_4.3.2                   
##  [89] png_0.1-7                     interactiveDisplayBase_1.35.0
##  [91] tibble_3.1.8                  stringi_1.7.8                
##  [93] basilisk.utils_1.9.3          GenomicFeatures_1.49.6       
##  [95] lattice_0.20-45               ProtGenerics_1.29.0          
##  [97] Matrix_1.4-1                  vctrs_0.4.1                  
##  [99] pillar_1.8.1                  lifecycle_1.0.1              
## [101] BiocManager_1.30.18           data.table_1.14.2            
## [103] bitops_1.0-7                  httpuv_1.6.5                 
## [105] rtracklayer_1.57.0            GenomicRanges_1.49.1         
## [107] R6_2.5.1                      BiocIO_1.7.1                 
## [109] latticeExtra_0.6-30           promises_1.2.0.1             
## [111] gridExtra_2.3                 IRanges_2.31.2               
## [113] codetools_0.2-18              dichromat_2.0-0.1            
## [115] assertthat_0.2.1              SummarizedExperiment_1.27.2  
## [117] rjson_0.2.21                  GenomicAlignments_1.33.1     
## [119] Rsamtools_2.13.4              S4Vectors_0.35.3             
## [121] GenomeInfoDbData_1.2.8        parallel_4.2.1               
## [123] hms_1.1.2                     rpart_4.1.16                 
## [125] grid_4.2.1                    basilisk_1.9.6               
## [127] rmarkdown_2.16                MatrixGenerics_1.9.1         
## [129] biovizBase_1.45.0             Biobase_2.57.1               
## [131] shiny_1.7.2                   base64enc_0.1-3              
## [133] interp_1.1-3                  restfulr_0.0.15

tutorials's People

Contributors

jfortin1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

tutorials's Issues

use interested sequence as input

Hi, I was wondering if I could use my interested sequence as input for the sgRNA design (cas9), on/off target score? If possible, is any length limitation for my input? Thanks

Error in .checkCutSitesOrder(GuideSet1, GuideSet2)

Hi,
I am trying to use crisprVerse for paired gRNA design. But when I ran the findSpacerPairs function, it returned an error.

> data(SpCas9, package = "crisprBase")
> bsgenome <- BSgenome.Hsapiens.UCSC.hg38
> pairs <- findSpacerPairs(
+   x1 = upstream,
+   x2 = downstream,
+   bsgenome = bsgenome,
+   crisprNuclease = SpCas9
+ )
Error in .checkCutSitesOrder(GuideSet1, GuideSet2) : 
  Some of the pairs are not ordered properly. The cut site
              of gRNA1 must be upstream of the cut site of gRNA2.

And here is my input.

> upstream
GRanges object with 245 ranges and 0 metadata columns:
        seqnames            ranges strand
           <Rle>         <IRanges>  <Rle>
    [1]     chr1   7961417-7961516      *
    [2]     chr1   9239647-9239746      *
    [3]     chr1 11797330-11797429      *
    [4]     chr1 16364194-16364293      *
    [5]     chr1 19390034-19390133      *
    ...      ...               ...    ...
  [241]    chr22 21847516-21847615      *
  [242]    chr22 37735214-37735313      *
  [243]    chr22 37748491-37748590      *
  [244]    chr22 42960242-42960341      *
  [245]    chr22 50001709-50001808      *
  -------
  seqinfo: 21 sequences from an unspecified genome; no seqlengths
> downstream
GRanges object with 245 ranges and 0 metadata columns:
        seqnames            ranges strand
           <Rle>         <IRanges>  <Rle>
    [1]     chr1   7961908-7962007      *
    [2]     chr1   9240088-9240187      *
    [3]     chr1 11797591-11797690      *
    [4]     chr1 16364605-16364704      *
    [5]     chr1 19390375-19390474      *
    ...      ...               ...    ...
  [241]    chr22 21848257-21848356      *
  [242]    chr22 37735445-37735544      *
  [243]    chr22 37749022-37749121      *
  [244]    chr22 42960503-42960602      *
  [245]    chr22 50001930-50002029      *
  -------
  seqinfo: 21 sequences from an unspecified genome; no seqlengths

Do you have any suggestion about this error?
Thank you very much!

Error during sgRNA design for CRISPR activation

Hi, I encounter an error at the very last step during the design of sgRNA for CRISPR activation.
Everything is going fine until I try to add the CRISPRai scores.

After typing the command line in R

results <- addCrispraiScores(gs,
                            gr=target_region,
                            tssObject=tss_human,
                            geneCol="gene_id",
                            modality="CRISPRa",
                            fastaFile=fastaPath,
                            chromatinFiles=chromatinFiles)

I get the following error message:

snapshotDate(): 2023-10-24
see ?crisprScoreData and browseVignettes('crisprScoreData') for documentation
loading from cache
/bin/sh: RNAfold: command not found
Traceback (most recent call last):
  File "/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/crisprScore/python/crisprai/getWeissmanScores.py", line 105, in <module>
    scores = predictWeissmanScore(tssTable, p1p2Table, sgrnaTable, libraryTable, pickleFile, fastaFile, chromatinFiles, modality, verbose)
  File "/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/crisprScore/python/crisprai/getWeissmanScores.py", line 26, in predictWeissmanScore
    paramTable = getParamTable(tssTable, p1p2Table, sgrnaTable, libraryTable, fastaFile, chromatinFiles, verbose)
  File "/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/crisprScore/python/crisprai/getWeissmanScores.py", line 61, in getParamTable
    raise Exception('Error generating parameter table.')
Exception: Error generating parameter table.
Erreur dans file(file, "rt") : impossible d'ouvrir la connexion
De plus : Message d'avis :
Dans file(file, "rt") :
  impossible d'ouvrir le fichier '/var/folders/64/0s_gdgs13436hlvh44zjw1q00000gn/T//RtmpMYYf2X/scores.txt' : No such file or directory

Here are my session info

sessionInfo()
R version 4.3.3 beta (2024-02-20 r85965)
Platform: x86_64-apple-darwin20 (64-bit)
Running under: macOS Ventura 13.6.4

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRblas.0.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

locale:
[1] fr_CA.UTF-8/fr_CA.UTF-8/fr_CA.UTF-8/C/fr_CA.UTF-8/fr_CA.UTF-8

time zone: America/Toronto
tzcode source: internal

attached base packages:
[1] stats4    stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] crisprScoreData_1.6.0             ExperimentHub_2.10.0              AnnotationHub_3.10.0              BiocFileCache_2.10.1             
[5] dbplyr_2.4.0                      BSgenome.Hsapiens.UCSC.hg38_1.4.5 BSgenome_1.70.2                   rtracklayer_1.62.0               
[9] BiocIO_1.12.0                     Biostrings_2.70.2                 XVector_0.42.0                    GenomicRanges_1.54.1             
[13] GenomeInfoDb_1.38.6               IRanges_2.36.0                    S4Vectors_0.40.2                  BiocGenerics_0.48.1              
[17] crisprDesignData_0.99.28          crisprDesign_1.4.0                crisprBase_1.6.0                 

loaded via a namespace (and not attached):
[1] DBI_1.2.2                     bitops_1.0-7                  biomaRt_2.58.2                rlang_1.1.3                  
[5] magrittr_2.0.3                Rbowtie_1.42.0                matrixStats_1.2.0             compiler_4.3.3               
[9] RSQLite_2.3.5                 GenomicFeatures_1.54.3        dir.expiry_1.10.0             png_0.1-8                    
[13] vctrs_0.6.5                   stringr_1.5.1                 pkgconfig_2.0.3               crayon_1.5.2                 
[17] fastmap_1.1.1                 ellipsis_0.3.2                utf8_1.2.4                    Rsamtools_2.18.0             
[21] promises_1.2.1                tzdb_0.4.0                    purrr_1.0.2                   bit_4.0.5                    
[25] randomForest_4.7-1.1          zlibbioc_1.48.0               cachem_1.0.8                  jsonlite_1.8.8               
[29] progress_1.2.3                blob_1.2.4                    later_1.3.2                   DelayedArray_0.28.0          
[33] BiocParallel_1.36.0           interactiveDisplayBase_1.40.0 parallel_4.3.3                prettyunits_1.2.0            
[37] R6_2.5.1                      VariantAnnotation_1.48.1      stringi_1.8.3                 reticulate_1.35.0            
[41] Rcpp_1.0.12                   SummarizedExperiment_1.32.0   readr_2.1.5                   httpuv_1.6.14                
[45] Matrix_1.6-5                  tidyselect_1.2.0              abind_1.4-5                   yaml_2.3.8                   
[49] codetools_0.2-19              curl_5.2.0                    lattice_0.22-5                tibble_3.2.1                 
[53] withr_3.0.0                   Biobase_2.62.0                shiny_1.8.0                   basilisk.utils_1.14.1        
[57] KEGGREST_1.42.0               xml2_1.3.6                    pillar_1.9.0                  BiocManager_1.30.22          
[61] filelock_1.0.3                MatrixGenerics_1.14.0         crisprScore_1.6.0             generics_0.1.3               
[65] vroom_1.6.5                   RCurl_1.98-1.14               BiocVersion_3.18.1            hms_1.1.3                    
[69] xtable_1.8-4                  glue_1.7.0                    tools_4.3.3                   crisprBwa_1.6.0              
[73] GenomicAlignments_1.38.2      XML_3.99-0.16.1               grid_4.3.3                    AnnotationDbi_1.64.1         
[77] GenomeInfoDbData_1.2.11       basilisk_1.14.3               restfulr_0.0.15               cli_3.6.2                    
[81] rappdirs_0.3.3                fansi_1.0.6                   S4Arrays_1.2.0                dplyr_1.1.4                  
[85] Rbwa_1.6.0                    crisprBowtie_1.6.0            digest_0.6.34                 SparseArray_1.2.4            
[89] rjson_0.2.21                  memoise_2.0.1                 htmltools_0.5.7               lifecycle_1.0.4              
[93] httr_1.4.7                    mime_0.12                     bit64_4.0.5                  
> 

Could you help me on this matter ?
Best

On Target Score Characterization in Validating Existing sgRNA Library Tutorial

Hi, in the validating existing sgRNA library tutorial, it was mentioned that after creating the guideset, we can characterize off-target sgRNA by simply using addOffTargetScores() command and it directly output both CFD and MIT scores. Furthermore, I noticed we can do the same for on-target scoring by using addOnTargetScores() and it will output on-target score of our choice.

However, the on-target scoring method like rule set 1 and rule set 3 will also require the 4 bp of flank5 and 3 bp of flank3 sequences which actually discarded from the very beginning (as we only take the 20-mer spacer sequence) and there is no such columns in the guideset that define the flank5 and flank3 sequences.

I would like to know whether using addOnTargetScores() to validate the sgRNA library is still reliable in this case or do I need to do it manually by first defining the flank5 and flank3 sequences?.

Design_CRISPRko_Cas9 Tutorial: Error in alignments and off-target scoring

Hello,
While going through the Design_CRISPRko_Cas9 tutorial, I am getting these 2 errors:

  1. the alignments(guideSet) function does not give an output

alignments(guideSet)
GRanges object with 0 ranges and 14 metadata columns:
seqnames ranges strand | spacer protospacer pam pam_site n_mismatches canonical cut_site
|
cds fiveUTRs threeUTRs exons introns intergenic intergenic_distance


seqinfo: 25 sequences (1 circular) from hg38 genome

  1. The off-target scoring section shows an error:
    Error in .checkSequenceInputs(spacers) :
    Provided sequences for must all have identical length

The previous steps produced outputs similar to the tutorial. Any advice/suggestions would be appreciated.
And, thanks for sharing these very useful tools!
Adil.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.