[PLINK] Error: Duplicate ID when running an --update-ids
2
1
Entering edit mode
3.8 years ago
njofrica ▴ 10

I am running the following script to update IDs in my PLINK project:

plink \
   --bfile Project1 \
   --update-ids UpdateIDs\
   --make-bed --out /Renamed/Project1

But when I try to run it, I get the following error:

Error: Duplicate ID '009-009 009-009-01'.

Sample file structure for UpdateIDs:

1   GSA_009-009_009-009-01_A01B01   009-009 009-009-01

Which is a tab-separated file containing following columns: old_fid, old_iid, new_fid, new_iid. I've checked the fam file and there are no actual ID duplicates, which is why I'm currently confused...

software-error GWAS SNP Plink • 2.9k views
ADD COMMENT
0
Entering edit mode

Hard to guess without seeing your Project1.fam file and UpdateIDs file.

ADD REPLY
0
Entering edit mode
3.8 years ago

Your issue lies in your UpdateIDs file. Particularly, you have multiple values for a singular key (assuming a map-like replacement). You can take one of two paths: either prune the excess lines yourself using a Python script (you will have to decide which value you will want to prioritize for each key) or you can use another tool (something like awk) to prune these lines.

ADD COMMENT
0
Entering edit mode
13 months ago

Hello, you should remove the space from "009-009 009-009-01". You can use a function like gsub in R to remove it

ADD COMMENT

Login before adding your answer.

Traffic: 3061 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6