Error: --set-missing-var-ids requires a sorted .bim file.

546 views
Skip to first unread message

M.Beausoleil

unread,
Aug 16, 2022, 1:40:58 PM8/16/22
to plink2-users
Hello, 

Trying to run  LD decay analysis with plink. I'm using a genotype likelihood VCF file and these commands: 

plink --vcf $VCF --allow-extra-chr --double-id  \
--maf 0.01 --geno 0.1 --mind 0.5 \
--thin 0.1 -r2 gz --ld-window 100000 --ld-window-kb 1000 \
--ld-window-r2 0 \
--set-missing-var-ids @:# \
--make-bed --out my.ikea

But when I send the command: 

--vcf: my.ikea-temporary.bed + my.ikea-temporary.bim +

my.ikea-temporary.fam written.

Error: --set-missing-var-ids requires a sorted .bim file.  Retry this command

after using --make-bed to sort your data.

But if I run plink --vcf $VCF --allow-extra-chr --double-id --make-bed --out my.ikea and then the first script, it still asks me for the .bim file (and I see it being present in the folder and containing data). 

How then I could be able to run a LD analysis on my data? 

Thanks! 


Christopher Chang

unread,
Aug 16, 2022, 6:23:16 PM8/16/22
to plink2-users
Change "--vcf $VCF" to "--bfile my.ikea" in the first script, if you're running it after "plink --vcf $VCF --allow-extra-chr --double-id --make-bed --out my.ikea".  Otherwise, you aren't actually reading the sorted output of the latter command, you're just rereading the unsorted VCF.
Reply all
Reply to author
Forward
0 new messages