Thanks. its working.
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?
2 answers
bcftools annotate -a EUR.chr13.phase1.vcf.gz -c INFO/AF <input.bcf>
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.
bcftools annotate -a EUR.chr13.phase1.vcf.gz -c INFO/AF:=INFO/EUR_AF my_vcf > EUR_AF.vcf
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
Log in to answer this question.