Skip to content

Commit

Permalink
Update bcf_sr_sort.c
Browse files Browse the repository at this point in the history
Co-authored-by: daviesrob <[email protected]>
  • Loading branch information
pd3 and daviesrob authored Oct 10, 2024
1 parent 09251d2 commit 394d80c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bcf_sr_sort.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,10 @@ static int bcf_sr_sort_set(bcf_srs_t *readers, sr_sort_t *srt, const char *chr,
}

// Create new variant or attach to existing one. But careful, there can be duplicate
// records with the same POS,REF,ALT (e.g. in dbSNP-b142). In such case, append a
// numeric index (var_idx)
// records with the same POS,REF,ALT (e.g. in dbSNP-b142). In such case, use a
// hash table (srt->var_str2int) and a counter (var_idx) to ensure they are
// treated as separate variants, while still allowing them to be matched
// between readers.
char *var_str = beg + srt->str.s;
int ret, var_idx = 0, var_end = srt->str.l;
while ( 1 )
Expand Down

0 comments on commit 394d80c

Please sign in to comment.