@@ -199,8 +199,8 @@ def convert_local_allele_field_types(fields):
199199 raise ValueError ("Local alleles only supported on diploid data" )
200200 # TODO check if LAA is already in here
201201
202- shape = gt .shape [:- 1 ]
203- chunks = gt .chunks [:- 1 ]
202+ # shape = gt.shape[:-1]
203+ # chunks = gt.chunks[:-1]
204204
205205 laa = ZarrArraySpec .new (
206206 vcf_field = None ,
@@ -214,15 +214,15 @@ def convert_local_allele_field_types(fields):
214214 " are relevant (local) for the current sample"
215215 ),
216216 )
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
226226 return [* fields , laa ]
227227
228228
@@ -1164,6 +1164,7 @@ def encode(
11641164 max_variant_chunks = None ,
11651165 dimension_separator = None ,
11661166 max_memory = None ,
1167+ local_alleles = None ,
11671168 worker_processes = 1 ,
11681169 show_progress = False ,
11691170):
@@ -1176,6 +1177,7 @@ def encode(
11761177 schema_path = schema_path ,
11771178 variants_chunk_size = variants_chunk_size ,
11781179 samples_chunk_size = samples_chunk_size ,
1180+ local_alleles = local_alleles ,
11791181 max_variant_chunks = max_variant_chunks ,
11801182 dimension_separator = dimension_separator ,
11811183 )
@@ -1197,6 +1199,7 @@ def encode_init(
11971199 schema_path = None ,
11981200 variants_chunk_size = None ,
11991201 samples_chunk_size = None ,
1202+ local_alleles = None ,
12001203 max_variant_chunks = None ,
12011204 dimension_separator = None ,
12021205 max_memory = None ,
@@ -1209,6 +1212,7 @@ def encode_init(
12091212 icf_store ,
12101213 variants_chunk_size = variants_chunk_size ,
12111214 samples_chunk_size = samples_chunk_size ,
1215+ local_alleles = local_alleles ,
12121216 )
12131217 else :
12141218 logger .info (f"Reading schema from { schema_path } " )
@@ -1261,7 +1265,6 @@ def convert(
12611265 vcfs ,
12621266 worker_processes = worker_processes ,
12631267 show_progress = show_progress ,
1264- local_alleles = local_alleles ,
12651268 )
12661269 encode (
12671270 icf_path ,
@@ -1270,6 +1273,7 @@ def convert(
12701273 samples_chunk_size = samples_chunk_size ,
12711274 worker_processes = worker_processes ,
12721275 show_progress = show_progress ,
1276+ local_alleles = local_alleles ,
12731277 )
12741278
12751279
0 commit comments