Score cas9ranges using ruleset1 (Doench 2014) or ruleset2 (Doench 2016)

score_contextseqs(contextseqs, ruleset = 1, verbose = TRUE,
  python = NULL, virtualenv = NULL, condaenv = NULL)

score_cas9ranges(cas9ranges, ruleset = 1, verbose = TRUE,
  python = NULL, virtualenv = NULL, condaenv = NULL)

Arguments

contextseqs

character vector with 4-23-3 contextseqs

ruleset

1 (default) or 2 (only if python module github/MicrosoftResearch/azimuth is installed)

verbose

logical(1)

python

NULL (ruleset=1) or path to a python binary (ruleset=2). See details.

virtualenv

NULL (ruleset=1) or directory containing python virtualenv (ruleset=2). See details.

condaenv

NULL (ruleset=1) or name of condaenv (ruleset=2). See details.

cas9ranges

GenomicRanges::GRanges

Value

numeric vector

Details

ruleset1 is readily available. ruleset2 is accessible after installing the python module [azimuth](https://github.com/MicrosoftResearch/Azimuth), and specifying a value for either 'python' (python binary path), 'virtualenv' (python virtual environment dir) or 'condaenv' (python conda environment).

References

Doench 2014, Rational design of highly active sgRNAs for CRISPR-Cas9-mediated gene inactivation. Nature Biotechnology, doi: 10.1038/nbt.3026

Doench 2016, Optimized sgRNA design to maximize activity and minimize off-target effects of CRISPR-Cas9. Nature Biotechnology, doi: 10.1038/nbt.3437

Examples

# Get cas9ranges require(magrittr) bedfile <- system.file('extdata/SRF_sites.bed', package = 'multicrispr') bsgenome <- BSgenome.Mmusculus.UCSC.mm10::Mmusculus cas9ranges <- read_bed(bedfile, bsgenome) %>% flank_fourways() %>% find_cas9ranges()
#> Read C:/Users/abhagwa/Documents/multicrispr/inst/extdata/SRF_sites.bed
#> 1974 ranges on 21 chromosomes
#> 17 NT wide
#> 0 - 36535760 NT apart
#> Flank fourways
#> 1974 left flanks : [start-200, start-1]
#> 1974 right flanks : [end+1, end+200]
#> 3948 combined (left + right)
#> 7896 after adding strand-complements
#> 7306 after merging overlaps
#> Find N{20}NGG cas9seqs
#> Rm 10 targetranges with no cas9sites
#> 9922 cas9 seqs across 33518 targetranges
# Score cas9ranges[1:3] %>% score_cas9ranges()
#> Score contextseqs (4-23-3) with ruleset1
#> [1] 0.01708623 0.72298446 0.06796563
cas9ranges[1:3] %>% contextseqs() %>% score_contextseqs()
#> Score contextseqs (4-23-3) with ruleset1
#> [1] 0.01708623 0.72298446 0.06796563