@@ -199,8 +199,8 @@ def convert_local_allele_field_types(fields):
199
199
raise ValueError ("Local alleles only supported on diploid data" )
200
200
# TODO check if LAA is already in here
201
201
202
- shape = gt .shape [:- 1 ]
203
- chunks = gt .chunks [:- 1 ]
202
+ # shape = gt.shape[:-1]
203
+ # chunks = gt.chunks[:-1]
204
204
205
205
laa = ZarrArraySpec .new (
206
206
vcf_field = None ,
@@ -214,15 +214,15 @@ def convert_local_allele_field_types(fields):
214
214
" are relevant (local) for the current sample"
215
215
),
216
216
)
217
- pl = fields_by_name .get ("call_PL" , None )
218
- if pl is not None :
219
- # TODO check if call_LPL is in the list already
220
- pl .name = "call_LPL"
221
- pl .vcf_field = None
222
- pl .shape = (* shape , 3 )
223
- pl .chunks = (* chunks , 3 )
224
- pl .description += " (local-alleles)"
225
- # TODO fix dimensions
217
+ # pl = fields_by_name.get("call_PL", None)
218
+ # if pl is not None:
219
+ # # TODO check if call_LPL is in the list already
220
+ # pl.name = "call_LPL"
221
+ # pl.vcf_field = None
222
+ # pl.shape = (*shape, 3)
223
+ # pl.chunks = (*chunks, 3)
224
+ # pl.description += " (local-alleles)"
225
+ # # TODO fix dimensions
226
226
return [* fields , laa ]
227
227
228
228
@@ -1164,6 +1164,7 @@ def encode(
1164
1164
max_variant_chunks = None ,
1165
1165
dimension_separator = None ,
1166
1166
max_memory = None ,
1167
+ local_alleles = None ,
1167
1168
worker_processes = 1 ,
1168
1169
show_progress = False ,
1169
1170
):
@@ -1176,6 +1177,7 @@ def encode(
1176
1177
schema_path = schema_path ,
1177
1178
variants_chunk_size = variants_chunk_size ,
1178
1179
samples_chunk_size = samples_chunk_size ,
1180
+ local_alleles = local_alleles ,
1179
1181
max_variant_chunks = max_variant_chunks ,
1180
1182
dimension_separator = dimension_separator ,
1181
1183
)
@@ -1197,6 +1199,7 @@ def encode_init(
1197
1199
schema_path = None ,
1198
1200
variants_chunk_size = None ,
1199
1201
samples_chunk_size = None ,
1202
+ local_alleles = None ,
1200
1203
max_variant_chunks = None ,
1201
1204
dimension_separator = None ,
1202
1205
max_memory = None ,
@@ -1209,6 +1212,7 @@ def encode_init(
1209
1212
icf_store ,
1210
1213
variants_chunk_size = variants_chunk_size ,
1211
1214
samples_chunk_size = samples_chunk_size ,
1215
+ local_alleles = local_alleles ,
1212
1216
)
1213
1217
else :
1214
1218
logger .info (f"Reading schema from { schema_path } " )
@@ -1261,7 +1265,6 @@ def convert(
1261
1265
vcfs ,
1262
1266
worker_processes = worker_processes ,
1263
1267
show_progress = show_progress ,
1264
- local_alleles = local_alleles ,
1265
1268
)
1266
1269
encode (
1267
1270
icf_path ,
@@ -1270,6 +1273,7 @@ def convert(
1270
1273
samples_chunk_size = samples_chunk_size ,
1271
1274
worker_processes = worker_processes ,
1272
1275
show_progress = show_progress ,
1276
+ local_alleles = local_alleles ,
1273
1277
)
1274
1278
1275
1279
0 commit comments