plink2 --bgen XX.bgen ref-first --sample XX.sample --extract rslist.txt --export bgen-1.2 --out YY
d1 = bgen.load('YY.bgen', rsrange)d2 = bgen.load('XX.bgen',rsrange)Sorry for asking again and my naive question.
So, do you mean there won't be a difference at dosage level or just we should accept the fact that they are just different (before vs after filtering the original BGEN file). Because the difference in probabilities imply different dosages (for those ~8000 samples):

plink2 --bgen example.8bits.bgen ref-first --sample example.8bits.sample --extract rs.txt --export bgen-1.2 "bits=8" --out yylink2 --bgen yy.bgen ref-last --sample yy.sample --export A --out dos1
plink2 --bgen example.8bits.bgen ref-first --sample example.8bits.sample --extract rs.txt --export A --out dos2However, there are 218 samples (of 500) with different genotype probabilities (as you already mentioned).
So again sorry for my mistake, and thanks for your help.
Best/Oveis