Skip to content

Commit

Permalink
Skip variants close to reference sequence ends
Browse files Browse the repository at this point in the history
  • Loading branch information
ldenti committed Apr 30, 2020
1 parent c8eb1a7 commit cd04bdd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion var_block.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ class VB {

Variant *v = &variants[v_index];

if (!v->is_present) {
if (!v->is_present || v->ref_pos < k || v->ref_pos > (int)reference.size() - k) {
// Here we could use k/2 but with k the probability to not
// exceed the reference length due to insertions is
// higher. Anyway, it shouldn't be common to have variants
// near to reference ends
kmers[v_index] = _kmers;
continue;
}
Expand Down

0 comments on commit cd04bdd

Please sign in to comment.