CRISPRSeek Question: changing weight and gRNA.size causes error
1
0
Entering edit mode
Citrus • 0
@c8b95fd5
Last seen 4 months ago
United States

I'm running a crisprseek to get gRNA for nmecas9. I'm expecting 24 nt output and 6 from my PAM sequence. Below is an iteration that works. However, when I modify the gRNA.size to be 24, I get a weight error. When I change the weight commant to rep(1,24), the error changes to a column error. I am stuck.


library(CRISPRseek)
library(BSgenome.Mmusculus.UCSC.mm10)
library(TxDb.Mmusculus.UCSC.mm10.knownGene)
library(org.Mm.eg.db)

res <- offTargetAnalysis(
    inputFilePath = "classified, snooper!",
    format = c("fasta", "fastq", "bed"),
    header = FALSE,
    gRNAoutputName = "p47_mouse_NNNNCC",
    findgRNAs = TRUE,
    exportAllgRNAs = c("all", "fasta", "genbank", "no"),
    findgRNAsWithREcutOnly = FALSE,
    REpatternFile = REpatternFile_default(),
    minREpatternSize = 4,
    overlap.gRNA.positions = c(17, 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 = NULL,
    gRNA.size = 20,
    PAM = "NNNNCC",
    PAM.size = 6,
    PAM.pattern = "NNNNCN",
    BSgenomeName = BSgenome.Mmusculus.UCSC.mm10,
    genomeSeqFile = NULL,
    chromToSearch = "all",
    chromToExclude = chromToExclude_default,
    max.mismatch = 3,
    allowed.mismatch.PAM = 1,
    gRNA.pattern = NULL,
    baseEditing = FALSE,
    targetBase = "C",
    editingWindow = 4:8,
    editingWindow.offtargets = 4:8,
    primeEditing = FALSE,
    PBS.length = 13L,
    RT.template.length = 8:28,
    RT.template.pattern = "D$",
    corrected.seq = NULL,
    targeted.seq.length.change = NULL,
    bp.after.target.end = 15L,
    target.start = NULL,
    target.end = NULL,
    primeEditingPaired.output = "pairedgRNAsForPE.xls",
    min.score = 0,
    topN = 1000,
    topN.OfftargetTotalScore = 10,
    annotateExon = TRUE,
    txdb = TxDb.Mmusculus.UCSC.mm10.knownGene,
    orgAnn = org.Mm.eg.db,
    ignore.strand = TRUE,
    outputDir = "also classified ya snoop!",
    fetchSequence = TRUE,
    upstream = 200,
    downstream = 200,
    weights = weights_default,
    baseBeforegRNA = 4,
    baseAfterPAM = 3,
    featureWeightMatrixFile = featureWeightMatrixFile_default(),
    useScore = TRUE,
    useEfficacyFromInputSeq = FALSE,
    outputUniqueREs = TRUE,
    foldgRNAs = FALSE,
    gRNA.backbone = gRNA.backbone_default,
    temperature = 37,
    overwrite = FALSE,
    scoring.method = c("Hsu-Zhang", "CFDscore"),
    subPAM.activity = subPAM.activity_default,
    subPAM.position = c(22, 23),
    PAM.location = "3prime",
    rule.set = c("Root_RuleSet1_2014", "Root_RuleSet2_2016", "CRISPRscan", "DeepCpf1"),
    chrom_acc = NULL,
    calculategRNAefficacyForOfftargets = TRUE,
    mismatch.activity.file = mismatch.activity.file_default(),
    predIndelFreq = FALSE,
    predictIndelFreq.onTargetOnly = TRUE,
    method.indelFreq = "Lindel",
    baseBeforegRNA.indelFreq = 13,
    baseAfterPAM.indelFreq = 24,
    findOffTargetsWithBulge = FALSE,
    method.findOffTargetsWithBulge = c("CasOFFinder_v3.0.0b3"),
    DNA_bulge = 2,
    RNA_bulge = 2
  )
CRISPRseek CRISPR • 209 views
ADD COMMENT
0
Entering edit mode
Kevin Blighe ★ 4.0k
@kevin
Last seen 2 hours ago
The Cave, 181 Longwood Avenue, Boston, …

The error you encounter when setting gRNA.size = 24 occurs because the default weights vector has a length of 20, which mismatches the new gRNA length. To resolve this, specify a weights vector of length 24 by prepending four zeros to the default SpCas9 weights, as this adjustment has been used successfully for NmeCas9 in published studies. This extends the distal end with zero penalties for mismatches in the additional positions.

The subsequent column error when using rep(1, 24) likely arises from incompatible dimensions in the efficacy scoring matrices or positions, as the default featureWeightMatrixFile and rule sets are designed for 20-nucleotide gRNAs. Additionally, the subPAM.position must be adjusted for the longer gRNA and your PAM size of 6; the default assumes a 20-nucleotide gRNA with a 3-nucleotide PAM. For your setup, set it to c(29, 30), assuming "CC" is the sub-PAM core.

The overlap.gRNA.positions should also be updated to c(21, 22), reflecting the typical Cas9 cleavage 3 nucleotides upstream of the PAM for a 24-nucleotide spacer.

If the column error persists, it may stem from rule sets or scoring methods not supporting non-standard lengths. Try setting calculategRNAefficacyForOfftargets = FALSE to skip efficacy calculations, or limit rule.set to "Root_RuleSet1_2014" and scoring.method to "Hsu-Zhang" to avoid CFD-specific issues, as CFD is tailored to SpCas9.

Note that your PAM ("NNNNCC") differs from the standard NmeCas9 PAM ("NNNNGATT"); confirm this matches your intended Cas9 variant.

Update your call with these changes:

weights = c(0, 0, 0, 0, 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),
gRNA.size = 24,
overlap.gRNA.positions = c(21, 22),
subPAM.position = c(29, 30),
scoring.method = "Hsu-Zhang",
rule.set = "Root_RuleSet1_2014"

Kevin

ADD COMMENT

Login before adding your answer.

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