Skip to content

Commit 4969b0c

Browse files
Will-Tylerjeromekelleher
authored andcommitted
Add more unit tests
1 parent 70aa174 commit 4969b0c

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

tests/test_vcf_examples.py

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,20 @@ def test_call_HQ(self, ds):
232232
]
233233
nt.assert_array_equal(ds["call_HQ"], call_HQ)
234234

235+
def test_call_LAA(self, ds):
236+
call_LAA = [
237+
[[-2, -2], [-2, -2], [1, -2]],
238+
[[-2, -2], [-2, -2], [1, -2]],
239+
[[-2, -2], [1, -2], [1, -2]],
240+
[[-2, -2], [1, -2], [-2, -2]],
241+
[[1, 2], [1, 2], [2, -2]],
242+
[[-2, -2], [-2, -2], [-2, -2]],
243+
[[1, -2], [2, -2], [-2, -2]],
244+
[[-2, -2], [-2, -2], [-2, -2]],
245+
[[-2, -2], [1, -2], [2, -2]],
246+
]
247+
nt.assert_array_equal(ds["call_LAA"], call_LAA)
248+
235249
def test_no_genotypes(self, ds, tmp_path):
236250
path = "tests/data/vcf/sample_no_genotypes.vcf.gz"
237251
out = tmp_path / "example.vcf.zarr"
@@ -531,6 +545,36 @@ def test_call_AD(self, ds):
531545
]
532546
nt.assert_array_equal(ds.call_AD.values, call_AD)
533547

548+
def test_call_LAA(self, ds):
549+
# The shape is (23, 3, 1).
550+
# None of the entries use any alternate alleles.
551+
call_LAA = [
552+
[[-2], [-2], [-2]],
553+
[[-2], [-2], [-2]],
554+
[[-2], [-2], [-2]],
555+
[[-2], [-2], [-2]],
556+
[[-2], [-2], [-2]],
557+
[[-2], [-2], [-2]],
558+
[[-2], [-2], [-2]],
559+
[[-2], [-2], [-2]],
560+
[[-2], [-2], [-2]],
561+
[[-2], [-2], [-2]],
562+
[[-2], [-2], [-2]],
563+
[[-2], [-2], [-2]],
564+
[[-2], [-2], [-2]],
565+
[[-2], [-2], [-2]],
566+
[[-2], [-2], [-2]],
567+
[[-2], [-2], [-2]],
568+
[[-2], [-2], [-2]],
569+
[[-2], [-2], [-2]],
570+
[[-2], [-2], [-2]],
571+
[[-2], [-2], [-2]],
572+
[[-2], [-2], [-2]],
573+
[[-2], [-2], [-2]],
574+
[[-2], [-2], [-2]],
575+
]
576+
nt.assert_array_equal(ds.call_LAA.values, call_LAA)
577+
534578
def test_call_PID(self, ds):
535579
call_PGT = ds["call_PGT"].values
536580
assert np.all(call_PGT == ".")

0 commit comments

Comments
 (0)