Skip to content

Commit

Permalink
bug fix with determining pam for csv generation (in case of alternate…
Browse files Browse the repository at this point in the history
… pams)
  • Loading branch information
vineetbansal committed Aug 8, 2023
1 parent d61abeb commit fc97319
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion include/genomics/printer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,12 @@ namespace genomics {
std::string csvline = get_csv_line(gi, k, start, match, off_target_abs_coords, complete);
if (csvline != "") {
off_targets_lines.push_back(csvline);
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.
cfd_sum += calculate_cfd(k.sequence, match_sequence, match_sequence.substr(20, 3));
}
}
}
Expand Down

0 comments on commit fc97319

Please sign in to comment.