I am trying to convert plink files to VCF by using following commands
#!/bin/sh
# 1. have plink binary to specify reference allele
plink --noweb --bfile $plink_file --reference-allele $ref_Allele_file --make-bed --out $plink_file_modified
# 2. create plinkseq project
pseq $pseq_project new-project
#3. load plink file into plink/seq
pseq $pseq_project load-plink --file $plink_file_modified --id $plink_file_modified
#4. write out vcf file
pseq $pseq_project write-vcf | gzip > $plink_file_modified.vcf.gz
I have site-positions-file which looks like as follows
7 7672918
7 4458845
7 3013804
7 4518570
7 7216328
7 7523768
I need reference-allele-file like this
7 7672918 C
7 4458845 C
7 3013804 T
7 4518570 T
7 7216328 C
7 7523768 C
Kindly help me
It worked really fine. Thanks Philipp!
Note that plink doesn't know the reference sequence, so basically guesses the ref from the alleles.