Update ID (rsid) column in VCF file with annotation file
1
1
Entering edit mode
2.8 years ago
robjohn70000 ▴ 160

Hi,

I have a vcf file with the following fields:

#CHROM  POS     ID      REF     ALT     QUAL    FILTER  INFO    FORMAT  SampleX

The issue is that the ID column has '.' and no rsids. I have an annotation file in gtf format as follows:

1      AUGUSTUS        CDS     106955274       106955412       0.89    +       0       transcript_id "g53770.t1"; gene_id "g53770";
1      AUGUSTUS        intron  106955413       107007218       0.89    +       .       transcript_id "g53770.t1"; gene_id "g53770";

Does anyone know how I can use the annotation file to add rsids to my vcf file?

Thanks

SNP VCF annotation • 1.3k views
ADD COMMENT
2
Entering edit mode
2.8 years ago

you need a dbsnp-like vcf file, not a gtf

bcftools annotate -a dbsnp vcf.gz -c ID in.gz  -O z -o output.vcf.gz
ADD COMMENT
0
Entering edit mode

Thanks @Pierre Lindenbaum Any idea how I can obtain the dbsnp-like vcf?

ADD REPLY
0
Entering edit mode

Download it from dbSnp

https://www.ncbi.nlm.nih.gov/snp/

ADD REPLY
0
Entering edit mode

Problem solved. Thanks @Pierre Lindenbaum and @Istvan Albert

ADD REPLY

Login before adding your answer.

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