Question: Find Intersections Between ClinVar Track and VCF In IGV
gravatar for otwtgin2010
8 months ago by
otwtgin2010130 wrote:

Looking for a way to find the locations where a VCF and a Clinvar Track Both Have Entries. And also being able to filter these entries based on the nature of either entry. Perhaps something like finding where the VCF has a SNP/Indel at the same location the ClinVar file has an entry whose significance is pathogenic, etc.,

Does anyone know of a way to see this? I can easily jump from one entry to the next in either the ClinVar or VCF Track, but I don't see something that lets you filter/jump to track intersections meeting specific criteria. Just looking to understand the nature of the area surrounding these intersections to see what alternative mappings there might be.

I reviewed IGV's scripting options, but it doesn't seem to offer this, nearly as I can tell.

Any thoughts would be much appreciated.

Thanks very much!

igv clinvar vcf • 434 views
ADD COMMENTlink modified 8 months ago by rbagnall1.3k • written 8 months ago by otwtgin2010130

Well, instead of visual intersections using IGV, try intersecting or annotating sample vcf with clinvar vcf with bcftools/vcftools/bedtools. This would append meta information (from clinvar vcf) to sample vcf and then you can filter the vcf by clinical significance of your choice.

ADD REPLYlink modified 8 months ago • written 8 months ago by cpad011211k
gravatar for rbagnall
8 months ago by
rbagnall1.3k wrote:

You can download clinvar as a vcf, aligned to GRCh37 or GRCh38 from here

The vcf INFO column contains the clinvar allele id (ALLELEID) and clinical significance, e.g. CLNSIG=Benign, CLNSIG=Pathogenic, so you could load both in IGV, or compare your vcf with the clinvar vcf for similar alleles using, e.g. BCFtools, vcftools or bedtools etc

ADD COMMENTlink modified 8 months ago • written 8 months ago by rbagnall1.3k

Thanks! Sorry for the delay. Very new to all this. OK - so i am banging my head against this one. Nearly as i can tell, this should work.

bcftools view -i 'INFO/CLNSIG ~ "Pathogenic"' grch37_clinvar.vcf.gz

i see CLNSIG in the INFO column, many of which have a value of Pathogenic, but it just doesn't work. It doesn't throw an error - just nothing is returned. Am i doing something wrong here?

Thanks so much.

ADD REPLYlink written 8 months ago by otwtgin2010130

The clinvar.vcf needs to be bgzip compressed and tabix indexed first.

uncompress then bgzip

gunzip grch37_clinvar.vcf.gz | bgzip > grch37_clinvar.bgzip.vcf.gz

tabix index

tabix -p vcf grch37_clinvar.bgzip.vcf.gz

view alleles in grch37_clinvar.bgzip.vcf.gz that have pathogenic in the CLNSIG info field

bcftools view -i 'INFO/CLNSIG ~ "Pathogenic"' grch37_clinvar.bgzip.vcf.gz

ADD REPLYlink modified 8 months ago • written 8 months ago by rbagnall1.3k

Very strange. No change at all for me. It reads the file - the filters just do not work. i had to gunzip and then bgzip separate, or else i was seeing an empty bgzip.vcf.gz file. Other than that, followed those steps exactly.

gunzip clinvar_20180701.vcf.gz bgzip clinvar_20180701.vcf tabix -p vcf clinvar_20180701.vcf.gz bcftools view -i 'INFO/CLNSIG ~ "Pathogenic"' clinvar_20180701.vcf.gz

It gets to here, but nothing is displayed beyond that.



bcftools_viewCommand=view -i 'INFO/CLNSIG ~ "Pathogenic"' clinvar_20180701.vcf.gz


The thing that is odd is that this filter seems to work fine bcftools view -i 'ALT="A"' clinvar_20180701.vcf.gz

It's like if it's in the INFO column, it just all falls apart.

And yet i know it sees CLNSIG, because i change CLNSIG to anything other than CLNSIG, it complains.

[filter.c:1298 filters_init1] Error: the tag "INFO/CLNSIG2" is not defined in the VCF header

ADD REPLYlink written 8 months ago by otwtgin2010130

hmm, try

= "Pathogenic" 

rather than

~ "Pathogenic"
ADD REPLYlink written 8 months ago by rbagnall1.3k

Thanks. Yes, tried that also. No difference. What i did find is that i can filter with the first column of the INFO - which in this case is ALLELEID. i also saw that my bcftools version was 1.2 (this is what apt-get install pulled) - and i think the latest is 1.8. i will try and install 1.8 and see if there is any change.

ADD REPLYlink written 8 months ago by otwtgin2010130

i can confirm that after upgrading to the latest bcftools version, this works. Thanks!

ADD REPLYlink written 8 months ago by otwtgin2010130
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1079 users visited in the last hour