File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,9 @@ def from_field(
137
137
if array_name is None :
138
138
array_name = prefix + vcf_field .name
139
139
# TODO make an option to add in the empty extra dimension
140
- if vcf_field .summary .max_number > 1 or vcf_field .full_name == "FORMAT/LAA" :
140
+ if (
141
+ vcf_field .summary .max_number > 0 and vcf_field .vcf_number in ("R" , "A" , "G" )
142
+ ) or (vcf_field .summary .max_number > 1 or vcf_field .full_name == "FORMAT/LAA" ):
141
143
shape .append (vcf_field .summary .max_number )
142
144
chunks .append (vcf_field .summary .max_number )
143
145
# TODO we should really be checking this to see if the named dimensions
Original file line number Diff line number Diff line change @@ -997,6 +997,11 @@ def test_variant_ANN(self, ds):
997
997
]
998
998
nt .assert_array_equal (ds .variant_ANN .values , variant_ANN )
999
999
1000
+ def test_variant_MLEAF (self , ds ):
1001
+ # fixes https://github.com/sgkit-dev/bio2zarr/issues/353
1002
+ assert ds .variant_MLEAF .dims == ("variants" , "alt_alleles" )
1003
+ assert ds .variant_MLEAF .shape == (21 , 1 )
1004
+
1000
1005
1001
1006
class TestGeneratedFieldsExample :
1002
1007
data_path = "tests/data/vcf/field_type_combos.vcf.gz"
You can’t perform that action at this time.
0 commit comments