hi all, i annotated a VCF file with ClinVar annotations and that worked fine. What I am interested to know is which entries in my VCF files were annotated with entries from ClinVar. In other words I am interested in know which of variants have any clinical significance.
Would VCF compare be the right approach? Any help will be highly appreciated.
Thanks in advance.
2 answers
If you added clinvar annotations to your VCF file, then using something like snpSift, GATK selectvariants, or VariantAnnotation package in Bioconductor to filter out variants with the CLINSIG you want.
Hey, you can also do this intersection using Python. To do that I have followed the following steps:
1) Download clinvar.vcf.gz and clinvar.vcf.gz.tbi from ncbi
2) Install and import pyvcf from pyvcf
3) Load clinvar vcf into a new pvcf Reader object
4) Then reading your sample vcf file through an iterator giving you an tuple (chr, start, end) do a reader.fetch().
Please see more usages of pyvcf from its readthedocs
Hope it helps!
Log in to answer this question.