Add AF from 1000 genomes vcf file to a different vcf file
2
0
Entering edit mode
6.5 years ago
GK1610 ▴ 120

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 snp • 2.4k views
ADD COMMENT
3
Entering edit mode
6.5 years ago
trausch ★ 1.9k
bcftools annotate -a EUR.chr13.phase1.vcf.gz -c INFO/AF <input.bcf>
ADD COMMENT
0
Entering edit mode

Thanks. its working.

ADD REPLY
0
Entering edit mode

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 REPLY
2
Entering edit mode
bcftools annotate -a EUR.chr13.phase1.vcf.gz -c INFO/AF:=INFO/EUR_AF my_vcf > EUR_AF.vcf
ADD REPLY
2
Entering edit mode
6.5 years ago

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 COMMENT

Login before adding your answer.

Traffic: 1869 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6