[PLINK] Error: Duplicate ID when running an --update-ids
1
1
Entering edit mode
9 weeks 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...

Plink GWAS SNP software error Tool • 147 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
8 weeks 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

Login before adding your answer.

Traffic: 2543 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