Dear Chris,
We got the following message using the latest pgenlib read_alleles_range
pgen.read_alleles_range(snp_start, snp_stop, geno)
File "pgenlib.pyx", line 894, in pgenlib.PgenReader.read_alleles_range
File "pgenlib.pyx", line 922, in pgenlib.PgenReader.read_alleles_range
RuntimeError: variant_idx 14875 read_alleles_range() error 6
The PLINK2 file was converted from VCF (obtained from michigan imputation server) with
--maf 0.005
--make-pgen
--max-alleles 2
--out ${out}
--rm-dup exclude-all
--snps-only
--vcf ${vcf}
We checked the .pvar file for 14875 ID and it looks normal.
My observations are:
1. PLINK2 binary is working properly with this file.
2. pgen.read_alleles_range was applied iteratively across multiple blocks in my application, and this function is working fine for other block of this file. So it is a problem to this variant.
3. I have applied the same code to other PLINK2 files and they were all working fine.
Would be great to hear your thoughts on this.
Best,
Kangcheng