Error in Plink2 --alt-allele

38 views
Skip to first unread message

kaustubh...@gmail.com

unread,
Apr 7, 2026, 7:11:08 AMApr 7
to plink2-users
Hi Chris,

When I run --a1-allele with Plink 1.9 on my data, it works fine, but when I use it (or the equivalent --alt-allele) in Plink 2 it gives me the following error:
 
Error: Duplicate allele code in variant '22:24301858_CNV_GSTT2B_Ilmndup1' at position 0:0.

It is true that I have several variants with chr 0 and bp 0, as is common with unfiltered data exported from Illumina chips, but Plink 1.9 works fine with it. Below is my equivalent sets of code for Plink 1.9 and Plink 2, and I also attach the log files. The error is in test.plink2.log.

plink2 --pfile Chandana_KA3 --update-ids remove_fid.txt --flip strand_flip.txt --make-bed --out input.plink1
plink --bfile input.plink1 --a1-allele SNP_Table_alleles.txt 3 1 --make-bed --out test.plink1

plink2 --pfile Chandana_KA3 --update-ids remove_fid.txt --flip strand_flip.txt --make-pgen --out input.plink2
plink2 --pfile input.plink2 --alt-allele SNP_Table_alleles.txt 3 1 --make-pgen --out test.plink2

Thanks,

Kaustubh.
input.plink2.log
input.plink1.log
test.plink1.log
test.plink2.log

Chris Chang

unread,
Apr 7, 2026, 10:58:34 AMApr 7
to kaustubh...@gmail.com, plink2-users
The issue is the duplicate allele code (REF and ALT are identical for that variant), not the 0:0 position.  That's invalid input, and you should either correct or remove that variant (plink2 does still let you --exclude it by ID) before running --a1-allele/--alt-allele.

--
You received this message because you are subscribed to the Google Groups "plink2-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plink2-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/plink2-users/9789fed4-27f9-498b-8950-0216b2bf09e1n%40googlegroups.com.

kaustubh...@gmail.com

unread,
Apr 11, 2026, 6:56:29 AMApr 11
to plink2-users
I see, thanks. But is it invalid input specifically because of some sanity checks that  --a1-allele/--alt-allele is conducting in Plink 2 that it didn't conduct in Plink 1.9? It might be useful to provide a bit more info in the command description and/or the error message. And is it possible to use a flag to disable this extra check, to make it equivalent to the Plink 1.9 level?

Chris Chang

unread,
Apr 11, 2026, 10:35:56 AMApr 11
to kaustubh...@gmail.com, plink2-users
Yes, it’s an additional sanity check.

No, I will not add an option to disable it, though I may edit the error message.  If both allele codes are the same, and you’re flipping some of the allele codes/genotypes… how are you supposed to know whether the genotypes were flipped for this variant?  (And what do the genotypes mean, anyway?)

Reply all
Reply to author
Forward
0 new messages