pritykinlab / guidescan-cli

A gRNA database generation tool.
http://www.guidescan.com
13 stars 5 forks source link

bug fix in cfd calculation #8

Closed vineetbansal closed 1 year ago

vineetbansal commented 1 year ago

Bug fix in cfd calculation when either kmer direction is -ve, or the offtarget is on the -ve strand.

While I was at it, I also changed the parameter names in the calc_cfd_e function from the code from Doench et al. Their code (and ours in turn) is doing something like:

key = 'r'+wt_list[i]+':d'+revcom(sl)+','+str(i+1)

which only works if one flips the notion of wt and sl (latter from sg) in their head. So they've just misnamed the parameters. This took me a long time to wrap my head around as a newbie to this, so I think this is very confusing. What I've done here is simply rename the parameters, nothing else.

When invoking calc_cfd, we're doing it correctly anyway (i.e. assuming its lambda sg, wt, pam: ...)

cfd = calc_cfd(sgrna, seq[:20], seq[21:23])