library(CRISPRseek)
library("BSgenome.Hsapiens.UCSC.hg19")
library(TxDb.Hsapiens.UCSC.hg19.knownGene)
library(org.Hs.eg.db)
outputDir <- getwd()
inputFilePath <- system.file("extdata", "inputseq.fa", package = "CRISPRseek")
REpatternFile <- system.file("extdata", "NEBenzymes.fa", package = "CRISPRseek")
######## Scenario 1. Target and off-target analysis for paired gRNAs with
######## one of the pairs overlap RE sites
results <- offTargetAnalysis(inputFilePath, findgRNAsWithREcutOnly=TRUE,
REpatternFile =REpatternFile,findPairedgRNAOnly=TRUE,
BSgenomeName=Hsapiens, txdb=TxDb.Hsapiens.UCSC.hg19.knownGene,
orgAnn = org.Hs.egSYMBOL,max.mismatch = 1, chromToSearch = "chrX",
outputDir = outputDir,overwrite = TRUE)
######## Scenario 2. Target and off-target analysis for paired gRNAs with or
######## without RE sites
results <- offTargetAnalysis(inputFilePath, findgRNAsWithREcutOnly = FALSE,
REpatternFile = REpatternFile,findPairedgRNAOnly = TRUE,
BSgenomeName = Hsapiens, txdb = TxDb.Hsapiens.UCSC.hg19.knownGene,
orgAnn = org.Hs.egSYMBOL,max.mismatch = 1, chromToSearch = "chrX",
outputDir = outputDir, overwrite = TRUE)
######## Scenario 3. Target and off-target analysis for gRNAs overlap RE sites
results <- offTargetAnalysis(inputFilePath, findgRNAsWithREcutOnly = TRUE,
REpatternFile = REpatternFile,findPairedgRNAOnly = FALSE,
BSgenomeName = Hsapiens, txdb = TxDb.Hsapiens.UCSC.hg19.knownGene,
orgAnn = org.Hs.egSYMBOL, max.mismatch = 1, chromToSearch = "chrX",
outputDir = outputDir, overwrite = TRUE)
######## Scenario 4. Off-target analysis for all potential gRNAs, this will
########be the slowest among the aforementioned scenarios.
results <- offTargetAnalysis(inputFilePath, findgRNAsWithREcutOnly = FALSE,
REpatternFile = REpatternFile,findPairedgRNAOnly = FALSE,
BSgenomeName = Hsapiens, txdb = TxDb.Hsapiens.UCSC.hg19.knownGene,
orgAnn = org.Hs.egSYMBOL, max.mismatch = 1, chromToSearch = "chrX",
outputDir = outputDir,overwrite = TRUE)
######## Scenario 5. Target and off-target analysis for gRNAs input by user.
gRNAFilePath <- system.file("extdata", "testHsap_GATA1_ex2_gRNA1.fa",
package="CRISPRseek")
results <- offTargetAnalysis(inputFilePath = gRNAFilePath, findgRNAs = FALSE,
findgRNAsWithREcutOnly = FALSE, REpatternFile = REpatternFile,
findPairedgRNAOnly = FALSE, BSgenomeName = Hsapiens,
txdb = TxDb.Hsapiens.UCSC.hg19.knownGene,
orgAnn = org.Hs.egSYMBOL, max.mismatch = 1, chromToSearch = "chrX",
outputDir = outputDir, overwrite = TRUE)
####### Scenario 6. Quick gRNA finding without target and off-target analysis
results <- offTargetAnalysis(inputFilePath, findgRNAsWithREcutOnly = TRUE,
REpatternFile = REpatternFile,findPairedgRNAOnly = TRUE,
chromToSearch = "", outputDir = outputDir, overwrite = TRUE)
####### Scenario 7. Quick gRNA finding with gRNA efficacy analysis
results <- offTargetAnalysis(inputFilePath, findgRNAsWithREcutOnly = TRUE,
REpatternFile = REpatternFile,findPairedgRNAOnly = TRUE,
BSgenomeName = Hsapiens, annotateExon = FALSE,
max.mismatch = 0, outputDir = outputDir, overwrite = TRUE)
Run the code above in your browser using DataLab