convert ped and map to vcf format

1,761 views
Skip to first unread message

bluesky

unread,
Jul 20, 2015, 2:53:12 PM7/20/15
to plink2...@googlegroups.com
Seems it can be done like this
plink --ped my.ped --map my.map \
      --recode vcf \
      --out my

But how to make the REF in vcf file to be the reference allele in b37?

Thanks for any help!


Christopher Chang

unread,
Jul 20, 2015, 3:35:57 PM7/20/15
to plink2...@googlegroups.com, jike...@gmail.com
If you have a VCF with the correct reference alleles, you can add

--a2-allele [name of VCF] 4 3 '#' --real-ref-alleles

to your command line.  A similar command line (with slightly different --a2-allele parameters) should work if you want to scrape reference allele assignments from another type of source.

bluesky

unread,
Jul 20, 2015, 5:26:42 PM7/20/15
to plink2...@googlegroups.com, jike...@gmail.com
Thanks for the help! Can I ask two more questions?
1. if I have a file ref.txt in the following format, delimited by tab

#snpID ref.allele
1_200 G
1_300 N


should the command be the following?
--a2-allele ref.txt 2 1 '#' --real-ref-alleles

2. If the ref.allele is G, and the genotypes of sample s1 and s2 are A/G, C/C, will the above command be able to correctly produce the vcf file as the following?
#... REF ALT ... s1  s2
...  G   A,C ... 0/1 2/2

Christopher Chang

unread,
Jul 20, 2015, 6:02:38 PM7/20/15
to plink2...@googlegroups.com, jike...@gmail.com
1. Yes, that should work.

2. No, PLINK isn't yet capable of keeping full track of triallelic loci.  You will need to use another tool if you need that kind of VCF output.
Reply all
Reply to author
Forward
0 new messages