statgen / locuszoom-standalone

Create regional association plots from GWAS or meta-analysis
http://locuszoom.org/
58 stars 19 forks source link

VCFs with chromosome names prefixed by "chr" throwing errors #13

Open agilly opened 4 years ago

agilly commented 4 years ago

While running the following command:

locuszoom --build hg38 --metal smallregion.assoc.txt --markercol rs --pvalcol p_score  --ld-vcf region.vcf.gz --refsnp chr8:1234 --chr chr8

An error is thrown, despite all chromosome names and rs being coherent:

Using user-specified VCF file to calculate LD with reference SNP chr8:1234..
Error: while calculating LD from VCF file: index SNP position 1234 does not exist in file..

First of all I did not understand, so I modified vcf_ld.py to be more explicit by printing the tabixed region, the error was:

Error: while calculating LD from VCF file: tabix returned null for region  8:1234-1234.

This fails because the chromosomes in the VCF are prefixed by 'chr', as in, chr8.

It would be useful to add smart handling of "chr" prefixes.