Create VCF file from .bim, .fam and .bed file
3
8
Entering edit mode
10.3 years ago
hellbio ▴ 520

Hi,

I have a .fam, .bed and .bim file with markers for few individuals. I would need to convert it into a VCF file.

Could someone help to create a VCF file. Are there any opensource tools which can do this?

plinkseq SNP vcf • 39k views
ADD COMMENT
11
Entering edit mode
10.3 years ago

This is also supported directly by PLINK 1.9.

plink --bfile [filename prefix] --recode vcf --out [VCF prefix]

(You may want to replace "vcf" with "vcf-fid" or "vcf-iid", if you want the VCF sample IDs to include only the family ID, or only the individual ID.)

The reverse VCF -> .bed/.bim/.fam conversion is also supported:

plink --vcf [VCF filename] --out [.bed/.bim/.fam prefix]
ADD COMMENT
2
Entering edit mode
10.3 years ago

These are binary plink files (http://www.gwaspi.org/?page_id=671). So, your question is how to convert plink binary files to VCF.

I never did this file conversion, but I guess you can follow this guide, which uses the plinkseq library.

ADD COMMENT
0
Entering edit mode

thanks! it worked

ADD REPLY
0
Entering edit mode

My Biostars tutorial here may be of additional interest to you: Produce PCA for 1000 Genomes Phase III in VCF format

ADD REPLY
2
Entering edit mode
7.2 years ago
ATCG ▴ 400

if you use plink2 use the --keep-allele-order

plink2 --bfile genotypes --keep-allele-order --recode vcf --out genotypes
ADD COMMENT

Login before adding your answer.

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