Question: Add AF from 1000 genomes vcf file to a different vcf file
0
gravatar for GK1610
10 days ago by
GK161030
United States
GK161030 wrote:

I have a my_vcf file containing genotypes of 600 individuals. These individuals are from European descent.

I want to use AF from 1000 genomes phase 3 project of European population.

I have subsetted 100 genomes phase3 vcf file for European population using following command.

vcf-subset -c EUR.samples.list ALL.chr13.integrated_phase1_v3.20101123.snps_indels_svs.genotypes.vcf.gz | fill-an-ac | bgzip -c > EUR.chr13.phase1.vcf.gz

I want to add these Allele frequencies from here to my original my_vcf file.

How do I do this?

snp • 125 views
ADD COMMENTlink modified 10 days ago by trausch1.0k • written 10 days ago by GK161030
3
gravatar for trausch
10 days ago by
trausch1.0k
Germany
trausch1.0k wrote:
bcftools annotate -a EUR.chr13.phase1.vcf.gz -c INFO/AF <input.bcf>
ADD COMMENTlink written 10 days ago by trausch1.0k

Thanks. its working.

ADD REPLYlink written 9 days ago by GK161030

Thanks. I got this working. Now I am having trouble with editing the vcf file. which means

bcftools annotate -a EUR.chr13.phase1.vcf.gz -c INFO/EUR_AF my_vcf > EUR_AF.vcf

Now I want to replace EUR_AF with AF and also edit this in the header of the file.

ADD REPLYlink written 9 days ago by GK161030
2
bcftools annotate -a EUR.chr13.phase1.vcf.gz -c INFO/AF:=INFO/EUR_AF my_vcf > EUR_AF.vcf
ADD REPLYlink written 9 days ago by trausch1.0k
2
gravatar for finswimmer
10 days ago by
finswimmer2.1k
Germany
finswimmer2.1k wrote:

Hello,

SnpSift can do this for you.

 $ java -jar SnpSift.jar annotate -info AF EUR.chr13.phase1.vcf.gz my_vcf.vcf > variants_annotated.vcf

You have to set the value of -info to what ever is used in your EUR.chr13.phase1.vcf.gz.

Add a -noId if you don't want SnpSift to annotate the ID column as well.

fin swimmer

ADD COMMENTlink modified 10 days ago • written 10 days ago by finswimmer2.1k
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: 738 users visited in the last hour