CRISPRseek OffTargetAnalysis Warning: Error in Hash and NAs introduced by coercion
1
0
Entering edit mode
@nilshassel-22249
Last seen 3.9 years ago

Hello everyone,

i have some issues with my off-target-analysis for Cas9. I get some warnings i have never seen before in this context. Maybe someone knows what i can try to fix it.

Rscript:

library(CRISPRseek)
library(myBSGenome)


outputDir <- waytomyfolder
inputFilePath <- waytomyinput.fasta


results <- offTargetAnalysis(inputFilePath, 
                  format = "fasta", 
                  header = FALSE,
                  findgRNAs = TRUE
                  exportAllgRNAs = c("all"),
                  findgRNAsWithREcutOnly = FALSE,
                  REpatternFile = system.file("extdata", "NEBenzymes.fa",package = "CRISPRseek"), 
                  minREpatternSize = 4,
                  overlap.gRNA.positions = c(17, 18), default 17 and 18 
                  findPairedgRNAOnly = FALSE, 
                  annotatePaired = TRUE, 
                  paired.orientation = c("PAMout","PAMin"),
                  enable.multicore = FALSE, 
                  n.cores.max = 6,
                  min.gap = 0, 
                  max.gap = 20, 
                  gRNA.name.prefix = "", 
                  PAM.size = 3, 
                  gRNA.size = 20,  
                  PAM = "NGG", 
                  BSgenomeName = myBSGenome,
                  chromToSearch = "all",  
                  chromToExclude = "", 
                  max.mismatch = 3,  
                  PAM.pattern = "N[A|G]G$", 
                  allowed.mismatch.PAM = 1, 
                  gRNA.pattern = "", 
                  min.score = 0, 
                  topN= 1000, 
                  topN.OfftargetTotalScore = 10, 
                  annotateExon = FALSE, 
                  ignore.strand = TRUE, 
                  outputDir = outputDir,o
                  overwrite = TRUE, 
                  fetchSequence = TRUE, 
                  upstream = 200, 
                  downstream = 200, 
                  upstream.search = 0, 
                  downstream.search = 0, 
                  weights = c(0, 0, 0.014, 0, 0, 0.395, 0.317, 0, 0.389, 0.079, 0.445, 0.508,0.613, 0.851, 0.732, 0.828, 0.615,
                  0.804, 0.685, 0.583),                               
                  baseBeforegRNA = 4, 
                  baseAfterPAM = 3, 
                  featureWeightMatrixFile = system.file("extdata", "DoenchNBT2014.csv",package = "CRISPRseek"), 
                  useScore = TRUE, 
                  useEfficacyFromInputSeq = FALSE, 
                  outputUniqueREs = TRUE, 
                  foldgRNAs = FALSE, 
                  gRNA.backbone ="GUUUUAGAGCUAGAAAUAGCAAGUUAAAAUAAGGCUAGUCCGUUAUCAACUUGAAAAAGUGGCACCGAGUCGGUGCUUUUUU", 
                  temperature = 37, 
                  scoring.method = c("CFDscore"), 
                  subPAM.activity = hash( AA = 0,
                                          AC = 0,
                                          AG = 0.259259259,
                                          AT = 0,
                                          CA = 0,
                                          CC = 0,
                                          CG = 0.107142857,
                                          CT = 0,
                                          GA = 0.069444444,
                                          GC = 0.022222222,
                                          GG = 1,
                                          GT = 0.016129032,
                                          TA = 0,
                                          TC = 0,
                                          TG = 0.038961039,
                                          TT = 0), 
                  subPAM.position = c(22, 23), 
                  PAM.location = "3prime", 
                  rule.set = c("Root_RuleSet2_2016"), #same problems with Root_RuleSet1_2014
                  mismatch.activity.file = system.file("extdata","NatureBiot2016SuppTable19DoenchRoot.csv",package =
                  "CRISPRseek")         
)

