Question: Add AF from 1000 genomes vcf file to a different vcf file
0
gravatar for GK1610
3 months ago by
GK161040
United States
GK161040 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 • 219 views
ADD COMMENTlink modified 3 months ago by trausch1.0k • written 3 months ago by GK161040
3
gravatar for trausch
3 months ago by
trausch1.0k
Germany
trausch1.0k wrote:
bcftools annotate -a EUR.chr13.phase1.vcf.gz -c INFO/AF <input.bcf>
ADD COMMENTlink written 3 months ago by trausch1.0k

Thanks. its working.

ADD REPLYlink written 3 months ago by GK161040

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 3 months ago by GK161040
2
bcftools annotate -a EUR.chr13.phase1.vcf.gz -c INFO/AF:=INFO/EUR_AF my_vcf > EUR_AF.vcf
ADD REPLYlink written 3 months ago by trausch1.0k
2
gravatar for finswimmer
3 months ago by
finswimmer4.5k
Germany
finswimmer4.5k 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 3 months ago • written 3 months ago by finswimmer4.5k
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: 978 users visited in the last hour