Skip to content

Commit 9134e0d

Browse files
author
Heng Li
committed
missing support of DV
1 parent 34ebf12 commit 9134e0d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bcftools/vcf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ int vcf_read(bcf_t *bp, bcf_hdr_t *h, bcf1_t *b)
186186
((uint8_t*)b->gi[i].data)[k-9] = 0;
187187
} else if (b->gi[i].fmt == bcf_str2int("SP", 2)) {
188188
((int32_t*)b->gi[i].data)[k-9] = 0;
189-
} else if (b->gi[i].fmt == bcf_str2int("DP", 2)) {
189+
} else if (b->gi[i].fmt == bcf_str2int("DP", 2) || b->gi[i].fmt == bcf_str2int("DV", 2)) {
190190
((uint16_t*)b->gi[i].data)[k-9] = 0;
191191
} else if (b->gi[i].fmt == bcf_str2int("PL", 2)) {
192192
int y = b->n_alleles * (b->n_alleles + 1) / 2;
@@ -210,7 +210,7 @@ int vcf_read(bcf_t *bp, bcf_hdr_t *h, bcf1_t *b)
210210
int x = strtol(q, &q, 10);
211211
if (x > 0xffff) x = 0xffff;
212212
((uint32_t*)b->gi[i].data)[k-9] = x;
213-
} else if (b->gi[i].fmt == bcf_str2int("DP", 2)) {
213+
} else if (b->gi[i].fmt == bcf_str2int("DP", 2) || b->gi[i].fmt == bcf_str2int("DV", 2)) {
214214
int x = strtol(q, &q, 10);
215215
if (x > 0xffff) x = 0xffff;
216216
((uint16_t*)b->gi[i].data)[k-9] = x;

0 commit comments

Comments
 (0)