Skip to content

Commit

Permalink
15.0.69
Browse files Browse the repository at this point in the history
  • Loading branch information
divonlan committed Dec 3, 2024
1 parent 35df223 commit e8deaf4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/aligner.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,19 +169,19 @@ static inline PosType64 aligner_best_match (VBlockP vb, STRp(seq), PosType64 pai
for (uint32_t i=0; i < seq_len; i += density) {
Direction found = NOT_FOUND;

if (__builtin_expect_with_probability (i < seq_len - nukes_per_hash, true, 0.93) && // room for the hash word
__builtin_expect_with_probability (seq[i] == HOOK, false, 0.75) &&
__builtin_expect_with_probability (seq[i+1] != HOOK, true, 0.75) && // take the G - if there is a homopolymer GGGG... take the last one
if (__builtin_expect (i < seq_len - nukes_per_hash, true/*probability 93%*/) && // room for the hash word
__builtin_expect (seq[i] == HOOK, false/*probability 75%*/) &&
__builtin_expect (seq[i+1] != HOOK, true/*probability 75%*/) && // take the G - if there is a homopolymer GGGG... take the last one
(gpos = aligner_get_word_from_seq (vb, &seq[i+1], &refhash_word, 1)) != NO_GPOS) {

gpos -= i; // gpos is the first base on the reference, that aligns to the first base of seq
found = FORWARD;
}

// note: if the previous condition is true, then seq[i]==HOOK and no need to check this condition. hence the "else"
else if (__builtin_expect_with_probability (i >= nukes_per_hash, true, 0.93) && // room for the hash word
__builtin_expect_with_probability (seq[i] == HOOK_REV, false, 0.75) &&
__builtin_expect_with_probability (seq[i-1] != HOOK_REV, true, 0.75) && // take the G - if there is a polymer GGGG... take the last one
else if (__builtin_expect (i >= nukes_per_hash, true/*probability 93%*/) && // room for the hash word
__builtin_expect (seq[i] == HOOK_REV, false/*probability 75%*/) &&
__builtin_expect (seq[i-1] != HOOK_REV, true/*probability 75%*/) && // take the G - if there is a polymer GGGG... take the last one
(gpos = aligner_get_word_from_seq (vb, &seq[i-1], &refhash_word, -1)) != NO_GPOS) {

gpos -= seq_len_64-1 - i; // gpos is the first base of the reference, that aligns wit the LAST base of seq
Expand Down

0 comments on commit e8deaf4

Please sign in to comment.