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: ...)
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:which only works if one flips the notion of
wt
andsl
(latter fromsg
) 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 itslambda sg, wt, pam: ...
)