Question: A unexpected error occurred when using CRISPRseek package
gravatar for prokaryote23
6 weeks ago by
prokaryote230 wrote:

I have a question in regard to running the CRISPRseek offTargetAnalysis function, although I do encounter an error, the output files seem to contain correct/usable information.

The content in my input FASTA file is as following. The first sequence is the example in the user's guide, the 2nd sequence is a snp version of the first sequence (snp is at the 4th nucleotide). 


Here are my codes:

#---load libraries---#
#---load input file---#
inputFilePath <- "D:/Dropbox (Personal)/guide RNA design/crisprseek/input_v1.fa" # you will need to modify this line
#---CRISPRseek running---#
results <- offTargetAnalysis(inputFilePath, findgRNAsWithREcutOnly = F,
                             REpatternFile = REpatternFile, findPairedgRNAOnly = F,
                             BSgenomeName = Hsapiens, chromToSearch ="chrX", 
                    = 0, = 20,
                             txdb = TxDb.Hsapiens.UCSC.hg19.knownGene, orgAnn = org.Hs.egSYMBOL,
                             max.mismatch = 2,overlap.gRNA.positions = c(17, 18),
                             outputDir = outputDir,overwrite = TRUE)

Here is the error message:

Error in .normargStrand(strand, max0123) : 
  strand values must be in '+' '-' '*'

One thing I noted is that the error seems to be caused by the snp sequence I created (when perform search on ChrX). But if I run the offTargetAnalysis to other chrmosomes than chrX, both sequence can pass and no error occurs.

Anybody have suggestions on how to overcome this issue? Thank you.

Best regards,



R version 3.5.0 (2018-04-23)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

other attached packages:
 [1]                      TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2
 [3] GenomicFeatures_1.32.0                  AnnotationDbi_1.42.1                   
 [5] Biobase_2.40.0                          BSgenome.Hsapiens.UCSC.hg19_1.4.0      
 [7] BSgenome_1.48.0                         rtracklayer_1.40.3                     
 [9] GenomicRanges_1.32.3                    GenomeInfoDb_1.16.0                    
[11] CRISPRseek_1.20.0                       Biostrings_2.48.0                      
[13] XVector_0.20.0                          IRanges_2.14.10                        
[15] S4Vectors_0.18.3                        BiocGenerics_0.26.0                    

loaded via a namespace (and not attached):
 [1] hash_2.2.6                  DBI_1.0.0                   Rsamtools_1.32.0            zlibbioc_1.26.0            
 [5] bitops_1.0-6                SummarizedExperiment_1.10.1 bit_1.1-14                  lattice_0.20-35            
 [9] RSQLite_2.1.1               pkgconfig_2.0.1             DelayedArray_0.6.1          stringr_1.3.1              
[13] seqinr_3.4-5                blob_1.1.1                  compiler_3.5.0              prettyunits_1.0.2          
[17] GenomicAlignments_1.16.0    biomaRt_2.36.1              Rcpp_0.12.17                GenomeInfoDbData_1.1.0     
[21] httr_1.3.1                  progress_1.2.0              tools_3.5.0                 MASS_7.3-50                
[25] RCurl_1.95-4.10             BiocParallel_1.14.1         memoise_1.1.0               R6_2.2.2                   
[29] assertthat_0.2.0            digest_0.6.15               Matrix_1.2-14               stringi_1.1.7              
[33] rstudioapi_0.7              hms_0.4.2                   bit64_0.9-7                 grid_3.5.0                 
[37] XML_3.98-1.11               data.table_1.11.4           rlang_0.2.1                 magrittr_1.5               
[41] ade4_1.7-11                 crayon_1.3.4                matrixStats_0.53.1  


ADD COMMENTlink modified 6 weeks ago by Julie Zhu3.8k • written 6 weeks ago by prokaryote230
gravatar for Julie Zhu
6 weeks ago by
Julie Zhu3.8k
United States
Julie Zhu3.8k wrote:
Ming-Ru, Thanks for the detailed description of the problem and the session information! What happened is that the mutated gRNA does not have a perfect matched target site on chromosome X. The error occurred because you were trying to search for RE sites on the flanking regions of a non-extent genomic location. I just added the exception handling to the devel version of CRISPRseek (1.21.1). If you prefer the released version over the devel version, you can set outputUniqueREs = FALSE to skip the RE site search in the flanking region of the target site. results <- offTargetAnalysis(inputFilePath, findgRNAsWithREcutOnly = FALSE, findPairedgRNAOnly = FALSE, BSgenomeName = Hsapiens, chromToSearch ="chrX", outputUniqueREs = FALSE, txdb = TxDb.Hsapiens.UCSC.hg19.knownGene, orgAnn = org.Hs.egSYMBOL, max.mismatch = 2, outputDir = outputDir, overwrite = TRUE) Best regards, Julie
ADD COMMENTlink modified 6 weeks ago • written 6 weeks ago by Julie Zhu3.8k

Hi Julie,

Thank you very much. It worked smoothly now.

Best regards,


ADD REPLYlink written 6 weeks ago by prokaryote230
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 297 users visited in the last hour