Skip to content

Commit

Permalink
bug fix with determining pam (in case of alternate pams)
Browse files Browse the repository at this point in the history
  • Loading branch information
vineetbansal committed Jul 28, 2023
1 parent 2655f1e commit d61abeb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion include/genomics/printer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,13 @@ namespace genomics {
if (c.chr.name == "") continue;
v.push_back(pos);

cfd_sum += calculate_cfd(k.sequence, complement(match.sequence), k.pam);
auto match_sequence = complement(match.sequence);
// Note that we cannot simply take k.pam as the PAM
// because the match may well have been found using
// an alternate PAM. The relevant PAM to consider for
// CFD calculations is found at the end of the match.
auto pam = match_sequence.substr(20, 3);
cfd_sum += calculate_cfd(k.sequence, match_sequence, pam);

n_off_targets++;
}
Expand Down

0 comments on commit d61abeb

Please sign in to comment.