Skip to content

Commit 979608c

Browse files
daviesrobvasudeva8
authored andcommitted
Use nR_ori when checking for valid LAA values
We need to check against the original allele count, not the updated one.
1 parent 6a31123 commit 979608c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

vcfutils.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,8 +1001,7 @@ int bcf_remove_allele_set(const bcf_hdr_t *header, bcf1_t *line, const struct kb
10011001
if (sample_laa[j] == bcf_int32_vector_end
10021002
|| sample_laa[j] == bcf_int32_missing)
10031003
break;
1004-
int allele = (sample_laa[j] > 0
1005-
&& sample_laa[j] < line->n_allele)
1004+
int allele = (sample_laa[j] > 0 && sample_laa[j] < nR_ori)
10061005
? sample_laa[j] : 0;
10071006
if (!allele || map[allele] < 0)
10081007
{

0 commit comments

Comments
 (0)