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?
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?
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.
if you use plink2 use the --keep-allele-order
plink2 --bfile genotypes --keep-allele-order --recode vcf --out genotypes
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
thanks! it worked
My Biostars tutorial here may be of additional interest to you: Produce PCA for 1000 Genomes Phase III in VCF format