Occured Warnings:

Validating input ...
Searching for gRNAs ...
>>> Finding all hits in sequence Ml.1 ...
>>> DONE searching
>>> Finding all hits in sequence Ml.2 ...
>>> DONE searching
>>> Finding all hits in sequence Ml.3 ...
>>> DONE searching
>>> Finding all hits in sequence Ml.4 ...
>>> DONE searching
>>> Finding all hits in sequence Ml.5 ...
>>> DONE searching
>>> Finding all hits in sequence Ml.6 ...
>>> DONE searching
>>> Finding all hits in sequence Ml.7 ...
>>> DONE searching
>>> Finding all hits in sequence Ml.8 ...
>>> DONE searching
Building feature vectors for scoring ...
Calculating scores ...
Error in hash(AA = 0, AC = 0, AG = 0.259259259, AT = 0, CA = 0, CC = 0,  : 
  could not find function "hash"
In addition: There were 50 or more warnings (use warnings() to see the first 50)
> warnings()
Warning messages:
1: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
2: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
3: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
4: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
5: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
6: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
7: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
8: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
9: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
10: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
11: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
12: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
13: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
14: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
15: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
16: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
17: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
18: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
19: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
20: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
21: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
22: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
23: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
24: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
25: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
26: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
27: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
28: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
29: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
30: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
31: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
32: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
33: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
34: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
35: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
36: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
37: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
38: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
39: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
40: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
41: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
42: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
43: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
44: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
45: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
46: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
47: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
48: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
49: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion
50: In offTargetAnalysis(inputFilePath, format = "fasta",  ... :
  NAs introduced by coercion

Session Details:

R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/atlas/libblas.so.3.10.3
LAPACK: /usr/lib/x86_64-linux-gnu/atlas/liblapack.so.3.10.3

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=de_DE.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=de_DE.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=de_DE.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
 [1] CRISPRseek_1.26.0                          myBSGenome
 [3] BSgenome_1.54.0                             rtracklayer_1.46.0                         
 [5] Biostrings_2.54.0                           XVector_0.26.0                             
 [7] GenomicRanges_1.38.0                        GenomeInfoDb_1.22.1                        
 [9] IRanges_2.20.2                              S4Vectors_0.24.4                           
[11] BiocGenerics_0.32.0                        

loaded via a namespace (and not attached):
 [1] hash_2.2.6.1                MASS_7.3-51.6               zlibbioc_1.32.0            
 [4] GenomicAlignments_1.22.1    BiocParallel_1.20.1         lattice_0.20-41            
 [7] tools_3.6.3                 SummarizedExperiment_1.16.1 grid_3.6.3                 
[10] data.table_1.12.8           Biobase_2.46.0              seqinr_3.6-1               
[13] matrixStats_0.56.0          ade4_1.7-15                 Matrix_1.2-18              
[16] GenomeInfoDbData_1.2.2      bitops_1.0-6                RCurl_1.98-1.2             
[19] DelayedArray_0.12.3         compiler_3.6.3              Rsamtools_2.2.3            
[22] XML_3.99-0.3

I appreciate your help and hope you can help me with my problem.

Kind regards,

Nils

CRISPRseek Error in hash NAs introduced by coercion • 1.4k views
ADD COMMENT
1
Entering edit mode
Julie Zhu ★ 4.3k
@julie-zhu-3596
Last seen 5 months ago
United States

Hi Nils,

Please add library(hash) before the following command, and see if it fixes the issue. Thanks!

results <- offTargetAnalysis(…)

BTW, the newest release version is 1.28, which can be used for base editor and prime editor design. https://www.bioconductor.org/packages/release/bioc/html/CRISPRseek.html

Best regards, Julie

ADD COMMENT
0
Entering edit mode

Hi Julie,

Thank you for your quick and helpful support. The ERROR in hash is fixed now and i get an OffTargetScore. But the warnings are still there and i get an gRNAefficacy for one out of 713 gRNAs, the others are NAs. I am going to check it with different genes an will inform you about the progress. Is it an option to set useEfficiacyFromInputSeq to TRUE ?

The latest release version has very nice features and hopefully i can use them for my next study. So far i am still working with Cpf1. I posted another question in this forum about adjusting some parameters to get proper results. It would be great if you could take a short look. But I totally understand when you have more important work to do and the Cpf1- Topic is not that important for other users.

https://support.bioconductor.org/p/131418/

Thank you for your great support !

Kind regards,

Nils

ADD REPLY
0
Entering edit mode

Update:

I tried with another gene, but i still get gRNAefficiacy for very few gRNAs. Additionally the OffTargetScore is just calculated for the first 39 of 396 gRNAs. Is it supposed to be like this ?

ADD REPLY
1
Entering edit mode

Hi Nils,

Could you please share your script, input file, output file including OfftargetAnalysis and Summary.xls? Thanks!

Here is the information regarding the parameter useEfficacyFromInputSeq.

Default FALSE. If set to TRUE, summary file will contain gRNA efficacy calculated from input sequences instead of from off-target analysis. Set it to TRUE if the input sequence is from a different species than the one used for off-target analysis.

For more information about the other parameters, please type

help(offTargetAnalysis)

I just responded to your question at https://support.bioconductor.org/p/131418/#131572. For some reasons, I missed this post. Thanks for the reminder and patience!

Best regards,

Julie

ADD REPLY
0
Entering edit mode

Hi Julie,

with the link (https://we.tl/t-TOJDM16BNs) you can get my script and the whole output of CRISPRseek. I get the warnings about the NAs with different genes und enzymes.

Thank you for your great support !

Kind regards,

Nils

ADD REPLY
0
Entering edit mode

Hi Nils,

I noticed that you are using SpCas9 settings for offTargetAnalysis. Is it true?

I also notice that you specified the input file in the script as ADE2homologMl.fasta while the input file you shared with me is ADE2homologMl.fa.

The results indicate that some gRNAs found in the input sequence have no perfect matches in the genome of your interest. Is that true? Thanks!

Best,

Julie

ADD REPLY
0
Entering edit mode

Hi Julie,

yes, in this case i am using the parameters for SpCas9. But i do offTargetAnalysis for LbCpf1 as well and get the same warnings.

I'm sorry, but I just shared the output with the link, there is just the ADE2homologMl_allgRNAs.fa. My input file is a .fasta and not .fa. So this should not be the point, I guess.

Yes, some gRNAs have no perfect match in the genome. But i get the warning about the NAs for perfect matches too.

Thank you !

Kind regards,

Nils

ADD REPLY
0
Entering edit mode

Hi Nils,

Thanks for the clarification!

Could you please send me a couple of gRNAs with perfect match in the genome, yet the summary.xls file contains NA?

I am curious to know how do you know there is a perfect match in the genome. Is there a genome sequence file that you can share with me? I am wondering whether the Bioconductor BSgenome sequence differs from the one you examined manually.

Best, Julie

ADD REPLY
0
Entering edit mode

Hi Julie,

i am very sorry for my late response. After re-installing R and all depending packages for CRISPRseek the Problem was solved. I still get warnings about the NAs, but just for values that can't be calculated and some extended sequence in the OffTargetAnalysis.xls. It is supposed to be like this, I guess.

I forged the BSGenome myself and made a mistake in annotatation. Thank you ver much for making me think about it. All calculated gRNAs match to the genome and there is no problem anymore. CRISPRseek is working fine for Cas9.

Thank you for the great support !

Kind regards,

Nils

ADD REPLY
1
Entering edit mode

Hi Nils,

You are very welcome! Great that you solved the issue! Thanks for letting me know!

Best regards,

Julie

ADD REPLY

Login before adding your answer.

Traffic: 645 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6