Skip to content

Commit

Permalink
fix for specificity calculation for sam format (similar to commit 98b…
Browse files Browse the repository at this point in the history
…c2 for csv format
  • Loading branch information
vineetbansal committed Sep 29, 2023
1 parent 98bc26b commit a8e8166
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions include/genomics/printer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,14 @@ namespace genomics {
// 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.
std::string pam = match_sequence.substr(20, 3);

if ((match.mismatches == 0) && (pam.substr(1, 2) == "GG"))
std::string pam;
if (match_sequence.length() < 20) {
pam = "";
} else {
pam = match_sequence.substr(20, 3);
}

if ((match.mismatches == 0) && (pam.length() == 3) && (pam.substr(1, 2) == "GG"))
perfect_match = true;

coordinates c;
Expand Down

0 comments on commit a8e8166

Please sign in to comment.