Question: Recode vcf with specified reference allele
0
gravatar for wangdavid758
17 months ago by
wangdavid75820
wangdavid75820 wrote:

Hi,

I have a phased vcf file and I want to recode the reference allele according to be what is a specified in a list. The list is 2 columns: SNP id in the first, and the reference allele I want in the second. For example, if my REF and ALT alleles in the vcf are A and T respectively for SNP rs12345, and the REF allele in my list for rs12345 is T, I want to flip the encoding (0/1) for all samples and flip the ref and alt alleles. However, if the REF allele in my list for the above case is A, then nothing is changed. Is there a quick and easy way to do this on plink or vcf tools. My file is huge and any script I write myself to do this will take ages without efficiency exploits of these tools...

Thanks!

ADD COMMENTlink modified 17 months ago by Pierre Lindenbaum119k • written 17 months ago by wangdavid75820
1
gravatar for Pierre Lindenbaum
17 months ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum119k wrote:

see --reference-allele in plink http://zzz.bwh.harvard.edu/plink/dataman.shtml#updateallele

ADD COMMENTlink written 17 months ago by Pierre Lindenbaum119k
Please log in to add an answer.

Help
Access

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