I downloaded the following vcf file from https://www.internationalgenome.org/.


I wanted to first try and calculate allele frequencies, and then from there calculate allele frequencies based on populations and so on. However, I ran into an issue where while I was using plink, I would utilize the --vcf command to try and calculate frequencies. The frequencies were calculated, but the SNP names were missing. I used the following command in Git Bash on Windows:

    plink --vcf ALL.chr22.phase3_shapeit2_mvncall_integrated_v5b.20130502.genotypes.vcf.gz --freq --out chr22datanew

I then tried to convert the file to plink binary (bed, bim, fam) to try and use that for the basis of the allele frequencies. I used the following commands:

plink --vcf ALL.chr22.phase3_shapeit2_mvncall_integrated_v5b.20130502.genotypes.vcf.vcf --make-bed --out chr22data

plink --bfile chr22data --freq --out chr22freqs

Once again, the frequencies were calculated with no issue, but the SNP names were missing. I checked the .fam file that was created, and the SNPs were there, but not in the .bim file. This may be a simple, elementary level question, but does anyone know how to fix this? I am using plink 1.9 instead of vcftools because I'm using a computer that runs on Windows OS.

  • $\begingroup$ Can you please show the result of head chr22data.bim $\endgroup$
    – user438383
    Commented Dec 23, 2022 at 9:58
  • $\begingroup$ Result: 22 . 0 16050075 G A 22 . 0 16050115 A G 22 . 0 16050213 T C 22 . 0 16050319 T C 22 . 0 16050527 A C 22 . 0 16050568 A C 22 . 0 16050607 A G 22 . 0 16050627 T G 22 . 0 16050646 T G 22 . 0 16050654 <CN3> A $\endgroup$ Commented Dec 30, 2022 at 18:27

1 Answer 1


The standard and most common way to name SNPs is by using rsIDs.

The reason your output from PLINK does not include SNP names is because these are not included in the original VCF you are working with. There are at least two possible options in order to fix this.

  1. Annotate first the source VCF with rsIDs from dbSNP. You can do this using bcftools and a recent (or latest) human rsID compilation in VCF format. E.g.

Downloading rsIDs

wget ftp://ftp.ncbi.nih.gov/snp/organisms/human_9606_b151_GRCh37p13/VCF/All_20180423.vcf.gz
wget ftp://ftp.ncbi.nih.gov/snp/organisms/human_9606_b151_GRCh37p13/VCF/All_20180423.vcf.gz.tbi

Subsetting chr22 from annotations

This makes the annotation of the chr22 VCF faster

bcftools view --threads 10 --regions 22 All_20180423.vcf.gz -Oz -o 22_20180423.vcf.gz
bcftools index 22_20180423.vcf.gz

VCF Annotation

bcftools annotate --threads 10 -a 22_20180423.vcf.gz -c ID -o ALL.chr22.phase3_shapeit2_mvncall_integrated_v5b.20130502.genotypes_annotated.vcf.gz

PLINK frequency estimations

Now you can proceed as you had done already

plink --vcf ALL.chr22.phase3_shapeit2_mvncall_integrated_v5b.20130502.genotypes_annotated.vcf.gz --make-bed --out chr22data
plink --bfile chr22data --freq --out chr22freqs
  1. An alternative option is to build your own 'SNP names' based on chromosome and cordinate (e.g. 22_16255382) using plink commands.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.