LihuaJulieZhu/CRISPRseek

Error when designing gRNAs to a DNA sequence not contained in the genome.

Closed this issue · 1 comments

Line 1095

rep("perfect match not found", length(gRNAs))

in the file offTargetAnalysis.R throws the following error when the input DNA sequence is not contained in the genome:

Error in `$<-.data.frame`(`*tmp*`, "top1Hit.onTarget.MMdistance2PAM",  replacement has 263 rows, data has 7

This error can be easily fixed by changing the line to

rep("perfect match not found", length(gRNAs.notInGenome))

After this fix, this line uses the same length dependency as all other columns in the data frame and should therefore not throw any similar errors caused by other issues.

Hi @mheydasch ,

Thanks for spotting this issue, I have incorporated your suggestion into the dev version, which will be reflected soon in a future release. BTW, when referring to a specific line of code, I suggest to use permlink.

--Kai