Plink2 score function error

45 views
Skip to first unread message

Natasha Patel-Murray

unread,
May 16, 2022, 4:45:23 PM5/16/22
to plink2-users
Hi,

I am trying to run a scoring command using Plink2 and I am getting an error about a variant appearing multiple times in my score file. 
The command I am running is here:
plink2 --pfile $geno_file --score $scoring_file 1 2 3 header no-mean-imputation ignore-dup-ids list-variants --out $output_score_file

It fails for chromosome 1, but runs fine for other chromosomes. The scoring files for all of the chromosomes were generated in the same way so there is no difference in the formatting, columns, etc. The error message for chr1 occurs as it is processing the scores, after the samples and variants information are loaded. The end of the log (not posting the full log because of proprietary content) says:
--score: 10k variants loaded.
Error: Variant ID 'rs12404747' appears multiple times in --score file.

I understand that it thinks that rs12404747 appears multiple times in my scoring file, but I do not have any duplicate variant IDs in my scoring file. I have attached the scoring file for your reference. I also tried removing the line for rs12404747 from the score file and rerunning, but it fails with the same error for a different variant ID (rs16826012) later in the file even though that rsID also only appears once in my scoring file.

Has anyone seen this before? Do you have any idea what could be wrong?

Thank you,
Natasha

In case it helps, here is the end of the log for chr4, which had a successful run:
Warning: 41098 --score file entries were skipped due to missing variant IDs, and 54 were skipped due to mismatching allele codes.
Warning: 219 --score file entries were skipped since their variant IDs appear multiple times in the main dataset.
--score: 10k variants loaded. 
--score: 20k variants loaded. 
--score: 30k variants loaded. 
--score: 40k variants loaded. 
--score: 50k variants loaded. 
--score: 60k variants loaded. 
--score: 70k variants loaded. 
--score: 80k variants loaded. 
--score: 90k variants loaded. 
--score: 94056 variants processed.
Variant list written to Scores_c4.txt.sscore.vars .
--score: Results written to Scores_c4.txt.sscore .
End time: Thu May 12 20:47:03 2022
weights_file_chr1.txt

Christopher Chang

unread,
May 16, 2022, 4:52:45 PM5/16/22
to plink2-users
You really should have copied the version string from the .log, but I can tell from the error message that you can't possibly be using the current plink2 build.  So, please rerun with the current build.

Natasha Patel-Murray

unread,
May 16, 2022, 5:00:13 PM5/16/22
to plink2-users

Sorry about that and thank you for the quick response!

This is the version I have access to on the cloud platform I am using:
PLINK v2.00a2.3LM 64-bit Intel (24 Jan 2020) www.cog-genomics.org/plink/2.0/
(C) 2005-2020 Shaun Purcell, Christopher Chang GNU General Public License v3

Is there any way to fix the issue using that version or is an upgrade to a newer build the only option?

Christopher Chang

unread,
May 16, 2022, 5:06:49 PM5/16/22
to plink2-users
There has been enough development between Jan 2020 and today that the newer build is certainly the first thing worth trying.

Natasha Patel-Murray

unread,
May 16, 2022, 5:14:37 PM5/16/22
to plink2-users
Ok great, I will try that first then and see if my issue gets resolved. Thank you very much!
Reply all
Reply to author
Forward
0 new messages