I’m trying to load genotypes using index_bgen
and import_bgen
, and am getting this error:
HailException: Invalid locus 'PAR1:60014' found. Contig 'PAR1' is not in the reference genome 'GRCh37'.
I’ve use contig_recoding
for previous errors (e.g., doing "03": "3"
) which seemed to work but I’m not sure what to do in this case. Can anyone help?
Here’s the code I’m using:
hl.index_bgen("gs://fc-7d5088b4-7673-45b5-95c2-17ae00a04183/imputed/ukb_imp_chr*_v3.bgen",
contig_recoding={"01": "1","03": "3","08":"8","04":"4","02":"2","07":"7","06":"6","09":"9","05":"5"})
ukb_geno = hl.import_bgen(
'gs://fc-7d5088b4-7673-45b5-95c2-17ae00a04183/imputed/ukb_imp_chr*_v3.bgen',
entry_fields=['GT', 'GP'],
sample_file="gs://ukb31063/ukb31063.autosomes.sample",
variants=ukb_gwas_mt.locus
)