This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Create VCF file from .bim, .fam and .bed file

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

3 answers

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]

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.

thanks! it worked

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

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

Log in to answer this question.