@@ -319,3 +319,39 @@ def test_check_overlap(regions):
319
319
]
320
320
with pytest .raises (ValueError , match = "Multiple VCFs have the region" ):
321
321
vcf .check_overlap (partitions )
322
+
323
+
324
+ class TestVcfDescriptions :
325
+ @pytest .mark .parametrize (
326
+ ("field" , "description" ),
327
+ [
328
+ ("variant_NS" , "Number of Samples With Data" ),
329
+ ("variant_AN" , "Total number of alleles in called genotypes" ),
330
+ (
331
+ "variant_AC" ,
332
+ "Allele count in genotypes, for each ALT allele, "
333
+ "in the same order as listed" ,
334
+ ),
335
+ ("variant_DP" , "Total Depth" ),
336
+ ("variant_AF" , "Allele Frequency" ),
337
+ ("variant_AA" , "Ancestral Allele" ),
338
+ ("variant_DB" , "dbSNP membership, build 129" ),
339
+ ("variant_H2" , "HapMap2 membership" ),
340
+ ("call_GQ" , "Genotype Quality" ),
341
+ ("call_DP" , "Read Depth" ),
342
+ ("call_HQ" , "Haplotype Quality" ),
343
+ ],
344
+ )
345
+ def test_fields (self , schema , field , description ):
346
+ assert schema ["columns" ][field ]["description" ] == description
347
+
348
+ # This information is not in the schema yet,
349
+ # https://github.com/sgkit-dev/bio2zarr/issues/123
350
+ # @pytest.mark.parametrize(
351
+ # ("filt", "description"),
352
+ # [
353
+ # ("s50","Less than 50% of samples have data"),
354
+ # ("q10", "Quality below 10"),
355
+ # ])
356
+ # def test_filters(self, schema, filt, description):
357
+ # assert schema["filters"][field]["description"] == description
0 commit comments