Improving the run-time of offTargetAnalysis()
2
2
Entering edit mode
xenon ▴ 40
@xenon-21520
Last seen 3.3 years ago

Is there a way to speed up the offTargetAnalysis() call by not trying to find out the restriction enzyme cut sites ?

  • If Yes , then how ?

I have tried to enable parallelization by enable.multicore = TRUE, n.cores.max = 5. When I run my call I can see from the taskmanager that only 1 CPU is being used to 100%. Is there a way I can confirm that multiprocessing is happening for my offTargetAnalysis call?

My current call looks something like this

    res = offTargetAnalysis(inputFilePath = temp_gRNA, 
                        findgRNAs = FALSE, 
                        findgRNAsWithREcutOnly = FALSE, 
                        findPairedgRNAOnly = FALSE, 
                        chromToSearch = "chr1", 
                        outputDir = "/crisprseek_output_dir", 
                        overwrite = TRUE, 
                        gRNAoutputName = "temp_guide_rna_scores" , 
                        enable.multicore = TRUE, 
                        n.cores.max = 5, 
                        BSgenomeName = my_BSGenome_object, 
                        txdb = txdb,
                        scoring.method = "CFDscore",
                        outputUniqueREs = FALSE)
CRISPRseek • 868 views
ADD COMMENT
2
Entering edit mode
Julie Zhu ★ 4.3k
@julie-zhu-3596
Last seen 6 months ago
United States

Thanks for the great questions, Durbar!

You can set findgRNAsWithREcutOnly = FALSE

For other scenarios, please refer to https://bioconductor.org/packages/release/bioc/vignettes/CRISPRseek/inst/doc/CRISPRseek.pdf.

The number of cores used depends on how many cores available in your computer. At most, it will use n.cores -1 in your computer. With your script, it should run pretty fast even without specifying enable.multicore. In addition, I noticed that you only specified chr1 in your script. Are you sure you only need to search for offtargets in chr1 only? To search for genome-wide offtargets, you will need to set chromToSearch = "all" which is the default.

If you need to run genome-wide gRNA design, I recommend use high performance computing cluster to run searches in parallel. For example, you can run offtarget search with one chromosome for each submitted job.

Best regards,

Julie

ADD COMMENT
0
Entering edit mode

Thanks a lot Julie Zhu . I have used "chr1" just for this post. I am actually searching in the whole genome. Also, as you had suggested, after updating to the latest version 1.30.0 I am able to see that my programs are using the cores i am allocating.

ADD REPLY
0
Entering edit mode
Daniel • 0
@294d393a
Last seen 3.0 years ago
United Kingdom

I have the same problem. Only one core is used although I have multicores enabled and set n.cores.max to 6. I have CRISPRseek version 1.30.1 installed. The machine has 8 cores and R version 4.0.5. Same is happening on a different machine with more cores.

This is my code:

    target.sequence = DNAStringSet(input$sequence)
    PAM.detail = c("NGG","NNG$|NGN$","3prime")
    paired.gRNA.info = c(FALSE)
    outpath = "/home/usr/tmp"

        out = offTargetAnalysis(inputFilePath = target.sequence,
                            gRNAoutputName = 'output',
                            findPairedgRNAOnly = paired.gRNA.info,
                            findgRNAs = TRUE,
                            BSgenomeName = my.BSgenome,
                            chromToSearch = 'all',
                            txdb = my.txdb,
                            outputDir = outpath,
                            overwrite = TRUE,
                            max.mismatch = 3,
                            orgAnn = my.org.db,
                            PAM = PAM.detail[1],
                            PAM.pattern = PAM.detail[2],
                            PAM.location = PAM.detail[3],
                            enable.multicore = TRUE,
                            n.cores.max=6)
ADD COMMENT

Login before adding your answer.

Traffic: 654 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