Question: plink: vcf to ped
gravatar for bsmith030465
22 months ago by
United States
bsmith030465150 wrote:


I wanted to convert a vcf file to ped/map format. I looked at the archived posts, but the command doesn't seem to give the ped file. I have tried both with plink v 1.9 & plink2, and my commands are:

plink --vcf genomeDF.vcf.gz --freq  --maf 0.05 --chr 1-22 --recode --out genomeDF.vcf.gz.MAF_0.05
plink2 --vcf genomeDF.vcf.gz --freq  --maf 0.05 --chr 1-22 --recode --out genomeDF.vcf.gz.MAF_0.05

However, after executing the commands, I don't get a ped/map file (only the '.afreq' file).

Have I specified the wrong options?


sequencing snp plink • 3.3k views
ADD COMMENTlink modified 22 months ago by chrchang5236.5k • written 22 months ago by bsmith030465150

I added code markup to your post for increased readability. You can do this by selecting the text and clicking the 101010 button. When you compose or edit a post that button is in your toolbar, see image below:

101010 Button

ADD REPLYlink written 22 months ago by WouterDeCoster43k

Just follow some of the steps that I use here for your VCF: Produce PCA bi-plot for 1000 Genomes Phase III in VCF format


  • Convert the 1000 Genomes files to BCF
  • Convert the BCF files to PLINK format

To help, here's the code to use:

#1st pipe, splits multi-allelic calls into separate variant calls
#2nd pipe, left-aligns indels and issues warnings when the REF base in your VCF does not match the base in the supplied FASTA reference genome
bcftools norm -m-any MyVariants.vcf.gz | bcftools norm -Ob --check-ref w -f /ReferenceMaterial/1000Genomes/human_g1k_v37.fasta > MyVariants.bcf ;

bcftools index MyVariants.bcf ;

plink --noweb --bcf MyVariants.bcf --keep-allele-order --vcf-idspace-to _ --const-fid --allow-extra-chr 0 --split-x b37 no-fail --make-bed --out MyVariants ;

Once you get it into PED format, then do your filtering for MAF, etc.


ADD REPLYlink modified 18 months ago • written 22 months ago by Kevin Blighe54k

Hi, Try to use --gzvcf instead of --vcf.

ADD REPLYlink written 18 months ago by xgdong91210
gravatar for chrchang523
22 months ago by
United States
chrchang5236.5k wrote:

The plink 1.9 command should work. If it didn’t, can you post the .log file from that run?

The plink2 —recode command doesn’t work yet, because it’s an incomplete program in alpha testing, and .ped + .map support is a lower development priority since you can always use —make-bed followed by plink 1.9’s —recode. (It should have printed an error message; did you see one?) Most new plink2 features over the next half year will be things plink 1.9 cannot do at all, rather than backfilling of existing functionality; the medium-term goal is to maximize the power of the plink 1.9 + plink2 combination, rather than plink2’s standalone viability.

ADD COMMENTlink modified 22 months ago • written 22 months ago by chrchang5236.5k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1547 users visited in the last hour