Assigning gene identifiers to SNPs with bcftools annotate
1
0
Entering edit mode
3.9 years ago
maxa • 0

Hello,

I have a VCF file with SNPs. It contains the chromosome and the position of the SNPs, but the ID column is empty (.). I want to fill the ID column with gene identifiers which i have in a tab-deliminated file with four columns: Chromosome, start position, end position, identifier. Let's call it coordinates.gff.

I used

bcftools annotate -a coordinates.gff.bgz -c CHROM,FROM,TO,ID -o variants_annotated.vcf -Ov --threads 2 variants.bcf

A tabix index exists for the coordinates file and there are no error messages. Still, the ID column of the output file is empty. I'm struggling with this for a while now and I have the feeling that I'm missing something very obvious. Do I have to specifiy that I want the IDs to be replaced in some way?

Any help would be highly appreciated!

SNP • 2.2k views
ADD COMMENT
0
Entering edit mode

same chromosome notation ? no +1 problem with the positions ?

ADD REPLY
0
Entering edit mode
3.9 years ago
maxa • 0

I found the solution in another post here.

ADD COMMENT
0
Entering edit mode

It seems to me that the link you posted provides information on adding gene annotation information to the INFO column of the vcf, not the ID column. Is there a way you found to add it to the ID column?

ADD REPLY

Login before adding your answer.

Traffic: 1873 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