This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to handle duplicate SNPs in PLINK?

Hello,

I'm aligning my dataset to a reference panel, and I am finding errors about duplicate SNPs.

Error: Duplicate variant ID 'rs17800615' in --flip file.

What is the standard way of dealing with these issues? The plink documentation doesn't mention an automatic way of doing this.

Is there at least a way for me to generate a list of duplicate SNPs to exclude them later?

Thanks

snp plink

2 answers

You can use Unix sort + uniq to deduplicate the --flip file:

sort flipfile.txt | uniq > flipfile_no_duplicates.txt

(You should also double-check how your --flip file was generated.)

better do it in plink

Log in to answer this question.